about dialog

This is a discussion on about dialog within the Windows Programming forums, part of the Platform Specific Boards category; res.h: Code: #define IDD_ABOUT 101 #define IDR_MYMENU 102 #define IDI_MYICON 201 #define ID_PREF_PREFS 9001 #define ID_PREF_ABOUT 9002 #define ID_PREF_EXIT 9003 ...

  1. #1
    stumped
    Guest

    about dialog

    res.h:
    Code:
    #define IDD_ABOUT        101
    #define IDR_MYMENU       102
    #define IDI_MYICON       201
    
    #define ID_PREF_PREFS   9001
    #define ID_PREF_ABOUT   9002
    #define ID_PREF_EXIT    9003
    dlg.rc:
    Code:
    #include "res.h"
    
    IDD_ABOUT DIALOG DISCARDABLE  0, 0, 239, 66
    STYLE DS_MODALFRAME | WS_POPUP // this line give me a parse error
    FONT 8, "Tahoma"
    BEGIN
        DEFPUSHBUTTON   "OK",IDOK,174,18,50,14
        GROUPBOX        "About this program...",IDC_STATIC,7,7,225,52
        CTEXT           "An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
                        IDC_STATIC,16,18,144,33
    END
    but why do I get that $$$$ty parse error? It's almost straight from the winprog.org tutorial.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227

    Re: about dialog

    Originally posted by stumped
    but why do I get that $$$$ty parse error? It's almost straight from the winprog.org tutorial.
    'Parse error' is peculiar to mingw (it's always a good idea to quote your compiler, version and the exact error message) and winprog tutorials are designed and tested (as far as I remember) on msvc and bcc5.5; only the non-resource examples should compile without modification.

    If you are compiling resources with mingw you have to #include <windows.h> in the resource script, otherwise constants such as 'DS_MODALFRAME' and 'WS_POPUP' will not be defined.

    edit: If you get an error message regarding IDC_STATIC then put this in your resource script after your #includes:
    Code:
    #if !defined IDC_STATIC
    #define IDC_STATIC -1
    #endif
    Last edited by Ken Fitlike; 04-20-2003 at 06:06 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 01:59 PM
  2. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 02:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  4. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 02:59 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

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