A window receives this message through its WindowProc function.
LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // WM_PAINT WPARAM wParam, // not used LPARAM lParam // not used ); Parameters wParam This parameter is not used. lParam This parameter is not used.
The WM_PAINT message is generated by the system and 『should not be sent by an application』. To force a window to draw into a specific device context, use the WM_PRINT or WM_PRINTCLIENT message.
>だけど、確かwParamはたしかHDCを指してたような
For some common controls, the default WM_PAINT message processing checks the wParam parameter. If wParam is non-NULL, the control assumes that the value is an HDC and paints using that device context.