m_ps is a public member variable of type PAINTSTRUCT. It is the PAINTSTRUCT that is passed to and filled out by CWnd::BeginPaint.
The PAINTSTRUCT contains information that the application uses to paint the client area of the window associated with a CPaintDC object.
The PAINTSTRUCT structure looks like this:
typedef struct tagPAINTSTRUCT {
HDC hdc;
BOOL fErase;
RECT rcPaint;
BOOL fRestore;
BOOL fIncUpdate;
BYTE rgbReserved[16];
} PAINTSTRUCT;
Note:
You can access the device-context handle through the PAINTSTRUCT. However, you can access the handle more directly through the m_hDC member variable, which CPaintDC inherits from CDC.