Possible Duplicate:
Why does Windres report a syntax error on my GROUPBOX statement?爲什麼Windres在我的GROUPBOX語句中報告語法錯誤?
注意:這是從昨天開始的轉貼。我真的沒有得到答案,並且在C++(等等)隊列中落後了。
我正在C++中試用Win32 API,特別是寫入資源文件。現在,我的整個項目工作得很好,菜單和標題以及一切。然而,當我爲一個模式對話框中添加此代碼rc文件:
IDD_ABOUT DIALOGEX 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,出現以下錯誤退出:40
windres: resource.rc:40: syntax error
線是指:
GROUPBOX "About this program...",IDC_STATIC,7,7,225,52
根據MSDN,
The GROUPBOX statement, which you can use only in a DIALOGEX statement, defines the text, identifier, dimensions, and attributes of a control window.
GROUPBOX text, id, x, y, width, height [, style [, extended-style]]
他們的例子:
GROUPBOX "Options", 101, 10, 10, 100, 100
我在做什麼錯?
`Windres`是GNU資源編譯器的權利嗎? MS資源編譯器`rc`處理你的資源文件就好了。 – 2011-01-24 20:13:54