1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| INT_PTR WINAPI ProcDlgGenere(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
return TRUE;
case WM_CHAR:
MessageBox(NULL,"ici","",0);
break;
case WM_CLOSE:
PostQuitMessage(1);
return TRUE;
break;
}
return(FALSE);
}
int APIENTRY WinMain(HINSTANCE hInst_g, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG tMsg;
HWND hWndGenere_g = CreateDialog( hInst_g, MAKEINTRESOURCE(IDD_DIALOG1), NULL, ProcDlgGenere );
ShowWindow(hWndGenere_g, SW_SHOWNORMAL);
UpdateWindow(hWndGenere_g);
while( GetMessage( &tMsg, hWndGenere_g, 0,0 ) > 0 )
{
TranslateMessage( &tMsg );
DispatchMessage( &tMsg );
}
return tMsg.message;
} |
Partager