用WinExec("c:\\WINDOWS\\system32\\shutdown.exe -s -t 300,0);貌似隐藏不掉,怎么办啊!
本人小白一个,麻烦说得明白些

解决方案 »

  1.   

    用FindWindow找到空白,发送隐藏窗口的消息
      

  2.   

    HWND hWnd = ::FindWindow("窗口标题", "窗口类名");
    ::ShowWindow(hWnd, SW_HIDE);
      

  3.   

    http://blog.csdn.net/visualeleven/article/details/6025210
      

  4.   

    --------------------Configuration: MFC - Win32 Debug--------------------
    Compiling...
    MFCDlg.cpp
    F:\vc存档\MSDev98\MyProjects\MFC\MFCDlg.cpp(225) : error C2440: 'initializing' : cannot convert from 'class CWnd *' to 'struct HWND__ *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    执行 cl.exe 时出错.MFC.exe - 1 error(s), 0 warning(s)这又是怎么回事!!!
      

  5.   

    是不是用过windowsetpos就不能用HWND了
      

  6.   

    不是
    CWnd *pWnd = FindWindow("窗口标题", "窗口类名");
    pWnd->ShowWindow(SW_HIDE);
      

  7.   

    定时关机源码
    http://download.csdn.net/source/3409631