Code:
case WM_CREATE:
{
HFONT hfDefault;
HWND hEdit;
// Took our horizontal viewing
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "",
WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL,
0, 0, 100, 100, hWnd, (HMENU)IDC_PRIME_EDIT, GetModuleHandle(NULL),
NULL);
// Just in case...
if(hEdit == NULL)
{
MessageBox(hWnd, "Could not create edit box.", "Error", MB_OK | MB_ICONERROR);
}
hfDefault = GetStockObject(DEFAULT_GUI_FONT);
SendMessage(hEdit, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE, 0));
}
break;
The error it gave me was: 42 C:\Documents and Settings\Chris\My Documents\Programming\Dingua\main.cpp invalid conversion from `void*' to `HFONT__*'
Why?