I define resource IDs as below: #define _RESOURCE_ID 150 #define IDR_OPBUTTON _RESOURCE_ID + 10
When I use below code to change the text of button, it doesn't work: SetDlgItemText(hWnd, IDR_OPBUTTON, _T("-"));
But if I give it a number directly, it does work: #define IDR_OPBUTTON 160
Can anybody tell me why? Thanks in advance!
Also, I tried function GetDlgItemInt
for a textbox, it has the same behavior.
您是否尝试放入括号?
#define IDR_OPBUTTON (_RESOURCE_ID + 10)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.