一、首先创建一个"Hello Word!" Win32 Application程序
二、删除WM_PAINT消息中的以下内容
// TODO: Add any drawing code here...
RECT rt;
GetClientRect(hWnd, &rt);
DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
三、修改函数
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASS wc;
//wc.cbSize = sizeof(WNDCLASS);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance, IDI_APPLICATION);
wc.h...[ 查看全文 ]