The GetDC function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen. The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. The BeginPaint function prepares the specified window for painting and fills a PAINTSTRUCT structure with information about the painting. GetDC--客户区dc或整个桌面 GetWindowDC--整个窗口,包括客户区和非客户区 BeginPaint--需与EndPaint配对,只能在WM_PAINT中调用,用于自动裁剪更新区域,如果更新区域需要erase,则发送一个WM_ERASEBKGND消息
GetWindowDC--整个窗口,包括客户区和非客户区
BeginPaint--需与EndPaint配对,只能在WM_PAINT中调用,用于自动裁剪更新区域,如果更新区域需要erase,则发送一个WM_ERASEBKGND消息