有谁知道WM_ERASEBKGND
消息的事件处理程序的默认实现(源代码)是什么?
答案 0 :(得分:2)
它基本上是这样的:
case WM_ERASEBKGND:
{
HBRUSH hBsh = reinterpret_cast<HBRUSH>(GetClassLongPtr(hWnd, GCL_HBRBACKGROUND));
if (!hBsh) return FALSE;
RECT rc;
GetClientRect(hWnd, &rc);
FillRect(reinterpret_cast<HDC>(wParam), &rc, hBsh);
return TRUE;
}