0

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.

sky
  • 522
  • 8
  • 13

1 Answers1

0

Did you try to put parenthesis?

#define IDR_OPBUTTON (_RESOURCE_ID + 10)
sergiol
  • 4,122
  • 4
  • 47
  • 81