Author Topic: Resource Syntax Error  (Read 5867 times)

Offline Insomniac

  • Single posting newcomer
  • *
  • Posts: 3
Resource Syntax Error
« on: February 03, 2010, 04:14:27 pm »
I'm following this tutorial, and I have this code:

Code:

Code
#include "resource.h"

IDR_MYMENU MENU
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "E&xit", ID_FILE_EXIT
    END

    POPUP "&Help"
    BEGIN
        MENUITEM "&About", ID_HELP_ABOUT
    END
END

IDI_MYICON ICON "cstrike.ico"

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 Serif"
BEGIN
    DEFPUSHBUTTON   "&OK",IDOK,174,18,50,14
    PUSHBUTTON      "&Cancel",IDCANCEL,174,35,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 The Forger",
                    IDC_STATIC,16,18,144,33
END

However, on the line with STYLE, I'm getting "syntax error". The error is not very descriptive, so any help would be appreciated.

I'm led to believe this code SHOULD work, as it's in the tutorial, however it's not working in C::B, which is why I am placing it in the "Using Code::Blocks" forum.
« Last Edit: February 03, 2010, 04:19:26 pm by Insomniac »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Resource Syntax Error
« Reply #1 on: February 03, 2010, 04:20:43 pm »
I'm led to believe this code SHOULD work, as it's in the tutorial, however it's not working in C::B, which is why I am placing it in the "Using Code::Blocks" forum.
It's still not related to C::B in any way !!
C::B is an IDE, not a compiler or a resource-compiler.

Why do you try it again, after I locked your topic yesterday (http://forums.codeblocks.org/index.php/topic,11969.msg81345.html#msg81345) ?

Are you aware, that you can get banned from the forum for such a behaviour ?

Locked again and the last time !!

Following posts will be deleted silently !

« Last Edit: February 03, 2010, 04:22:44 pm by jens »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Resource Syntax Error
« Reply #2 on: February 03, 2010, 05:59:15 pm »
Are you aware, that you can get banned from the forum for such a behaviour ?
You are really close to I can tell...

Why don't you simply google?
This would reveal this:
http://msdn.microsoft.com/en-us/library/czada357%28VS.80%29.aspx
Read yourself and find out what's wrong with the STYLE line...

Please try to help yourself first as we will not do that homework for you. Period.

Edit: I just realised that the link your provided is not even a C::B link. So why on earth do you think we answer issues of other people (websites) content? :?
« Last Edit: February 03, 2010, 06:04:59 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ