Sign in to follow this  
minus4th

Win32 API Dialog box - [resource error] Syntax error - Dev-c++

Recommended Posts

Whew, that was a long title... anyways. I've been googling till i couldn't google anymore. I have this silly little error with my resource file. I am trying to create an about dialog box from the #winprog.org tutorials. I am almost coping word for word at this point. I've tried what i could find on the msdn site and googles to hell and back... I'm getting a [Resource error] Syntax error I'm using c++ Using Dev-C++ Heres is my .rc file
// Include files
#include <windows.h>
#include "resource.h"

// -------------------- ICON FILES ------------------------- //
IDI_SKELETON         ICON   "Skeleton.ico"
IDI_SKELETON_SM      ICON   "Skeleton_sm.ico"

// -------------------- BITMAP FILES ----------------------- //

// -------------------- MENU RESOURCES --------------------- //
IDR_MAINMENU    MENU
BEGIN
     POPUP "&File"
     BEGIN
          MENUITEM "E&xit", IDM_FILE_EXIT
     END
     
     POPUP "&Stuff"
     BEGIN
          MENUITEM "&Go", IDM_STUFF_GO
          MENUITEM "Go &Somewhere Else", 0, GRAYED
     END
     
     POPUP "&Help"
     BEGIN
          MENUITEM "&About", IDM_HELP_ABOUT
     END
END

// --------------------- DIALOG RESOURCES ------------------- //
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "My About Box"
FONT 8, "MS Sans Sarif"
BEGIN
     GROUPBOX      "About this program...",IDC_STATIC,7,7,225,52
     CTEXT         "A program for the crual pleasure of the lord of bread\r\n\r\n By: The Lord of Bread",IDC_STATIC,16,18,144,33
     DEFPUSHBUTTON "&OK",IDOK,174,18,50,14
     PUSHBUTTON    "&Cancel",IDCANCEL,174,35,50,14
END

I'm getting the syntax error on these lines...
GROUPBOX      "About this program...",IDC_STATIC,7,7,225,52
CTEXT         "A program for the crual pleasure of the lord of bread\r\n\r\n By: The Lord of Bread",IDC_STATIC,16,18,144,33

I can't for the life of me see where i am missing something... This works fine in MSVS.NET (of course it auto generates teh file for me)... If you need more info let me know.. Thanks for the help :)

Share this post


Link to post
Share on other sites
Just a guess:

1) You have two controls sharing the same ID(IDC_STATIC).
2) IDC_STATIC might be undefined.

Share this post


Link to post
Share on other sites
Thanks Scet! ID_STATIC was not defined. I replaced it with -1 which is what it was supposed to be defined with and it worked.

ratings++

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this