标签:begin The div 分享 image return struct for llb
方法一: hdc = BeginPaint(hwnd, &ps); //使用GDI函数 EndPaint(hwnd, &ps); 方法二: hdc = GetDc(hwnd); //使用GDI函数 ReleaseDc(hwnd, hdc)
消息循环代码如下:
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; switch (message) /* handle the messages */ { case WM_DESTROY: PostQuitMessage (0); /* send a WM_QUIT to the message queue */ break; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); TextOut(hdc,0,0,"hello world",11); EndPaint(hwnd, &ps); break; default: /* for messages that we don‘t deal with */ return DefWindowProc (hwnd, message, wParam, lParam); } return 0; }
标签:begin The div 分享 image return struct for llb
原文地址:https://www.cnblogs.com/YiShen/p/9744565.html