tks guys i've made a cute window now, but met some problems when facing messages. here is my callback function to deal with messages:
Code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg)
{
case WM_PAINT:
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint(hwnd, &ps);
TextOut(hdc, 100, 100, "Holla !", 10);
EndPaint(hwnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_CLOSE:
DestroyWindow(hwnd);
break;
default:
return DefWindowProc(hwnd, iMsg, wParam, lParam);
}
return 0;
}
when i compile the program it reports an error like this:
[Linker error] undefined reference to `TextOutA@20'
i'm with Dev-C++, anyone help me ? tks !!!