1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
HWND create_link(
HINSTANCE hInst,
HWND parent,
int name,
int left, int top,
int width, int height,
void *value
) {
INITCOMMONCONTROLSEX icmcnt;
icmcnt.dwSize = sizeof(INITCOMMONCONTROLSEX);
icmcnt.dwICC = ICC_LINK_CLASS;
InitCommonControlsEx(&icmcnt);
HWND obj = CreateWindowEx(
0,
WC_LINK,
value,
WS_VISIBLE|WS_CHILD|WS_TABSTOP,
left, top,
width, height,
parent,
(HMENU)name,
hInst,
NULL
);
if (obj) {
return obj;
} else {
handle_error((char*)"Link control could not be created!", true);
return 0;
}
}
| |