We usually assign the button id by #define BUTTON_ID 1001.Is it possible to assign the id of button as parameter of function? this is my code:
HWND createButton(HWND hWnd, HINSTANCE hInst, BUTTON_ID1) {
return CreateWindow(L"button", L"Label",
WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,
100, 200,
50, 20,
hWnd, (HMENU)BUTTON_ID1,
hInst, NULL);
}
If yes, how to do that? Any help I would appreciate!
Ahh, never mind. Since the datatype is HMENU then I'll set
HMENU as the parameter. Sorry guys.