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
;
61 // ============================================================================
62 // wxTopLevelWindowMSW implementation
63 // ============================================================================
66 MRESULT EXPENTRY
wxDlgProc( HWND
WXUNUSED(hWnd
)
68 ,MPARAM
WXUNUSED(wParam
)
69 ,MPARAM
WXUNUSED(lParam
)
72 if (uMessage
== WM_INITDLG
)
75 // For this message, returning TRUE tells system to set focus to the
76 // first control in the dialog box.
83 // For all the other ones, FALSE means that we didn't process the
86 return (MRESULT
)FALSE
;
90 // ----------------------------------------------------------------------------
91 // wxTopLevelWindowOS2 creation
92 // ----------------------------------------------------------------------------
94 void wxTopLevelWindowOS2::Init()
96 m_bIconized
= m_bMaximizeOnShow
= FALSE
;
99 // Unlike (almost?) all other windows, frames are created hidden
104 // Data to save/restore when calling ShowFullScreen
106 m_lFsOldWindowStyle
= 0;
107 m_bFsIsMaximized
= FALSE
;
108 m_bFsIsShowing
= FALSE
;
110 m_hFrame
= NULLHANDLE
;
111 memset(&m_vSwp
, 0, sizeof(SWP
));
112 memset(&m_vSwpClient
, 0, sizeof(SWP
));
113 } // end of wxTopLevelWindowIOS2::Init
115 long wxTopLevelWindowOS2::OS2GetCreateWindowFlags(
119 long lStyle
= GetWindowStyle();
122 if (lStyle
== wxDEFAULT_FRAME_STYLE
)
123 lMsflags
= FCF_SIZEBORDER
| FCF_TITLEBAR
| FCF_SYSMENU
|
124 FCF_MINMAX
| FCF_TASKLIST
;
127 if ((lStyle
& wxCAPTION
) == wxCAPTION
)
128 lMsflags
= FCF_TASKLIST
;
130 lMsflags
= FCF_NOMOVEWITHOWNER
;
132 if ((lStyle
& wxVSCROLL
) == wxVSCROLL
)
133 lMsflags
|= FCF_VERTSCROLL
;
134 if ((lStyle
& wxHSCROLL
) == wxHSCROLL
)
135 lMsflags
|= FCF_HORZSCROLL
;
136 if (lStyle
& wxMINIMIZE_BOX
)
137 lMsflags
|= FCF_MINBUTTON
;
138 if (lStyle
& wxMAXIMIZE_BOX
)
139 lMsflags
|= FCF_MAXBUTTON
;
140 if (lStyle
& wxTHICK_FRAME
)
141 lMsflags
|= FCF_DLGBORDER
;
142 if (lStyle
& wxSYSTEM_MENU
)
143 lMsflags
|= FCF_SYSMENU
;
144 if (lStyle
& wxCAPTION
)
145 lMsflags
|= FCF_TASKLIST
;
146 if (lStyle
& wxCLIP_CHILDREN
)
148 // Invalid for frame windows under PM
151 if (lStyle
& wxTINY_CAPTION_VERT
)
152 lMsflags
|= FCF_TASKLIST
;
153 if (lStyle
& wxTINY_CAPTION_HORIZ
)
154 lMsflags
|= FCF_TASKLIST
;
156 if ((lStyle
& wxTHICK_FRAME
) == 0)
157 lMsflags
|= FCF_BORDER
;
158 if (lStyle
& wxFRAME_TOOL_WINDOW
)
159 *plExflags
= kFrameToolWindow
;
161 if (lStyle
& wxSTAY_ON_TOP
)
162 lMsflags
|= FCF_SYSMODAL
;
165 } // end of wxTopLevelWindowOS2::OS2GetCreateWindowFlags
167 bool wxTopLevelWindowOS2::CreateDialog(
169 , const wxString
& rsTitle
170 , const wxPoint
& rPos
171 , const wxSize
& rSize
174 wxWindow
* pParent
= GetParent();
177 // For the dialogs without wxDIALOG_NO_PARENT style, use the top level
178 // app window as parent - this avoids creating modal dialogs without
181 if (!pParent
&& !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT
))
183 pParent
= wxTheApp
->GetTopWindow();
188 // Don't use transient windows as parents, this is dangerous as it
189 // can lead to a crash if the parent is destroyed before the child
191 // also don't use the window which is currently hidden as then the
192 // dialog would be hidden as well
193 if ((pParent
->GetExtraStyle() & wxWS_EX_TRANSIENT
) ||
205 hWndOwner
= GetHwndOf(pParent
);
207 hWndOwner
= HWND_DESKTOP
;
209 hWndDlg
= ::WinLoadDlg( HWND_DESKTOP
213 ,(ULONG
)ulDlgTemplate
217 m_hWnd
= (WXHWND
) hWndDlg
;
221 wxFAIL_MSG(_("Did you forget to include wx/os2/wx.rc in your resources?"));
223 wxLogSysError(_("Can't create dialog using template '%ul'"), ulDlgTemplate
);
229 // Move the dialog to its initial position without forcing repainting
236 if (!OS2GetCreateWindowCoords( rPos
244 nX
= nWidth
= (int)CW_USEDEFAULT
;
248 // We can't use CW_USEDEFAULT here as we're not calling CreateWindow()
249 // and passing CW_USEDEFAULT to MoveWindow() results in resizing the
250 // window to (0, 0) size which breaks quite a lot of things, e.g. the
251 // sizer calculation in wxSizer::Fit()
253 if (nWidth
== (int)CW_USEDEFAULT
)
256 // The exact number doesn't matter, the dialog will be resized
257 // again soon anyhow but it should be big enough to allow
258 // calculation relying on "totalSize - clientSize > 0" work, i.e.
259 // at least greater than the title bar height
261 nWidth
= nHeight
= 100;
263 if (nX
== (int)CW_USEDEFAULT
)
266 // Centre it on the screen - what else can we do?
268 wxSize vSizeDpy
= wxGetDisplaySize();
270 nX
= (vSizeDpy
.x
- nWidth
) / 2;
271 nY
= (vSizeDpy
.y
- nHeight
) / 2;
273 m_backgroundColour
.Set(wxString("LIGHT GREY"));
275 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
277 if (!::WinSetPresParam( m_hWnd
286 ::WinSetWindowPos( GetHwnd()
292 ,SWP_MOVE
| SWP_SIZE
| SWP_ZORDER
| SWP_SHOW
297 } // end of wxTopLevelWindowOS2::CreateDialog
299 bool wxTopLevelWindowOS2::CreateFrame(
300 const wxString
& rsTitle
301 , const wxPoint
& rPos
302 , const wxSize
& rSize
306 long lFlags
= OS2GetCreateWindowFlags(&lExflags
);
307 long lStyle
= GetWindowStyleFlag();
310 int nWidth
= rSize
.x
;
311 int nHeight
= rSize
.y
;
312 ULONG ulStyleFlags
= 0L;
315 wxWindow
* pParent
= GetParent();
321 hParent
= GetHwndOf(pParent
);
323 hParent
= HWND_DESKTOP
;
325 if ((lStyle
& wxMINIMIZE
) || (lStyle
& wxICONIZE
))
326 ulStyleFlags
|= WS_MINIMIZED
;
327 if (lStyle
& wxMAXIMIZE
)
328 ulStyleFlags
|= WS_MAXIMIZED
;
331 // Clear the visible flag, we always call show
333 ulStyleFlags
&= (unsigned long)~WS_VISIBLE
;
337 // Create the frame window: We break ranks with other ports now
338 // and instead of calling down into the base wxWindow class' OS2Create
339 // we do all our own stuff here. We will set the needed pieces
340 // of wxWindow manually, here.
343 hFrame
= ::WinCreateStdWindow( hParent
344 ,ulStyleFlags
// frame-window style
345 ,(PULONG
)&lFlags
// window style
346 ,(PSZ
)wxFrameClassName
// class name
347 ,(PSZ
)rsTitle
.c_str() // window title
348 ,0L // default client style
349 ,NULLHANDLE
// resource in executable file
351 ,&hClient
// receives client window handle
355 vError
= ::WinGetLastError(vHabmain
);
356 sError
= wxPMErrorToStr(vError
);
357 wxLogError("Error creating frame. Error: %s\n", sError
);
362 // wxWindow class' m_hWnd set here and needed associations
366 wxAssociateWinWithHandle(m_hWnd
, this);
367 wxAssociateWinWithHandle(m_hFrame
, this);
369 m_backgroundColour
.Set(wxString("MEDIUM GREY"));
371 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
373 if (!::WinSetPresParam( m_hWnd
379 vError
= ::WinGetLastError(vHabmain
);
380 sError
= wxPMErrorToStr(vError
);
381 wxLogError("Error creating frame. Error: %s\n", sError
);
386 // Now need to subclass window. Instead of calling the SubClassWin in wxWindow
387 // we manually subclass here because we don't want to use the main wxWndProc
390 m_fnOldWndProc
= (WXFARPROC
) ::WinSubclassWindow(m_hFrame
, (PFNWP
)wxFrameMainWndProc
);
393 // Now size everything. If adding a menu the client will need to be resized.
398 nY
= pParent
->GetSize().y
- (nY
+ nHeight
);
404 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
405 nY
= vRect
.yTop
- (nY
+ nHeight
);
407 if (!::WinSetWindowPos( m_hFrame
413 ,SWP_SIZE
| SWP_MOVE
| SWP_ACTIVATE
| SWP_ZORDER
416 vError
= ::WinGetLastError(vHabmain
);
417 sError
= wxPMErrorToStr(vError
);
418 wxLogError("Error sizing frame. Error: %s\n", sError
);
421 lStyle
= ::WinQueryWindowULong( m_hWnd
424 lStyle
|= WS_CLIPCHILDREN
;
425 ::WinSetWindowULong( m_hWnd
430 } // end of wxTopLevelWindowOS2::CreateFrame
432 bool wxTopLevelWindowOS2::Create(
435 , const wxString
& rsTitle
436 , const wxPoint
& rPos
437 , const wxSize
& rSize
439 , const wxString
& rsName
446 m_windowStyle
= lStyle
;
448 m_windowId
= vId
== -1 ? NewControlId() : vId
;
449 wxTopLevelWindows
.Append(this);
451 pParent
->AddChild(this);
453 if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG
)
456 // We have different dialog templates to allows creation of dialogs
457 // with & without captions under OS2indows, resizeable or not (but a
458 // resizeable dialog always has caption - otherwise it would look too
463 if (lStyle
& wxRESIZE_BORDER
)
464 ulDlgTemplate
= (ULONG
)kResizeableDialog
;
465 else if (lStyle
& wxCAPTION
)
466 ulDlgTemplate
= (ULONG
)kCaptionDialog
;
468 ulDlgTemplate
= (ULONG
)kNoCaptionDialog
;
469 return CreateDialog( ulDlgTemplate
477 return CreateFrame( rsTitle
482 } // end of wxTopLevelWindowOS2::Create
484 wxTopLevelWindowOS2::~wxTopLevelWindowOS2()
486 wxTopLevelWindows
.DeleteObject(this);
488 if (wxModelessWindows
.Find(this))
489 wxModelessWindows
.DeleteObject(this);
492 // If this is the last top-level window, exit.
494 if (wxTheApp
&& (wxTopLevelWindows
.Number() == 0))
496 wxTheApp
->SetTopWindow(NULL
);
497 if ( wxTheApp
->GetExitOnFrameDelete() )
499 ::WinPostMsg(NULL
, WM_QUIT
, 0, 0);
502 } // end of wxTopLevelWindowOS2::~wxTopLevelWindowOS2
505 // IF we have child controls in the Frame's client we need to alter
506 // the y position, because, OS/2 controls are positioned relative to
507 // wxWindows orgin (top left) not the OS/2 origin (bottom left)
509 void wxTopLevelWindowOS2::AlterChildPos()
512 // OS/2 is the only OS concerned about this
514 wxWindow
* pChild
= NULL
;
515 wxControl
* pCtrl
= NULL
;
521 // Auto layouts taken care of elsewhere
525 ::WinQueryWindowRect(GetHwnd(), &vRect
);
526 for (wxWindowList::Node
* pNode
= GetChildren().GetFirst();
528 pNode
= pNode
->GetNext())
530 wxWindow
* pChild
= pNode
->GetData();
532 ::WinQueryWindowPos(pChild
->GetHWND(), &vSwp
);
533 vSwp
.y
+= (vRect
.yTop
- m_vSwpClient
.cy
);
534 if (pChild
->IsKindOf(CLASSINFO(wxControl
)))
536 pCtrl
= wxDynamicCast(pChild
, wxControl
);
538 // Must deal with controls that have margins like ENTRYFIELD. The SWP
539 // struct of such a control will have and origin offset from its intended
540 // position by the width of the margins.
542 vSwp
.y
-= pCtrl
->GetYComp();
543 vSwp
.x
-= pCtrl
->GetXComp();
545 ::WinSetWindowPos( pChild
->GetHWND()
553 ::WinQueryWindowPos(pChild
->GetHWND(), &vSwp
);
556 ::WinQueryWindowPos(GetHwnd(), &m_vSwpClient
);
557 } // end of wxTopLevelWindowOS2::AlterChildPos
559 void wxTopLevelWindowOS2::UpdateInternalSize(
565 int nWidthAdjust
= 0;
566 int nHeightAdjust
= 0;
569 bool bNewYSize
= FALSE
;
570 bool bNewXSize
= FALSE
;
573 // Under OS/2, if we have a srolled window as the child, the
574 // scrollbars will be SIBLINGS of the scrolled window. So, in
575 // order to be able to display the scrollbars properly we have to
576 // resize the scrolled window. Of course, that means dealing with
577 // child windows of that window as well, because OS/2 does not
578 // tend to put them in the right place.
580 if (nChildHeight
!= m_vSwpClient
.cy
)
582 if (nChildWidth
!= m_vSwpClient
.cx
)
584 if (bNewXSize
|| bNewYSize
)
593 // This is needed SetSize will mess up the OS/2 child window
594 // positioning because we position in wxWindows coordinates,
595 // not OS/2 coordinates.
597 pChild
->MoveChildren(m_vSwpClient
.cy
- nChildHeight
);
601 if (pChild
->GetScrollBarHorz() != NULLHANDLE
||
602 pChild
->GetScrollBarVert() != NULLHANDLE
)
604 if (bNewXSize
|| bNewYSize
)
606 pChild
->GetSize( &nChildWidth
609 if (pChild
->GetScrollBarHorz() != NULLHANDLE
)
611 if (pChild
->GetScrollBarVert() != NULLHANDLE
)
613 pChild
->GetPosition( &nPosX
616 ::WinSetWindowPos( pChild
->GetHWND()
619 ,nPosY
+ nHeightAdjust
620 ,nChildWidth
- nWidthAdjust
621 ,nChildHeight
- nHeightAdjust
625 if (bNewYSize
&& !m_sbInitialized
)
628 // Only need to readjust child control positions of
629 // scrolled windows once on initialization. After that
630 // the sizing takes care of things itself.
632 pChild
->MoveChildren(nHeightAdjust
);
633 m_sbInitialized
= TRUE
;
635 if (bNewXSize
|| bNewYSize
)
638 // Always refresh to keep scollbars visible. They are
639 // children of the Toplevel window, not the child panel.
645 // This brings the internal "last size" up to date.
647 ::WinQueryWindowPos(GetHwnd(), &m_vSwpClient
);
648 } // end of wxTopLevelWindowOS2::UpdateInternalSize
650 // ----------------------------------------------------------------------------
651 // wxTopLevelWindowOS2 client size
652 // ----------------------------------------------------------------------------
654 void wxTopLevelWindowOS2::DoSetClientSize(
660 // Call GetClientAreaOrigin() to take the toolbar into account
662 wxPoint vPt
= GetClientAreaOrigin();
667 wxWindow::DoSetClientSize( nWidth
670 } // end of wxTopLevelWindowOS2::DoSetClientSize
672 void wxTopLevelWindowOS2::DoGetClientSize(
677 wxWindow::DoGetClientSize( pnX
681 wxPoint vPt
= GetClientAreaOrigin();
688 } // end of wxTopLevelWindowOS2::DoGetClientSize
690 // ----------------------------------------------------------------------------
691 // wxTopLevelWindowOS2 showing
692 // ----------------------------------------------------------------------------
694 void wxTopLevelWindowOS2::DoShowWindow(
698 ::WinShowWindow(m_hFrame
, (BOOL
)(nShowCmd
& SWP_SHOW
));
701 // Need to artificially send a size event as wxApps often expect to do some
702 // final child control sizing
704 m_bIconized
= nShowCmd
== SWP_MINIMIZE
;
705 } // end of wxTopLevelWindowOS2::DoShowWindow
707 bool wxTopLevelWindowOS2::Show(
717 if (m_bMaximizeOnShow
)
719 nShowCmd
= SWP_MAXIMIZE
;
720 m_bMaximizeOnShow
= FALSE
;
731 DoShowWindow(nShowCmd
);
735 wxActivateEvent
vEvent(wxEVT_ACTIVATE
, TRUE
, m_windowId
);
737 ::WinQueryWindowPos(m_hFrame
, &vSwp
);
738 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
739 ::WinQueryWindowPos(m_hWnd
, &m_vSwpClient
);
740 ::WinSendMsg(m_hFrame
, WM_UPDATEFRAME
, (MPARAM
)~0, 0);
741 ::WinEnableWindow(m_hFrame
, TRUE
);
742 vEvent
.SetEventObject(this);
743 GetEventHandler()->ProcessEvent(vEvent
);
748 // Try to highlight the correct window (the parent)
752 HWND hWndParent
= GetHwndOf(GetParent());
754 ::WinQueryWindowPos(hWndParent
, &vSwp
);
755 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
757 ::WinSetWindowPos( hWndParent
763 ,SWP_ZORDER
| SWP_ACTIVATE
| SWP_SHOW
| SWP_MOVE
765 ::WinEnableWindow(hWndParent
, TRUE
);
769 } // end of wxTopLevelWindowOS2::Show
771 // ----------------------------------------------------------------------------
772 // wxTopLevelWindowOS2 maximize/minimize
773 // ----------------------------------------------------------------------------
775 void wxTopLevelWindowOS2::Maximize(
782 // Just maximize it directly
784 DoShowWindow(bMaximize
? SWP_MAXIMIZE
: SWP_RESTORE
);
789 // We can't maximize the hidden frame because it shows it as well, so
790 // just remember that we should do it later in this case
792 m_bMaximizeOnShow
= TRUE
;
794 } // end of wxTopLevelWindowOS2::Maximize
796 bool wxTopLevelWindowOS2::IsMaximized() const
800 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
801 return (m_vSwp
.fl
& SWP_MAXIMIZE
);
802 } // end of wxTopLevelWindowOS2::IsMaximized
804 void wxTopLevelWindowOS2::Iconize(
808 DoShowWindow(bIconize
? SWP_MINIMIZE
: SWP_RESTORE
);
809 } // end of wxTopLevelWindowOS2::Iconize
811 bool wxTopLevelWindowOS2::IsIconized() const
813 // also update the current state
814 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
815 if (m_vSwp
.fl
& SWP_MINIMIZE
)
816 ((wxTopLevelWindow
*)this)->m_bIconized
= TRUE
;
818 ((wxTopLevelWindow
*)this)->m_bIconized
= FALSE
;
820 } // end of wxTopLevelWindowOS2::IsIconized
822 void wxTopLevelWindowOS2::Restore()
824 DoShowWindow(SWP_RESTORE
);
825 } // end of wxTopLevelWindowOS2::Restore
827 // generate an artificial resize event
828 void wxTopLevelWindowOS2::SendSizeEvent()
832 RECTL vRect
= wxGetWindowRect(GetHwnd());
834 (void)::WinPostMsg( m_hFrame
836 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
837 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
840 } // end of wxTopLevelWindowOS2::SendSizeEvent
842 // ----------------------------------------------------------------------------
843 // wxTopLevelWindowOS2 fullscreen
844 // ----------------------------------------------------------------------------
846 bool wxTopLevelWindowOS2::ShowFullScreen(
856 m_bFsIsShowing
= TRUE
;
860 // Zap the frame borders
864 // Save the 'normal' window lStyle
866 m_lFsOldWindowStyle
= ::WinQueryWindowULong( (HWND
)GetHWND()
871 // Save the old position, width & height, maximize state
873 m_vFsOldSize
= GetRect();
874 m_bFsIsMaximized
= IsMaximized();
877 // Decide which window lStyle flags to turn off
879 LONG lNewStyle
= m_lFsOldWindowStyle
;
882 if (lStyle
& wxFULLSCREEN_NOBORDER
)
883 lOffFlags
|= FCF_BORDER
;
884 if (lStyle
& wxFULLSCREEN_NOCAPTION
)
885 lOffFlags
|= (FCF_TASKLIST
| FCF_SYSMENU
);
887 lNewStyle
&= (~lOffFlags
);
890 // Change our window style to be compatible with full-screen mode
892 ::WinSetWindowULong( (HWND
)GetHWND()
898 // Resize to the size of the desktop
902 RECTL vRect
= wxGetWindowRect(HWND_DESKTOP
);
904 nWidth
= vRect
.xRight
- vRect
.xLeft
;
905 nHeight
= vRect
.yTop
- vRect
.yBottom
;
912 // Now flush the window style cache and actually go full-screen
914 ::WinSetWindowPos( m_hFrame
923 wxSizeEvent
vEvent( wxSize( nWidth
929 GetEventHandler()->ProcessEvent(vEvent
);
937 m_bFsIsShowing
= FALSE
;
938 Maximize(m_bFsIsMaximized
);
939 ::WinSetWindowULong( (HWND
)GetHWND()
943 ::WinSetWindowPos( m_hFrame
953 } // end of wxTopLevelWindowOS2::ShowFullScreen
955 // ----------------------------------------------------------------------------
956 // wxTopLevelWindowOS2 misc
957 // ----------------------------------------------------------------------------
959 void wxTopLevelWindowOS2::SetIcon(
966 wxTopLevelWindowBase::SetIcon(rIcon
);
970 ::WinSendMsg( m_hFrame
972 ,(MPARAM
)((HPOINTER
)m_icon
.GetHICON())
975 ::WinSendMsg( m_hFrame
981 } // end of wxTopLevelWindowOS2::SetIcon
983 bool wxTopLevelWindowOS2::EnableCloseButton(
988 // Get system (a.k.a. window) menu
990 HMENU hMenu
= ::WinWindowFromID(m_hFrame
, FID_SYSMENU
);
994 wxLogLastError(_T("GetSystemMenu"));
999 // Enabling/disabling the close item from it also automatically
1000 // disables/enables the close title bar button
1003 (void)::WinSendMsg( hMenu
1005 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
1006 ,MPFROM2SHORT(MIA_DISABLED
, FALSE
)
1009 (void)::WinSendMsg( hMenu
1011 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
1012 ,MPFROM2SHORT(MIA_DISABLED
, MIA_DISABLED
)
1016 // Update appearance immediately
1018 ::WinSendMsg( m_hFrame
1024 } // end of wxTopLevelWindowOS2::EnableCloseButton