Why is Windres reporting a syntax error in my GROUPBOX statement?

I am experimenting with the Win32 API in C ++, in particular with writing resource files. Now my whole project worked perfectly, menus and titles and all that. However, when I add this code for the modal dialog box to the .rc file:

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 theForger", IDC_STATIC,16,18,144,33
END

Windres exits with the following error:

windres: resource.rc:40: syntax error

Line 40 refers to:

GROUPBOX "About this program...",IDC_STATIC,7,7,225,52

According to MSDN ,

The GROUPBOX operator, which you can use only in the DIALOGEX statement, defines the text, identifier, sizes and attributes of the control window.

Text GROUPBOX, id, x, y, width, height [, style [, extended-style]]

Example:

GROUPBOX "Options", 101, 10, 10, 100, 100

What am I doing wrong?

+3
source share
2 answers

DIALOGEX ( @YeenFei), , , , IDC_STATIC .

GROUPBOX "About this program...",-1,7,7,225,52

, , .

SDK (6.1 7.1) . , , MFC. , MFC "afxres.h", .

IDOK IDCANCEL , , Platform SDK ( "winuser.h" ).

+4

,

DIALOGEX

+4

Source: https://habr.com/ru/post/1787379/


All Articles