When I provide CALLBACK proc of its GUI configuration, I see a crash.
All I am doing is as follows in the Page-derived UI class of mine:
Code: Select all
void * gdecl Handle( void *parent )
{
if ( ! hwnd )
{
LPCTSTR res = MAKEINTRESOURCE (IDD_MY_SETTINGS);
hwnd = CreateDialog ( gInstance, res, (HWND)parent, DlgProc );
...
...
}
return hwnd;
}
Code: Select all
DlgProc
Code: Select all
BOOL CALLBACK DlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_HSCROLL:
MessageBox (hwnd, "scroll message", "event", MB_OK);
break;
}
return DefDlgProc (hwnd, message, wParam, lParam);
}
Am I missing something?
Regards,
Suchit