Jump to content
  • Advertisement
Sign in to follow this  
minus4th

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

This topic is 4562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!