git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53589
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- if( HasFlag(wxRESIZE_BORDER) )
+ if ( HasFlag(wxRESIZE_BORDER) )
CreateGripper();
return true;
CreateGripper();
return true;
{
wxDialogBase::SetWindowStyleFlag(style);
{
wxDialogBase::SetWindowStyleFlag(style);
- if( HasFlag(wxRESIZE_BORDER) )
+ if ( HasFlag(wxRESIZE_BORDER) )
CreateGripper();
else
DestroyGripper();
CreateGripper();
else
DestroyGripper();
void wxDialog::CreateGripper()
{
void wxDialog::CreateGripper()
{
+ // just create it here, it will be positioned and shown later
m_hGripper = (WXHWND)::CreateWindow
(
wxT("SCROLLBAR"),
wxT(""),
m_hGripper = (WXHWND)::CreateWindow
(
wxT("SCROLLBAR"),
wxT(""),
- WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
+ WS_CHILD |
+ WS_CLIPSIBLINGS |
SBS_SIZEGRIP |
SBS_SIZEBOX |
SBS_SIZEBOXBOTTOMRIGHTALIGN,
SBS_SIZEGRIP |
SBS_SIZEBOX |
SBS_SIZEBOXBOTTOMRIGHTALIGN,
-
- // position the gripper correctly after creation
- ResizeGripper();
{
wxASSERT_MSG( m_hGripper, _T("shouldn't be called if we have no gripper") );
{
wxASSERT_MSG( m_hGripper, _T("shouldn't be called if we have no gripper") );
+ if ( show )
+ ResizeGripper();
+
::ShowWindow((HWND)m_hGripper, show ? SW_SHOW : SW_HIDE);
}
::ShowWindow((HWND)m_hGripper, show ? SW_SHOW : SW_HIDE);
}
case SIZE_RESTORED:
ShowGripper(true);
case SIZE_RESTORED:
ShowGripper(true);
- // fall through
-
- default:
- ResizeGripper();
+ case WM_WINDOWPOSCHANGED:
+ {
+ WINDOWPOS * const wp = wx_reinterpret_cast(WINDOWPOS *, lParam);
+ if ( wp->flags & SWP_SHOWWINDOW )
+ {
+ // we should only show it now to ensure that it's really
+ // positioned underneath under all the other controls in
+ // the dialog, if we showed it before it could overlap them
+ if ( m_hGripper )
+ ShowGripper(true);
+ }
+ }
+ break;
+
#ifndef __WXMICROWIN__
case WM_SETCURSOR:
// we want to override the busy cursor for modal dialogs:
#ifndef __WXMICROWIN__
case WM_SETCURSOR:
// we want to override the busy cursor for modal dialogs: