danke.
ich meinte DefWindowProc(). aber nachdems ein dialog is darf man das hier nicht...
das problem ist aber im prinzip das gleiche.
Typically, the dialog box procedure should return TRUE if it processed the message, and FALSE if it did not. If the dialog box procedure returns FALSE, the dialog manager performs the default dialog operation in response to the message.
versuchs mal so:
|
C-/C++-Quelltext
|
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
|
#include <windows.h>
#include "resource.h"
//Dialogfunktion
BOOL APIENTRY DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_COMMAND:
{
switch(wParam)
{
case IDD_OK:
{
EndDialog(hDlg,0);
break;
}
}
return TRUE;
}
}
return FALSE;
}
//Windowshauptfunktion
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG2),NULL,DlgProc);
return 0;
}
|