return new LRESULT (findBrush (backPixel, OS.BS_SOLID));
int hBrush = findBrush (backPixel, OS.BS_SOLID); if ((state & DRAW_BACKGROUND) != 0) { RECT rect = new RECT (); OS.GetClientRect (handle, rect); int hOldBrush = OS.SelectObject (wParam, hBrush); OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY); OS.SelectObject (wParam, hOldBrush); } return new LRESULT (hBrush);
LRESULT wmColorChild (int wParam, int lParam) {	Control control = findBackgroundControl ();	if (control == null) {		if ((state & THEME_BACKGROUND) != 0) {			if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {				control = findThemeControl ();				if (control != null) {					RECT rect = new RECT ();					OS.GetClientRect (handle, rect);					OS.SetTextColor (wParam, getForegroundPixel ());					OS.SetBkColor (wParam, getBackgroundPixel ());					fillThemeBackground (wParam, control, rect);					OS.SetBkMode (wParam, OS.TRANSPARENT);					return new LRESULT (OS.GetStockObject (OS.NULL_BRUSH));				}			}		}		if (foreground == -1) return null;	}	if (control == null) control = this;	int forePixel = getForegroundPixel ();	int backPixel = control.getBackgroundPixel ();	OS.SetTextColor (wParam, forePixel);	OS.SetBkColor (wParam, backPixel);	if (control.backgroundImage != null) {		RECT rect = new RECT ();		OS.GetClientRect (handle, rect);		int hwnd = control.handle;		int hBitmap = control.backgroundImage.handle;		OS.MapWindowPoints (handle, hwnd, rect, 2);		POINT lpPoint = new POINT ();		OS.GetWindowOrgEx (wParam, lpPoint);		OS.SetBrushOrgEx (wParam, -rect.left - lpPoint.x, -rect.top - lpPoint.y, lpPoint);		int hBrush = findBrush (hBitmap, OS.BS_PATTERN);		if ((state & DRAW_BACKGROUND) != 0) {			int hOldBrush = OS.SelectObject (wParam, hBrush);			OS.MapWindowPoints (hwnd, handle, rect, 2);			OS.PatBlt (wParam, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);			OS.SelectObject (wParam, hOldBrush);		}		OS.SetBkMode (wParam, OS.TRANSPARENT);		return new LRESULT (hBrush);	}	return new LRESULT (findBrush (backPixel, OS.BS_SOLID));}