Thread: What is a parse error and how are they caused?

  1. #1
    Registered User Finchie_88's Avatar
    Join Date
    Aug 2004
    Posts
    154

    Question What is a parse error and how are they caused?

    I was working on a project, and was adding a dialog to it and when I tried, all that happened was that there was a parse error in the resource file that I included in my program.
    Code:
    IDD_OPTIONS DIALOG DISCARDABLE 0,0,239,66
    STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
    CAPTION "Options"
    FONT 8, "MS Sans Serif"
    BEGIN
        DEFPUSHBUTTON   "&OK",IDOK,174,18,50,14
        PUSHBUTTON      "&Cancel",IDCANCEL,174,35,50,14
        CTEXT           "The is a test to get it wo work",
                        IDC_STATIC,16,18,144,33
    END


  2. #2
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    A parse error means that your code is not structurally correct (i.e. syntax error).

    Try changing it to

    Code:
    #include <windows.h>
    #define IDC_STATIC -1
    IDD_OPTIONS DIALOG DISCARDABLE 0,0,239,66
    STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
    CAPTION "Options"
    FONT 8, "MS Sans Serif"
    BEGIN
        DEFPUSHBUTTON   "&OK",IDOK,174,18,50,14
        PUSHBUTTON      "&Cancel",IDCANCEL,174,35,50,14
        CTEXT           "The is a test to get it wo work",
                        IDC_STATIC,16,18,144,33
    END

Popular pages Recent additions subscribe to a feed