git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33076
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Added "orient" parameter to wxMDIParentFrame::Tile()
- wxTextCtrl with wxTE_RICH2 style now uses RichEdit 4.1 if available
- fix handling Alt-key events in wxComboBox (reported by Joakim Roubert)
- Added "orient" parameter to wxMDIParentFrame::Tile()
- wxTextCtrl with wxTE_RICH2 style now uses RichEdit 4.1 if available
- fix handling Alt-key events in wxComboBox (reported by Joakim Roubert)
+- wxWindow::Refresh() refreshes the window children as well
\func{virtual void}{Refresh}{\param{bool}{ eraseBackground = {\tt true}}, \param{const wxRect* }{rect
= NULL}}
\func{virtual void}{Refresh}{\param{bool}{ eraseBackground = {\tt true}}, \param{const wxRect* }{rect
= NULL}}
-Causes an event to be generated to repaint the
-window.
+Causes this window, and all of its children recursively, to be repainted. Note
+that repainting doesn't happen immediately but only during the next event loop
+iteration, if you need to update the window immediately you should use
+\helpref{Update}{wxwindowupdate} instead.
Calling this method immediately repaints the invalidated area of the window
while this would usually only happen when the flow of control returns to the
event loop. Notice that this function doesn't refresh the window and does
Calling this method immediately repaints the invalidated area of the window
while this would usually only happen when the flow of control returns to the
event loop. Notice that this function doesn't refresh the window and does
-nothing if the window hadn't been already repainted. Use
+nothing if the window hadn't been already repainted. Use
\helpref{Refresh}{wxwindowrefresh} first if you want to immediately redraw the
window unconditionally.
\helpref{Refresh}{wxwindowrefresh} first if you want to immediately redraw the
window unconditionally.
HWND hWnd = GetHwnd();
if ( hWnd )
{
HWND hWnd = GetHwnd();
if ( hWnd )
{
+ RECT mswRect;
+ const RECT *pRect;
mswRect.left = rect->x;
mswRect.top = rect->y;
mswRect.right = rect->x + rect->width;
mswRect.bottom = rect->y + rect->height;
mswRect.left = rect->x;
mswRect.top = rect->y;
mswRect.right = rect->x + rect->width;
mswRect.bottom = rect->y + rect->height;
- ::InvalidateRect(hWnd, &mswRect, eraseBack);
- ::InvalidateRect(hWnd, NULL, eraseBack);
+ {
+ pRect = NULL;
+ }
+
+ UINT flags = RDW_INVALIDATE | RDW_ALLCHILDREN;
+ if ( eraseBack )
+ flags |= RDW_ERASE;
+
+ ::RedrawWindow(hWnd, pRect, NULL, flags);