I have a dialog box that if a user pushes a button another dialog box pops up. It works fine unless I add an edittext control in it and then it doesn't even show up.
Any ideas on why?
I am using Bloodshed Dev C++
Ignore the control placement, I haven't even gotten to the setting them where they go yet because it won't show right yet... If I remove the // from before the edittext it doesn't show.
Code:
IDD_BATCHADD DIALOG DISCARDABLE 0, 0, 200, 250
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Batch Frame Adding"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Frame Preview:",IDC_STATIC,7,200,75,8
LTEXT "Frame Delay:",IDC_STATIC,170,123,75,8
//EDITTEXT IDC_FRAMEEXTENSION,7,7,271,14,ES_AUTOHSCROLL
//EDITTEXT IDC_FRAMENAME,7,7,271,14,ES_AUTOHSCROLL
//EDITTEXT IDC_FRAMESTART,7,7,271,14,ES_AUTOHSCROLL
//EDITTEXT IDC_FRAMEEND,215,120,58,14,ES_NUMBER
PUSHBUTTON "&Ok",IDC_BATCH_CANCEL,103,180,55,14
PUSHBUTTON "&Cancel",IDC_BATCH_OK,158,180,55,14
END
EDIT!!!!
In my DlgProc code I found that if I delete the "EndDialog" from the WM_CLOSE case it shows up fine...wtf?
Code:
case WM_CLOSE:
{
//EndDialog(hwnd, 0);
}
EDIT AGAIN!!!
I figured it out. I didn't have 'break;' in the case before WM_CLOSE. It's fixed now. Still confusing about why the EDITTEXT was making it work or not work, but oh well. It works now.