Kinda stupid - I actually forgot how to handle buttons
Code:
HWND hBtn;
hBtn = CreateWindowEx(
0, //more or 'extended' styles
TEXT("BUTTON"), //'class' of control to create
TEXT("Submit"), //the control caption
WS_CHILD|WS_VISIBLE|BS_DEFPUSHBUTTON, //control style: how it looks
20, //control position: left
440, //control position: top
75, //control width
25, //control height
hGroupWarr, //parent window handle
(HMENU)BTN_SUBMIT, //control's ID
hThisInstance, //application instance
NULL
);
SendMessage(hBtn,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
In WM_COMMAND:
Code:
if (HIWORD(wParam) == BN_CLICKED) {
MessageBox(hwnd, "lol", "lol", MB_OK);
}
BTN_SUBMIT defined as:
Code:
#define BTN_SUBMIT 100
The messagebox doesnt pop up?