syntax error at DIALOGEX

i was learning Win32 tutorials by the forger but when i compile dlg_two i have a syntax error at line 22 -> the DIALOGEX part:

i am using code::blocks @ windows 8 pro

this is part of my resource file, i have included my "resource.h" file w/c contains constants, and also <windows.h>

and this is the DIALOGEX part my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
IDD_TOOLBAR DIALOGEX 0, 0, 98, 52 // this is where the syntax error occured

STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION

EXSTYLE WS_EX_TOOLWINDOW

CAPTION "Dialog Toolbar"

FONT 8, "MS Sans Serif"

BEGIN
    PUSHBUTTON "&Press This Button",IDC_PRESS,7,7,84,14
    PUSHBUTTON "&Or This One",      IDC_OTHER,7,31,84,14
END


I can't really figure out the error, maybe i was missing something not-so-obviuos
someone please help me !!!
Have you defined IDD_TOOLBAR in resource.h?
yes and it's value is 3000
Last edited on
please someone help me, i really want to go to the next lesson but is stuck in here !!!
post whole resource.h and resource.rc files. Maybe problem is somewhere else
resource.h:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef RESOURCE_H_INCLUDED
#define RESOURCE_H_INCLUDED

#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#endif
//========= MENU BAR ========================
#define IDR_MYMENU   28
#define ID_FILE_EXIT 1010
#define ID_DIALOG_SHOW 1035
#define ID_DIALOG_HIDE 1036
#define ID_HELP_ABOUT 1020
//======== MY_TOOLBAR =======================
#define IDD_TOOLBAR     3000
#define IDC_PRESS       3006
#define IDC_OTHER      3007
//===========================================


#endif // RESOURCE_H_INCLUDED 


resource.rc:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <windows.h>
#include "resource.h"

IDR_MYMENU MENU DISCARDABLE
BEGIN
    POPUP "&File"
        BEGIN
            MENUITEM "E&xit",     ID_FILE_EXIT
        END
    POPUP "&Toolbar"
        BEGIN
            MENUITEM "Show",      ID_DIALOG_SHOW
            MENUITEM "Hide",      ID_DIALOG_HIDE
    POPUP "&Help"
        BEGIN
            MENUITEM "&About",    ID_HELP_ABOUT
        END
END
///////////////////////////////////////////////////////
IDD_TOOLBAR DIALOGEX 0, 0, 98, 52

STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION

EXSTYLE WS_EX_TOOLWINDOW

CAPTION "Dialog Toolbar"

FONT 8, "MS Sans Serif"

BEGIN
    PUSHBUTTON "&Press This Button",IDC_PRESS,7,7,84,14
    PUSHBUTTON "&Or This One",      IDC_OTHER,7,31,84,14
END
//=================================== 
You forgot 'END' in menu definition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BEGIN
    POPUP "&File"
        BEGIN
            MENUITEM "E&xit",     ID_FILE_EXIT
        END
    POPUP "&Toolbar"
        BEGIN
            MENUITEM "Show",      ID_DIALOG_SHOW
            MENUITEM "Hide",      ID_DIALOG_HIDE
        END // here
    POPUP "&Help"
        BEGIN
            MENUITEM "&About",    ID_HELP_ABOUT
        END
END
WOW!!! thank you so much @Null i,'ve never realized the error is somewhere else !!! hahaha now i can move to the next lesson :DDD
Topic archived. No new replies allowed.