ShowWindow
ウィンドウを非表示にした後に設定されたコールバック関数を使用してウィンドウを表示しようとしましたSetTime
が、うまくいきませんでした。次のコード例を確認してください。
#define _WIN32_WINNT 0x0500
#include<windows.h>
void CALLBACK f(HWND hwnd, UINT uMsg, UINT timerId, DWORD dwTime)
{
MessageBoxA(NULL,"Test","test2",MB_OK);
ShowWindow( hwnd, SW_SHOW ); //This will not show the window :(
MessageBoxA(NULL,"Is it shown?","test2",MB_OK);
}
int main()
{
MSG msg;
ShowWindow( GetConsoleWindow(), SW_HIDE );
SetTimer(NULL, 0, 1000*3, &f);
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
ありがとうございました。