mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2024-11-24 11:25:30 +00:00
Update tabcontrol.c
This commit is contained in:
parent
07cf1af1ee
commit
f6e5397654
@ -7,6 +7,7 @@
|
||||
#define BTN_ADD 3
|
||||
#define BTN_DEL 4
|
||||
#define BTN_CLR 5
|
||||
#define MAX_TAB_LEN 15
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
HWND hTab, hEdit;
|
||||
@ -41,7 +42,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam) {
|
||||
|
||||
TCITEMW tie;
|
||||
wchar_t text[250];
|
||||
wchar_t text[4];
|
||||
LRESULT count, id;
|
||||
INITCOMMONCONTROLSEX icex;
|
||||
|
||||
@ -59,6 +60,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg,
|
||||
hEdit = CreateWindowW(WC_EDITW, NULL, WS_CHILD | WS_VISIBLE | WS_BORDER,
|
||||
250, 20, 100, 25, hwnd, (HMENU) ID_EDIT, NULL, NULL);
|
||||
|
||||
SendMessage(hEdit, EM_SETLIMITTEXT, MAX_TAB_LEN, 0);
|
||||
|
||||
CreateWindowW(WC_BUTTONW, L"Add", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
|
||||
250, 50, 100, 25, hwnd, (HMENU) BTN_ADD, NULL, NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user