Implemented WM_PAINT for uiParent on Windows. It seems to work...
This commit is contained in:
parent
dc2967619c
commit
92474f94af
|
@ -115,6 +115,8 @@ static LRESULT CALLBACK parentWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
NMHDR *nm = (NMHDR *) lParam;
|
NMHDR *nm = (NMHDR *) lParam;
|
||||||
WINDOWPOS *wp = (WINDOWPOS *) lParam;
|
WINDOWPOS *wp = (WINDOWPOS *) lParam;
|
||||||
RECT r, margin;
|
RECT r, margin;
|
||||||
|
HDC dc;
|
||||||
|
PAINTSTRUCT ps;
|
||||||
|
|
||||||
// these must always be executed, even on the initial parent
|
// these must always be executed, even on the initial parent
|
||||||
// why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx
|
// why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx
|
||||||
|
@ -180,6 +182,13 @@ static LRESULT CALLBACK parentWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
margin.bottom = pp->marginBottom;
|
margin.bottom = pp->marginBottom;
|
||||||
resize(pp->mainControl, pp->hwnd, r, margin);
|
resize(pp->mainControl, pp->hwnd, r, margin);
|
||||||
return 0;
|
return 0;
|
||||||
|
case WM_PAINT:
|
||||||
|
dc = BeginPaint(pp->hwnd, &ps);
|
||||||
|
if (dc == NULL)
|
||||||
|
logLastError("TODO write this");
|
||||||
|
paintControlBackground(pp->hwnd, dc);
|
||||||
|
EndPaint(pp->hwnd, &ps);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
|
|
Loading…
Reference in New Issue