1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: msw/toplevel.cpp
3 // Purpose: implements wxTopLevelWindow for MSW
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
9 // License: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
21 #pragma implementation "toplevel.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
33 #include "wx/toplevel.h"
34 #include "wx/string.h"
38 #include "wx/control.h"
41 #include "wx/os2/private.h"
43 // ----------------------------------------------------------------------------
44 // stubs for missing functions under MicroWindows
45 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 // ----------------------------------------------------------------------------
52 // list of all frames and modeless dialogs
53 wxWindowList wxModelessWindows
;
55 // the name of the default wxWindows class
56 extern void wxAssociateWinWithHandle( HWND hWnd
59 bool wxTopLevelWindowOS2::m_sbInitialized
= FALSE
;
60 wxWindow
* wxTopLevelWindowOS2::m_spHiddenParent
= NULL
;
62 // ============================================================================
63 // wxTopLevelWindowOS2 implementation
64 // ============================================================================
66 BEGIN_EVENT_TABLE(wxTopLevelWindowOS2
, wxTopLevelWindowBase
)
67 EVT_ACTIVATE(wxTopLevelWindowOS2::OnActivate
)
70 // ============================================================================
71 // wxTopLevelWindowMSW implementation
72 // ============================================================================
75 MRESULT EXPENTRY
wxDlgProc( HWND
WXUNUSED(hWnd
)
77 ,MPARAM
WXUNUSED(wParam
)
78 ,MPARAM
WXUNUSED(lParam
)
85 // For this message, returning TRUE tells system to set focus to
86 // the first control in the dialog box, but we set the focus
87 // ourselves, however in OS/2 we must return true to enable the dialog
92 // For all the other ones, FALSE means that we didn't process the
95 return (MRESULT
)FALSE
;
99 // ----------------------------------------------------------------------------
100 // wxTopLevelWindowOS2 creation
101 // ----------------------------------------------------------------------------
103 void wxTopLevelWindowOS2::Init()
105 m_bIconized
= m_bMaximizeOnShow
= FALSE
;
108 // Unlike (almost?) all other windows, frames are created hidden
113 // Data to save/restore when calling ShowFullScreen
115 m_lFsOldWindowStyle
= 0;
116 m_bFsIsMaximized
= FALSE
;
117 m_bFsIsShowing
= FALSE
;
119 m_hFrame
= NULLHANDLE
;
120 memset(&m_vSwp
, 0, sizeof(SWP
));
121 memset(&m_vSwpClient
, 0, sizeof(SWP
));
122 m_pWinLastFocused
= (wxWindow
*)NULL
;
123 } // end of wxTopLevelWindowIOS2::Init
125 void wxTopLevelWindowOS2::OnActivate(
126 wxActivateEvent
& rEvent
129 if (rEvent
.GetActive())
132 // Restore focus to the child which was last focused
134 wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), m_hWnd
);
136 wxWindow
* pParent
= m_pWinLastFocused
? m_pWinLastFocused
->GetParent()
143 wxSetFocusToChild( pParent
150 // Remember the last focused child if it is our child
152 m_pWinLastFocused
= FindFocus();
155 // So we NULL it out if it's a child from some other frame
157 wxWindow
* pWin
= m_pWinLastFocused
;
161 if (pWin
->IsTopLevel())
165 m_pWinLastFocused
= NULL
;
169 pWin
= pWin
->GetParent();
172 wxLogTrace(_T("focus"),
173 _T("wxTLW %08x deactivated, last focused: %08x."),
175 m_pWinLastFocused
? GetHwndOf(m_pWinLastFocused
)
179 } // end of wxTopLevelWindowOS2::OnActivate
181 WXDWORD
wxTopLevelWindowOS2::OS2GetStyle(
183 , WXDWORD
* pdwExflags
186 long lMsflags
= wxWindow::OS2GetStyle( (lStyle
& ~wxBORDER_MASK
) | wxBORDER_NONE
190 if (lStyle
== wxDEFAULT_FRAME_STYLE
)
191 lMsflags
|= FCF_SIZEBORDER
| FCF_TITLEBAR
| FCF_SYSMENU
|
192 FCF_MINMAX
| FCF_TASKLIST
;
195 if ((lStyle
& wxCAPTION
) == wxCAPTION
)
196 lMsflags
|= FCF_TASKLIST
;
198 lMsflags
|= FCF_NOMOVEWITHOWNER
;
200 if ((lStyle
& wxVSCROLL
) == wxVSCROLL
)
201 lMsflags
|= FCF_VERTSCROLL
;
202 if ((lStyle
& wxHSCROLL
) == wxHSCROLL
)
203 lMsflags
|= FCF_HORZSCROLL
;
204 if (lStyle
& wxMINIMIZE_BOX
)
205 lMsflags
|= FCF_MINBUTTON
;
206 if (lStyle
& wxMAXIMIZE_BOX
)
207 lMsflags
|= FCF_MAXBUTTON
;
208 if (lStyle
& wxTHICK_FRAME
)
209 lMsflags
|= FCF_DLGBORDER
;
210 if (lStyle
& wxSYSTEM_MENU
)
211 lMsflags
|= FCF_SYSMENU
;
212 if (lStyle
& wxCAPTION
)
213 lMsflags
|= FCF_TASKLIST
;
214 if (lStyle
& wxCLIP_CHILDREN
)
216 // Invalid for frame windows under PM
219 if (lStyle
& wxTINY_CAPTION_VERT
)
220 lMsflags
|= FCF_TASKLIST
;
221 if (lStyle
& wxTINY_CAPTION_HORIZ
)
222 lMsflags
|= FCF_TASKLIST
;
224 if ((lStyle
& wxTHICK_FRAME
) == 0)
225 lMsflags
|= FCF_BORDER
;
226 if (lStyle
& wxFRAME_TOOL_WINDOW
)
227 *pdwExflags
= kFrameToolWindow
;
229 if (lStyle
& wxSTAY_ON_TOP
)
230 lMsflags
|= FCF_SYSMODAL
;
233 } // end of wxTopLevelWindowOS2::OS2GetCreateWindowFlags
235 WXHWND
wxTopLevelWindowOS2::OS2GetParent() const
238 // For the frames without wxFRAME_FLOAT_ON_PARENT style we should use NULL
239 // parent HWND or it would be always on top of its parent which is not what
240 // we usually want (in fact, we only want it for frames with the
241 // wxFRAME_FLOAT_ON_PARENT flag)
245 if (HasFlag(wxFRAME_FLOAT_ON_PARENT
) )
247 pParent
= GetParent();
249 // this flag doesn't make sense then and will be ignored
250 wxASSERT_MSG( pParent
,
251 _T("wxFRAME_FLOAT_ON_PARENT but no parent?") );
253 else // don't float on parent, must not be owned
257 if (HasFlag(wxFRAME_NO_TASKBAR
) && !pParent
)
259 if (!m_spHiddenParent
)
261 m_spHiddenParent
= new wxTopLevelWindowOS2(NULL
, -1, _T(""));
264 // We shouldn't leave it in wxTopLevelWindows or we wouldn't
265 // terminate the app when the last user-created frame is deleted --
266 // see ~wxTopLevelWindowMSW
268 wxTopLevelWindows
.DeleteObject(m_spHiddenParent
);
270 pParent
= m_spHiddenParent
;
272 return pParent
? pParent
->GetHWND() : NULL
;
273 } // end of wxTopLevelWindowOS2::OS2GetParent
275 bool wxTopLevelWindowOS2::CreateDialog(
277 , const wxString
& rsTitle
278 , const wxPoint
& rPos
279 , const wxSize
& rSize
282 wxWindow
* pParent
= GetParent();
285 // For the dialogs without wxDIALOG_NO_PARENT style, use the top level
286 // app window as parent - this avoids creating modal dialogs without
289 if (!pParent
&& !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT
))
291 pParent
= wxTheApp
->GetTopWindow();
296 // Don't use transient windows as parents, this is dangerous as it
297 // can lead to a crash if the parent is destroyed before the child
299 // also don't use the window which is currently hidden as then the
300 // dialog would be hidden as well
301 if ((pParent
->GetExtraStyle() & wxWS_EX_TRANSIENT
) ||
313 hWndOwner
= GetHwndOf(pParent
);
315 hWndOwner
= HWND_DESKTOP
;
317 hWndDlg
= ::WinLoadDlg( HWND_DESKTOP
321 ,(ULONG
)ulDlgTemplate
325 m_hWnd
= (WXHWND
) hWndDlg
;
329 wxFAIL_MSG(_("Did you forget to include wx/os2/wx.rc in your resources?"));
331 wxLogSysError(_("Can't create dialog using template '%ul'"), ulDlgTemplate
);
337 // Move the dialog to its initial position without forcing repainting
344 if (!OS2GetCreateWindowCoords( rPos
352 nX
= nWidth
= (int)CW_USEDEFAULT
;
356 // We can't use CW_USEDEFAULT here as we're not calling CreateWindow()
357 // and passing CW_USEDEFAULT to MoveWindow() results in resizing the
358 // window to (0, 0) size which breaks quite a lot of things, e.g. the
359 // sizer calculation in wxSizer::Fit()
361 if (nWidth
== (int)CW_USEDEFAULT
)
364 // The exact number doesn't matter, the dialog will be resized
365 // again soon anyhow but it should be big enough to allow
366 // calculation relying on "totalSize - clientSize > 0" work, i.e.
367 // at least greater than the title bar height
369 nWidth
= nHeight
= 100;
371 if (nX
== (int)CW_USEDEFAULT
)
374 // Centre it on the screen - what else can we do?
376 wxSize vSizeDpy
= wxGetDisplaySize();
378 nX
= (vSizeDpy
.x
- nWidth
) / 2;
379 nY
= (vSizeDpy
.y
- nHeight
) / 2;
381 m_backgroundColour
.Set(wxString("LIGHT GREY"));
383 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
385 if (!::WinSetPresParam( m_hWnd
394 ::WinSetWindowPos( GetHwnd()
400 ,SWP_MOVE
| SWP_SIZE
| SWP_ZORDER
| SWP_SHOW
| SWP_ACTIVATE
402 ::WinQueryWindowPos(GetHwnd(), GetSwp());
406 } // end of wxTopLevelWindowOS2::CreateDialog
408 bool wxTopLevelWindowOS2::CreateFrame(
409 const wxString
& rsTitle
410 , const wxPoint
& rPos
411 , const wxSize
& rSize
415 WXDWORD lFlags
= OS2GetCreateWindowFlags(&lExflags
);
416 long lStyle
= GetWindowStyleFlag();
419 int nWidth
= rSize
.x
;
420 int nHeight
= rSize
.y
;
421 ULONG ulStyleFlags
= 0L;
424 wxWindow
* pParent
= GetParent();
430 hParent
= GetHwndOf(pParent
);
432 hParent
= HWND_DESKTOP
;
434 if ((lStyle
& wxMINIMIZE
) || (lStyle
& wxICONIZE
))
435 ulStyleFlags
|= WS_MINIMIZED
;
436 if (lStyle
& wxMAXIMIZE
)
437 ulStyleFlags
|= WS_MAXIMIZED
;
440 // Clear the visible flag, we always call show
442 ulStyleFlags
&= (unsigned long)~WS_VISIBLE
;
446 // Create the frame window: We break ranks with other ports now
447 // and instead of calling down into the base wxWindow class' OS2Create
448 // we do all our own stuff here. We will set the needed pieces
449 // of wxWindow manually, here.
452 hFrame
= ::WinCreateStdWindow( hParent
453 ,ulStyleFlags
// frame-window style
454 ,(PULONG
)&lFlags
// window style
455 ,(PSZ
)wxFrameClassName
// class name
456 ,(PSZ
)rsTitle
.c_str() // window title
457 ,0L // default client style
458 ,NULLHANDLE
// resource in executable file
460 ,&hClient
// receives client window handle
464 vError
= ::WinGetLastError(vHabmain
);
465 sError
= wxPMErrorToStr(vError
);
466 wxLogError("Error creating frame. Error: %s\n", sError
);
471 // wxWindow class' m_hWnd set here and needed associations
475 wxAssociateWinWithHandle(m_hWnd
, this);
476 wxAssociateWinWithHandle(m_hFrame
, this);
478 m_backgroundColour
.Set(wxString("MEDIUM GREY"));
480 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
482 if (!::WinSetPresParam( m_hWnd
488 vError
= ::WinGetLastError(vHabmain
);
489 sError
= wxPMErrorToStr(vError
);
490 wxLogError("Error creating frame. Error: %s\n", sError
);
495 // Now need to subclass window. Instead of calling the SubClassWin in wxWindow
496 // we manually subclass here because we don't want to use the main wxWndProc
499 m_fnOldWndProc
= (WXFARPROC
) ::WinSubclassWindow(m_hFrame
, (PFNWP
)wxFrameMainWndProc
);
502 // Now size everything. If adding a menu the client will need to be resized.
507 nY
= pParent
->GetSize().y
- (nY
+ nHeight
);
513 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
514 nY
= vRect
.yTop
- (nY
+ nHeight
);
516 if (!::WinSetWindowPos( m_hFrame
522 ,SWP_SIZE
| SWP_MOVE
| SWP_ACTIVATE
| SWP_ZORDER
525 vError
= ::WinGetLastError(vHabmain
);
526 sError
= wxPMErrorToStr(vError
);
527 wxLogError("Error sizing frame. Error: %s\n", sError
);
530 lStyle
= ::WinQueryWindowULong( m_hWnd
533 lStyle
|= WS_CLIPCHILDREN
;
534 ::WinSetWindowULong( m_hWnd
539 } // end of wxTopLevelWindowOS2::CreateFrame
541 bool wxTopLevelWindowOS2::Create(
544 , const wxString
& rsTitle
545 , const wxPoint
& rPos
546 , const wxSize
& rSize
548 , const wxString
& rsName
555 m_windowStyle
= lStyle
;
557 m_windowId
= vId
== -1 ? NewControlId() : vId
;
558 wxTopLevelWindows
.Append(this);
560 pParent
->AddChild(this);
562 if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG
)
565 // We have different dialog templates to allows creation of dialogs
566 // with & without captions under OS2indows, resizeable or not (but a
567 // resizeable dialog always has caption - otherwise it would look too
572 if (lStyle
& wxRESIZE_BORDER
)
573 ulDlgTemplate
= (ULONG
)kResizeableDialog
;
574 else if (lStyle
& wxCAPTION
)
575 ulDlgTemplate
= (ULONG
)kCaptionDialog
;
577 ulDlgTemplate
= (ULONG
)kNoCaptionDialog
;
578 return CreateDialog( ulDlgTemplate
586 return CreateFrame( rsTitle
591 } // end of wxTopLevelWindowOS2::Create
593 wxTopLevelWindowOS2::~wxTopLevelWindowOS2()
595 wxTopLevelWindows
.DeleteObject(this);
597 if (wxModelessWindows
.Find(this))
598 wxModelessWindows
.DeleteObject(this);
601 // If this is the last top-level window, exit.
603 if (wxTheApp
&& (wxTopLevelWindows
.Number() == 0))
605 wxTheApp
->SetTopWindow(NULL
);
606 if ( wxTheApp
->GetExitOnFrameDelete() )
608 ::WinPostMsg(NULL
, WM_QUIT
, 0, 0);
611 } // end of wxTopLevelWindowOS2::~wxTopLevelWindowOS2
613 // ----------------------------------------------------------------------------
614 // wxTopLevelWindowOS2 client size
615 // ----------------------------------------------------------------------------
617 void wxTopLevelWindowOS2::DoSetClientSize(
623 // Call GetClientAreaOrigin() to take the toolbar into account
625 wxPoint vPt
= GetClientAreaOrigin();
630 wxWindow::DoSetClientSize( nWidth
633 } // end of wxTopLevelWindowOS2::DoSetClientSize
635 void wxTopLevelWindowOS2::DoGetClientSize(
640 wxWindow::DoGetClientSize( pnX
644 wxPoint vPt
= GetClientAreaOrigin();
651 } // end of wxTopLevelWindowOS2::DoGetClientSize
653 // ----------------------------------------------------------------------------
654 // wxTopLevelWindowOS2 showing
655 // ----------------------------------------------------------------------------
657 void wxTopLevelWindowOS2::DoShowWindow(
661 ::WinShowWindow(m_hFrame
, (BOOL
)(nShowCmd
& SWP_SHOW
));
664 // Need to artificially send a size event as wxApps often expect to do some
665 // final child control sizing
667 m_bIconized
= nShowCmd
== SWP_MINIMIZE
;
668 } // end of wxTopLevelWindowOS2::DoShowWindow
670 bool wxTopLevelWindowOS2::Show(
680 if (m_bMaximizeOnShow
)
682 nShowCmd
= SWP_MAXIMIZE
;
683 m_bMaximizeOnShow
= FALSE
;
694 DoShowWindow(nShowCmd
);
698 wxActivateEvent
vEvent(wxEVT_ACTIVATE
, TRUE
, m_windowId
);
700 ::WinQueryWindowPos(m_hFrame
, &vSwp
);
701 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
702 ::WinQueryWindowPos(m_hWnd
, &m_vSwpClient
);
703 ::WinSendMsg(m_hFrame
, WM_UPDATEFRAME
, (MPARAM
)~0, 0);
704 ::WinQueryWindowPos(m_hWnd
, &vSwp
);
705 ::WinEnableWindow(m_hFrame
, TRUE
);
708 // Deal with children
710 MoveChildren(m_vSwpClient
.cy
- vSwp
.cy
);
711 vEvent
.SetEventObject(this);
712 GetEventHandler()->ProcessEvent(vEvent
);
717 // Try to highlight the correct window (the parent)
721 HWND hWndParent
= GetHwndOf(GetParent());
723 ::WinQueryWindowPos(hWndParent
, &vSwp
);
724 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
725 ::WinEnableWindow(hWndParent
, TRUE
);
729 } // end of wxTopLevelWindowOS2::Show
731 // ----------------------------------------------------------------------------
732 // wxTopLevelWindowOS2 maximize/minimize
733 // ----------------------------------------------------------------------------
735 void wxTopLevelWindowOS2::Maximize(
742 // Just maximize it directly
744 DoShowWindow(bMaximize
? SWP_MAXIMIZE
: SWP_RESTORE
);
749 // We can't maximize the hidden frame because it shows it as well, so
750 // just remember that we should do it later in this case
752 m_bMaximizeOnShow
= TRUE
;
754 } // end of wxTopLevelWindowOS2::Maximize
756 bool wxTopLevelWindowOS2::IsMaximized() const
760 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
761 return (m_vSwp
.fl
& SWP_MAXIMIZE
);
762 } // end of wxTopLevelWindowOS2::IsMaximized
764 void wxTopLevelWindowOS2::Iconize(
768 DoShowWindow(bIconize
? SWP_MINIMIZE
: SWP_RESTORE
);
769 } // end of wxTopLevelWindowOS2::Iconize
771 bool wxTopLevelWindowOS2::IsIconized() const
773 // also update the current state
774 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
775 if (m_vSwp
.fl
& SWP_MINIMIZE
)
776 ((wxTopLevelWindow
*)this)->m_bIconized
= TRUE
;
778 ((wxTopLevelWindow
*)this)->m_bIconized
= FALSE
;
780 } // end of wxTopLevelWindowOS2::IsIconized
782 void wxTopLevelWindowOS2::Restore()
784 DoShowWindow(SWP_RESTORE
);
785 } // end of wxTopLevelWindowOS2::Restore
787 // generate an artificial resize event
788 void wxTopLevelWindowOS2::SendSizeEvent()
792 RECTL vRect
= wxGetWindowRect(GetHwnd());
794 (void)::WinPostMsg( m_hFrame
796 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
797 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
800 } // end of wxTopLevelWindowOS2::SendSizeEvent
802 // ----------------------------------------------------------------------------
803 // wxTopLevelWindowOS2 fullscreen
804 // ----------------------------------------------------------------------------
806 bool wxTopLevelWindowOS2::ShowFullScreen(
816 m_bFsIsShowing
= TRUE
;
820 // Zap the frame borders
824 // Save the 'normal' window lStyle
826 m_lFsOldWindowStyle
= ::WinQueryWindowULong( (HWND
)GetHWND()
831 // Save the old position, width & height, maximize state
833 m_vFsOldSize
= GetRect();
834 m_bFsIsMaximized
= IsMaximized();
837 // Decide which window lStyle flags to turn off
839 LONG lNewStyle
= m_lFsOldWindowStyle
;
842 if (lStyle
& wxFULLSCREEN_NOBORDER
)
843 lOffFlags
|= FCF_BORDER
;
844 if (lStyle
& wxFULLSCREEN_NOCAPTION
)
845 lOffFlags
|= (FCF_TASKLIST
| FCF_SYSMENU
);
847 lNewStyle
&= (~lOffFlags
);
850 // Change our window style to be compatible with full-screen mode
852 ::WinSetWindowULong( (HWND
)GetHWND()
858 // Resize to the size of the desktop
862 RECTL vRect
= wxGetWindowRect(HWND_DESKTOP
);
864 nWidth
= vRect
.xRight
- vRect
.xLeft
;
865 nHeight
= vRect
.yTop
- vRect
.yBottom
;
872 // Now flush the window style cache and actually go full-screen
874 ::WinSetWindowPos( m_hFrame
883 wxSizeEvent
vEvent( wxSize( nWidth
889 GetEventHandler()->ProcessEvent(vEvent
);
897 m_bFsIsShowing
= FALSE
;
898 Maximize(m_bFsIsMaximized
);
899 ::WinSetWindowULong( (HWND
)GetHWND()
903 ::WinSetWindowPos( m_hFrame
913 } // end of wxTopLevelWindowOS2::ShowFullScreen
915 // ----------------------------------------------------------------------------
916 // wxTopLevelWindowOS2 misc
917 // ----------------------------------------------------------------------------
919 void wxTopLevelWindowOS2::SetIcon(
923 SetIcons(wxIconBundle(rIcon
));
924 } // end of wxTopLevelWindowOS2::SetIcon
926 void wxTopLevelWindowOS2::SetIcons(
927 const wxIconBundle
& rIcons
933 wxTopLevelWindowBase::SetIcons(rIcons
);
935 const wxIcon
& vIcon
= rIcons
.GetIcon(wxSize(32, 32));
937 if (vIcon
.Ok() && vIcon
.GetWidth() == 32 && vIcon
.GetHeight() == 32)
939 ::WinSendMsg( m_hFrame
941 ,(MPARAM
)((HPOINTER
)vIcon
.GetHICON())
944 ::WinSendMsg( m_hFrame
950 } // end of wxTopLevelWindowOS2::SetIcon
952 bool wxTopLevelWindowOS2::EnableCloseButton(
957 // Get system (a.k.a. window) menu
959 HMENU hMenu
= ::WinWindowFromID(m_hFrame
, FID_SYSMENU
);
963 wxLogLastError(_T("GetSystemMenu"));
968 // Enabling/disabling the close item from it also automatically
969 // disables/enables the close title bar button
972 (void)::WinSendMsg( hMenu
974 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
975 ,MPFROM2SHORT(MIA_DISABLED
, FALSE
)
978 (void)::WinSendMsg( hMenu
980 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
981 ,MPFROM2SHORT(MIA_DISABLED
, MIA_DISABLED
)
985 // Update appearance immediately
987 ::WinSendMsg( m_hFrame
993 } // end of wxTopLevelWindowOS2::EnableCloseButton