Dialog from a dialog, can't add edittext

This is a discussion on Dialog from a dialog, can't add edittext within the Windows Programming forums, part of the Platform Specific Boards category; I have a dialog box that if a user pushes a button another dialog box pops up. It works fine ...

  1. #1
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100

    Dialog from a dialog, can't add edittext

    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.

    Last edited by Welder; 11-04-2007 at 11:05 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vector vs. array.
    By matsp in forum C++ Programming
    Replies: 37
    Last Post: 06-23-2008, 12:41 PM
  2. Dialog problem
    By Sucur in forum C++ Programming
    Replies: 0
    Last Post: 07-20-2005, 05:22 PM
  3. Replies: 6
    Last Post: 04-27-2004, 08:02 PM
  4. Using standard C fscanf function with win32 save dialog
    By korbitz in forum Windows Programming
    Replies: 1
    Last Post: 04-08-2004, 03:31 PM
  5. Add and delete functions
    By Ana Val sazi in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2002, 09:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21