Review the parameters passed to the CreateWindowEx function. nf-winuser-createwindowexa
The code posted above has omitted a required parameter for the new window's height.
E0167 argument of type "HWND" is incompatible with parameter of type "int"
Daniel Shepherd
246
Reputation points
I am on the tutorial on winprog.org, and I am on the article "creating controls at runtime", and my code gets errors. here is my code:
case WM_CREATE:
{
HFONT hfDefault;
HWND hEdit;
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL, 0, 0, 100, hWnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL);
}
errors:
Windows development | Windows API - Win32
Answer accepted by question author
-
RLWA32 50,836 Reputation points2021-07-25T02:34:20.17+00:00