It's been a while since I have had to create dialogs, but I need to for my current project and it is not working correctly. The dialog appears, but it has no title-bar or window behind the buttons, text, and group control. It's like controls just appear on my main (parent) window. Here's the code I am attempting to use.
IDD_AREAPROP DIALOGEX 0, 0, 320, 240
CAPTION "Area Properties"
FONT 8, "MS Sans Serif"
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
DEFPUSHBUTTON "&OK", IDOK, 174, 18, 50, 14
PUSHBUTTON "&Cancel", IDCANCEL, 174, 35, 50, 14
GROUPBOX "About this program...", 100, 7, 7, 225, 52
CTEXT "Centered text", 101, 16, 18, 144, 33
//Main window callback
if(DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_AREAPROP), hwndWindow, (DLGPROC)AreaPropCalls) == IDOK)
MessageBox(hwndWindow, "Dialog returned OK", "Debug", MB_OK);
MessageBox(hwndWindow, "Dialog returned cancel", "Debug", MB_OK);
So what is wrong here? I return 'true' on the 'WM_INITDIALOG' message on the dialog callback and it appears to work as far as clicking 'OK' or 'Cancel', but something just is NOT right. Ideas?