Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This message is sent by an application when the window background must be erased, for example, when a window is resized. The message is sent to prepare an invalidated portion of a window for painting.
WM_ERASEBKGND hdc= (HDC) wParam;
Parameters
Return Values
An application should return nonzero if it erases the background; otherwise, it should return zero.
Remarks
The DefWindowProcfunction erases the background by using the class background brush specified by the hbrBackgroundmember of the WNDCLASS. If hbrBackgroundis NULL, the application should process the WM_ERASEBKGND message and erase the background.
An application should return nonzero in response to WM_ERASEBKGND if it processes the message and erases the background; this indicates that no further erasing is required. If the application returns zero, the window will remain marked for erasing. (Typically, this indicates that the fErasemember of the PAINTSTRUCTstructure will be TRUE.)
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
BeginPaint, DefWindowProc, PAINTSTRUCT, WNDCLASS