I've been looking through the documentation of
CreateWindow and CreateWindowEx and I can't seem to find the style to create a basic label with text.
it's probably in static, but then again i'm not too sure
Help would be appreciated.
Printable View
I've been looking through the documentation of
CreateWindow and CreateWindowEx and I can't seem to find the style to create a basic label with text.
it's probably in static, but then again i'm not too sure
Help would be appreciated.
What is a "basic label with text"? :confused:
it's like a textbox but with not white or boarders.. basically text to tell the user what the place is for.
http://kornelix.squarespace.com/stor...=1229895643489
like the textbeside the fields
Be sure you need a static common control (of class "static").
Take a look at Static Control Styles.
Here is an example where a label is created, with an input field on its right side:
Code:static HWND hwnd_st_u, hwnd_ed_u;
int x, w, y, h;
y = 10; h = 20;
x = 10; w = 50;
hwnd_st_u = CreateWindow("static", "ST_U",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
x, y, w, h,
hwnd, (HMENU)(501),
(HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
SetWindowText(hwnd_st_u, "User:");
x += w; w = 60;
hwnd_ed_u = CreateWindow("edit", "",
WS_CHILD | WS_VISIBLE | WS_TABSTOP
| ES_LEFT | WS_BORDER,
x, y, w, h,
hwnd, (HMENU)(502),
(HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
SetWindowText(hwnd_ed_u, "Bill");