http://wisdom.sakura.ne.jp/system/winapi/win32/win85.html
The second resource in the above sample fails.
/*Resource Script*/
KITTY DIALOG 10, 10, 100, 50
FONT12, "MS Gothic".
CAPTION "Magic nyanyan TARUTO" {
LTEXT "Exit\nAre you sure?",-1,5,5,90,20
PUSHBUTTON "OK", IDOK, 40, 35, 20, 10
PUSHBUTTON "Cancel", IDCANCEL, 65, 35, 30, 10
}
Synatx error in PUSHBUTTON in line 6 above.Also, if you set #defineIDOK1001
in #include"resource.h"
, it will work for now.Now, I can't recognize IDOK even if I press the OK button.
"Also, regarding this, ""Cancel"" in line 7 is also a syntax error."What's wrong?
I'm sorry.Please answer the wrong part and the correct description.
Thank you for your cooperation.
#include"resource.h"
to #defineIDOK1001
for now.
In the Windows SDK, IDOK
is reserved for 1
and IDCANCEL
is reserved for 2
.Manually #define
these constants are correct, but it is better to #include
the header file winres.h
provided by the SDK.
Now, I can't recognize IDOK even if I press the OK button.
This is because the ID assigned to the OK button (1001
in your code) on the resource does not match the ID that Windows expects from the OK button (1
mentioned earlier).
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
582 PHP ssh2_scp_send fails to send files as intended
578 Understanding How to Configure Google API Key
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.