March 07, 2002 DialogBox | ||||
|---|---|---|---|---|
| ||||
I 'm trying to get a dialog box to work in my program and it just will not work. I've been able to compile a few programs out of a book with Dialog Boxes but whenever I try mine it keeps telling me that it needs the 4 arguments to my AboutDlgProc in the call to DialogBox
case IDM_APP_ABOUT :
DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc);
return 0;
BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG :
return TRUE ;
case WM_COMMAND :
switch (LOWORD (wParam))
{
case IDOK :
EndDialog (hDlg, 0) ;
return TRUE ;
}
break ;
}
return FALSE ;
}
What am I doing wrong? I can send the source code if that would help.
Steve De Chellis
dungeonmaster@snet.net
| ||||
March 07, 2002 Re: DialogBox | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Steve & Denise De Chellis | I think I have found the root of my problem. I am mixing C++ code with the windows code and to make my C++ codes work I have to check off the "treat code as C++" button which then makes Dialogbox invalid! Steve dungeonmaster@snet.net | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply