Thread: Dialog don't show background or title

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Dialog don't show background or title

    I'm new to Dialogs, so bear with me if I've done something stupid with a file.

    I use Dev C++ to compile, and ResEd to make the resource files.

    I've made a simple Dialog programme, with 2 buttons and 2 blocks of text using ResEd:
    Code:
    IDD_DLG1 DIALOGEX 6,5,305,129
    CAPTION "About The Author"
    FONT 8,"MS Sans Serif",0,0
    STYLE 0x80CF0080
    BEGIN
      CONTROL "OK",IDD_OK,"Button",0x50010000,234,31,54,13
      CONTROL "CANCEL",IDD_CANCEL,"Button",0x50010000,234,60,54,13
      CONTROL "About the Author",IDC_GRP1,"Button",0x50000007,14,18,192,87
      CONTROL "change this to text",IDC_STC1,"Static",0x50000000,18,38,182,63
    END
    I call upon the Dialog with a simple menu:

    Code:
     
    case ID_MDIALOG:
         DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DLG1), hwnd, DialogProc);
         break;
    Now i get no errors or warnings, but the Title bar and the background doesn't show, exept for the in the IDC_STC1 section where the BackGround shows.

    I have no idea whats wrong, but any help is appreciated

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Do you have a header file where the values for IDD_OK, IDD_CANCEL, IDC_GRP1, and IDC_STC1 are defined? Also:
    > CONTROL "About the Author",IDC_GRP1,"Button",0x50000007,14,18,192,87
    It looks like the width and height of this button might be a bit much (192, 87).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extract Title from plain text file
    By Todd88 in forum C++ Programming
    Replies: 10
    Last Post: 11-21-2008, 09:47 AM
  2. Making dialog box the only window
    By PJYelton in forum Windows Programming
    Replies: 2
    Last Post: 09-06-2005, 12:02 PM
  3. Replies: 2
    Last Post: 05-29-2005, 10:06 AM
  4. a real beginner in Visual C++.net - Q about dialog problem
    By Green Fuze in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2005, 05:24 AM
  5. a real beginner in Visual C++.net - Q about dialog problem
    By Green Fuze in forum C++ Programming
    Replies: 4
    Last Post: 03-01-2005, 05:21 AM