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 as we set the focus
87 // ourselves, we return FALSE from here as well, so fall through
91 // For all the other ones, FALSE means that we didn't process the
94 return (MRESULT
)FALSE
;
98 // ----------------------------------------------------------------------------
99 // wxTopLevelWindowOS2 creation
100 // ----------------------------------------------------------------------------
102 void wxTopLevelWindowOS2::Init()
104 m_bIconized
= m_bMaximizeOnShow
= FALSE
;
107 // Unlike (almost?) all other windows, frames are created hidden
112 // Data to save/restore when calling ShowFullScreen
114 m_lFsOldWindowStyle
= 0;
115 m_bFsIsMaximized
= FALSE
;
116 m_bFsIsShowing
= FALSE
;
118 m_hFrame
= NULLHANDLE
;
119 memset(&m_vSwp
, 0, sizeof(SWP
));
120 memset(&m_vSwpClient
, 0, sizeof(SWP
));
121 m_pWinLastFocused
= (wxWindow
*)NULL
;
122 } // end of wxTopLevelWindowIOS2::Init
124 void wxTopLevelWindowOS2::OnActivate(
125 wxActivateEvent
& rEvent
128 if (rEvent
.GetActive())
131 // Restore focus to the child which was last focused
133 wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), m_hWnd
);
135 wxWindow
* pParent
= m_pWinLastFocused
? m_pWinLastFocused
->GetParent()
142 wxSetFocusToChild( pParent
149 // Remember the last focused child if it is our child
151 m_pWinLastFocused
= FindFocus();
154 // So we NULL it out if it's a child from some other frame
156 wxWindow
* pWin
= m_pWinLastFocused
;
160 if (pWin
->IsTopLevel())
164 m_pWinLastFocused
= NULL
;
168 pWin
= pWin
->GetParent();
171 wxLogTrace(_T("focus"),
172 _T("wxTLW %08x deactivated, last focused: %08x."),
174 m_pWinLastFocused
? GetHwndOf(m_pWinLastFocused
)
178 } // end of wxTopLevelWindowOS2::OnActivate
180 WXDWORD
wxTopLevelWindowOS2::OS2GetStyle(
182 , WXDWORD
* pdwExflags
185 long lMsflags
= wxWindow::OS2GetStyle( (lStyle
& ~wxBORDER_MASK
) | wxBORDER_NONE
189 if (lStyle
== wxDEFAULT_FRAME_STYLE
)
190 lMsflags
|= FCF_SIZEBORDER
| FCF_TITLEBAR
| FCF_SYSMENU
|
191 FCF_MINMAX
| FCF_TASKLIST
;
194 if ((lStyle
& wxCAPTION
) == wxCAPTION
)
195 lMsflags
|= FCF_TASKLIST
;
197 lMsflags
|= FCF_NOMOVEWITHOWNER
;
199 if ((lStyle
& wxVSCROLL
) == wxVSCROLL
)
200 lMsflags
|= FCF_VERTSCROLL
;
201 if ((lStyle
& wxHSCROLL
) == wxHSCROLL
)
202 lMsflags
|= FCF_HORZSCROLL
;
203 if (lStyle
& wxMINIMIZE_BOX
)
204 lMsflags
|= FCF_MINBUTTON
;
205 if (lStyle
& wxMAXIMIZE_BOX
)
206 lMsflags
|= FCF_MAXBUTTON
;
207 if (lStyle
& wxTHICK_FRAME
)
208 lMsflags
|= FCF_DLGBORDER
;
209 if (lStyle
& wxSYSTEM_MENU
)
210 lMsflags
|= FCF_SYSMENU
;
211 if (lStyle
& wxCAPTION
)
212 lMsflags
|= FCF_TASKLIST
;
213 if (lStyle
& wxCLIP_CHILDREN
)
215 // Invalid for frame windows under PM
218 if (lStyle
& wxTINY_CAPTION_VERT
)
219 lMsflags
|= FCF_TASKLIST
;
220 if (lStyle
& wxTINY_CAPTION_HORIZ
)
221 lMsflags
|= FCF_TASKLIST
;
223 if ((lStyle
& wxTHICK_FRAME
) == 0)
224 lMsflags
|= FCF_BORDER
;
225 if (lStyle
& wxFRAME_TOOL_WINDOW
)
226 *pdwExflags
= kFrameToolWindow
;
228 if (lStyle
& wxSTAY_ON_TOP
)
229 lMsflags
|= FCF_SYSMODAL
;
232 } // end of wxTopLevelWindowOS2::OS2GetCreateWindowFlags
234 WXHWND
wxTopLevelWindowOS2::OS2GetParent() const
237 // For the frames without wxFRAME_FLOAT_ON_PARENT style we should use NULL
238 // parent HWND or it would be always on top of its parent which is not what
239 // we usually want (in fact, we only want it for frames with the
240 // wxFRAME_FLOAT_ON_PARENT flag)
244 if (HasFlag(wxFRAME_FLOAT_ON_PARENT
) )
246 pParent
= GetParent();
248 // this flag doesn't make sense then and will be ignored
249 wxASSERT_MSG( pParent
,
250 _T("wxFRAME_FLOAT_ON_PARENT but no parent?") );
252 else // don't float on parent, must not be owned
256 if (HasFlag(wxFRAME_NO_TASKBAR
) && !pParent
)
258 if (!m_spHiddenParent
)
260 m_spHiddenParent
= new wxTopLevelWindowOS2(NULL
, -1, _T(""));
263 // We shouldn't leave it in wxTopLevelWindows or we wouldn't
264 // terminate the app when the last user-created frame is deleted --
265 // see ~wxTopLevelWindowMSW
267 wxTopLevelWindows
.DeleteObject(m_spHiddenParent
);
269 pParent
= m_spHiddenParent
;
271 return pParent
? pParent
->GetHWND() : NULL
;
272 } // end of wxTopLevelWindowOS2::OS2GetParent
274 bool wxTopLevelWindowOS2::CreateDialog(
276 , const wxString
& rsTitle
277 , const wxPoint
& rPos
278 , const wxSize
& rSize
281 wxWindow
* pParent
= GetParent();
284 // For the dialogs without wxDIALOG_NO_PARENT style, use the top level
285 // app window as parent - this avoids creating modal dialogs without
288 if (!pParent
&& !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT
))
290 pParent
= wxTheApp
->GetTopWindow();
295 // Don't use transient windows as parents, this is dangerous as it
296 // can lead to a crash if the parent is destroyed before the child
298 // also don't use the window which is currently hidden as then the
299 // dialog would be hidden as well
300 if ((pParent
->GetExtraStyle() & wxWS_EX_TRANSIENT
) ||
312 hWndOwner
= GetHwndOf(pParent
);
314 hWndOwner
= HWND_DESKTOP
;
316 hWndDlg
= ::WinLoadDlg( HWND_DESKTOP
320 ,(ULONG
)ulDlgTemplate
324 m_hWnd
= (WXHWND
) hWndDlg
;
328 wxFAIL_MSG(_("Did you forget to include wx/os2/wx.rc in your resources?"));
330 wxLogSysError(_("Can't create dialog using template '%ul'"), ulDlgTemplate
);
336 // Move the dialog to its initial position without forcing repainting
343 if (!OS2GetCreateWindowCoords( rPos
351 nX
= nWidth
= (int)CW_USEDEFAULT
;
355 // We can't use CW_USEDEFAULT here as we're not calling CreateWindow()
356 // and passing CW_USEDEFAULT to MoveWindow() results in resizing the
357 // window to (0, 0) size which breaks quite a lot of things, e.g. the
358 // sizer calculation in wxSizer::Fit()
360 if (nWidth
== (int)CW_USEDEFAULT
)
363 // The exact number doesn't matter, the dialog will be resized
364 // again soon anyhow but it should be big enough to allow
365 // calculation relying on "totalSize - clientSize > 0" work, i.e.
366 // at least greater than the title bar height
368 nWidth
= nHeight
= 100;
370 if (nX
== (int)CW_USEDEFAULT
)
373 // Centre it on the screen - what else can we do?
375 wxSize vSizeDpy
= wxGetDisplaySize();
377 nX
= (vSizeDpy
.x
- nWidth
) / 2;
378 nY
= (vSizeDpy
.y
- nHeight
) / 2;
380 m_backgroundColour
.Set(wxString("LIGHT GREY"));
382 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
384 if (!::WinSetPresParam( m_hWnd
393 ::WinSetWindowPos( GetHwnd()
399 ,SWP_MOVE
| SWP_SIZE
| SWP_ZORDER
| SWP_SHOW
401 ::WinQueryWindowPos(GetHwnd(), GetSwp());
405 } // end of wxTopLevelWindowOS2::CreateDialog
407 bool wxTopLevelWindowOS2::CreateFrame(
408 const wxString
& rsTitle
409 , const wxPoint
& rPos
410 , const wxSize
& rSize
414 WXDWORD lFlags
= OS2GetCreateWindowFlags(&lExflags
);
415 long lStyle
= GetWindowStyleFlag();
418 int nWidth
= rSize
.x
;
419 int nHeight
= rSize
.y
;
420 ULONG ulStyleFlags
= 0L;
423 wxWindow
* pParent
= GetParent();
429 hParent
= GetHwndOf(pParent
);
431 hParent
= HWND_DESKTOP
;
433 if ((lStyle
& wxMINIMIZE
) || (lStyle
& wxICONIZE
))
434 ulStyleFlags
|= WS_MINIMIZED
;
435 if (lStyle
& wxMAXIMIZE
)
436 ulStyleFlags
|= WS_MAXIMIZED
;
439 // Clear the visible flag, we always call show
441 ulStyleFlags
&= (unsigned long)~WS_VISIBLE
;
445 // Create the frame window: We break ranks with other ports now
446 // and instead of calling down into the base wxWindow class' OS2Create
447 // we do all our own stuff here. We will set the needed pieces
448 // of wxWindow manually, here.
451 hFrame
= ::WinCreateStdWindow( hParent
452 ,ulStyleFlags
// frame-window style
453 ,(PULONG
)&lFlags
// window style
454 ,(PSZ
)wxFrameClassName
// class name
455 ,(PSZ
)rsTitle
.c_str() // window title
456 ,0L // default client style
457 ,NULLHANDLE
// resource in executable file
459 ,&hClient
// receives client window handle
463 vError
= ::WinGetLastError(vHabmain
);
464 sError
= wxPMErrorToStr(vError
);
465 wxLogError("Error creating frame. Error: %s\n", sError
);
470 // wxWindow class' m_hWnd set here and needed associations
474 wxAssociateWinWithHandle(m_hWnd
, this);
475 wxAssociateWinWithHandle(m_hFrame
, this);
477 m_backgroundColour
.Set(wxString("MEDIUM GREY"));
479 LONG lColor
= (LONG
)m_backgroundColour
.GetPixel();
481 if (!::WinSetPresParam( m_hWnd
487 vError
= ::WinGetLastError(vHabmain
);
488 sError
= wxPMErrorToStr(vError
);
489 wxLogError("Error creating frame. Error: %s\n", sError
);
494 // Now need to subclass window. Instead of calling the SubClassWin in wxWindow
495 // we manually subclass here because we don't want to use the main wxWndProc
498 m_fnOldWndProc
= (WXFARPROC
) ::WinSubclassWindow(m_hFrame
, (PFNWP
)wxFrameMainWndProc
);
501 // Now size everything. If adding a menu the client will need to be resized.
506 nY
= pParent
->GetSize().y
- (nY
+ nHeight
);
512 ::WinQueryWindowRect(HWND_DESKTOP
, &vRect
);
513 nY
= vRect
.yTop
- (nY
+ nHeight
);
515 if (!::WinSetWindowPos( m_hFrame
521 ,SWP_SIZE
| SWP_MOVE
| SWP_ACTIVATE
| SWP_ZORDER
524 vError
= ::WinGetLastError(vHabmain
);
525 sError
= wxPMErrorToStr(vError
);
526 wxLogError("Error sizing frame. Error: %s\n", sError
);
529 lStyle
= ::WinQueryWindowULong( m_hWnd
532 lStyle
|= WS_CLIPCHILDREN
;
533 ::WinSetWindowULong( m_hWnd
538 } // end of wxTopLevelWindowOS2::CreateFrame
540 bool wxTopLevelWindowOS2::Create(
543 , const wxString
& rsTitle
544 , const wxPoint
& rPos
545 , const wxSize
& rSize
547 , const wxString
& rsName
554 m_windowStyle
= lStyle
;
556 m_windowId
= vId
== -1 ? NewControlId() : vId
;
557 wxTopLevelWindows
.Append(this);
559 pParent
->AddChild(this);
561 if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG
)
564 // We have different dialog templates to allows creation of dialogs
565 // with & without captions under OS2indows, resizeable or not (but a
566 // resizeable dialog always has caption - otherwise it would look too
571 if (lStyle
& wxRESIZE_BORDER
)
572 ulDlgTemplate
= (ULONG
)kResizeableDialog
;
573 else if (lStyle
& wxCAPTION
)
574 ulDlgTemplate
= (ULONG
)kCaptionDialog
;
576 ulDlgTemplate
= (ULONG
)kNoCaptionDialog
;
577 return CreateDialog( ulDlgTemplate
585 return CreateFrame( rsTitle
590 } // end of wxTopLevelWindowOS2::Create
592 wxTopLevelWindowOS2::~wxTopLevelWindowOS2()
594 wxTopLevelWindows
.DeleteObject(this);
596 if (wxModelessWindows
.Find(this))
597 wxModelessWindows
.DeleteObject(this);
600 // If this is the last top-level window, exit.
602 if (wxTheApp
&& (wxTopLevelWindows
.Number() == 0))
604 wxTheApp
->SetTopWindow(NULL
);
605 if ( wxTheApp
->GetExitOnFrameDelete() )
607 ::WinPostMsg(NULL
, WM_QUIT
, 0, 0);
610 } // end of wxTopLevelWindowOS2::~wxTopLevelWindowOS2
612 // ----------------------------------------------------------------------------
613 // wxTopLevelWindowOS2 client size
614 // ----------------------------------------------------------------------------
616 void wxTopLevelWindowOS2::DoSetClientSize(
622 // Call GetClientAreaOrigin() to take the toolbar into account
624 wxPoint vPt
= GetClientAreaOrigin();
629 wxWindow::DoSetClientSize( nWidth
632 } // end of wxTopLevelWindowOS2::DoSetClientSize
634 void wxTopLevelWindowOS2::DoGetClientSize(
639 wxWindow::DoGetClientSize( pnX
643 wxPoint vPt
= GetClientAreaOrigin();
650 } // end of wxTopLevelWindowOS2::DoGetClientSize
652 // ----------------------------------------------------------------------------
653 // wxTopLevelWindowOS2 showing
654 // ----------------------------------------------------------------------------
656 void wxTopLevelWindowOS2::DoShowWindow(
660 ::WinShowWindow(m_hFrame
, (BOOL
)(nShowCmd
& SWP_SHOW
));
663 // Need to artificially send a size event as wxApps often expect to do some
664 // final child control sizing
666 m_bIconized
= nShowCmd
== SWP_MINIMIZE
;
667 } // end of wxTopLevelWindowOS2::DoShowWindow
669 bool wxTopLevelWindowOS2::Show(
679 if (m_bMaximizeOnShow
)
681 nShowCmd
= SWP_MAXIMIZE
;
682 m_bMaximizeOnShow
= FALSE
;
693 DoShowWindow(nShowCmd
);
697 wxActivateEvent
vEvent(wxEVT_ACTIVATE
, TRUE
, m_windowId
);
699 ::WinQueryWindowPos(m_hFrame
, &vSwp
);
700 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
701 ::WinQueryWindowPos(m_hWnd
, &m_vSwpClient
);
702 ::WinSendMsg(m_hFrame
, WM_UPDATEFRAME
, (MPARAM
)~0, 0);
703 ::WinQueryWindowPos(m_hWnd
, &vSwp
);
704 ::WinEnableWindow(m_hFrame
, TRUE
);
707 // Deal with children
709 MoveChildren(m_vSwpClient
.cy
- vSwp
.cy
);
710 vEvent
.SetEventObject(this);
711 GetEventHandler()->ProcessEvent(vEvent
);
716 // Try to highlight the correct window (the parent)
720 HWND hWndParent
= GetHwndOf(GetParent());
722 ::WinQueryWindowPos(hWndParent
, &vSwp
);
723 m_bIconized
= vSwp
.fl
& SWP_MINIMIZE
;
725 ::WinSetWindowPos( hWndParent
731 ,SWP_ZORDER
| SWP_ACTIVATE
| SWP_SHOW
| SWP_MOVE
733 ::WinEnableWindow(hWndParent
, TRUE
);
737 } // end of wxTopLevelWindowOS2::Show
739 // ----------------------------------------------------------------------------
740 // wxTopLevelWindowOS2 maximize/minimize
741 // ----------------------------------------------------------------------------
743 void wxTopLevelWindowOS2::Maximize(
750 // Just maximize it directly
752 DoShowWindow(bMaximize
? SWP_MAXIMIZE
: SWP_RESTORE
);
757 // We can't maximize the hidden frame because it shows it as well, so
758 // just remember that we should do it later in this case
760 m_bMaximizeOnShow
= TRUE
;
762 } // end of wxTopLevelWindowOS2::Maximize
764 bool wxTopLevelWindowOS2::IsMaximized() const
768 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
769 return (m_vSwp
.fl
& SWP_MAXIMIZE
);
770 } // end of wxTopLevelWindowOS2::IsMaximized
772 void wxTopLevelWindowOS2::Iconize(
776 DoShowWindow(bIconize
? SWP_MINIMIZE
: SWP_RESTORE
);
777 } // end of wxTopLevelWindowOS2::Iconize
779 bool wxTopLevelWindowOS2::IsIconized() const
781 // also update the current state
782 ::WinQueryWindowPos(m_hFrame
, (PSWP
)&m_vSwp
);
783 if (m_vSwp
.fl
& SWP_MINIMIZE
)
784 ((wxTopLevelWindow
*)this)->m_bIconized
= TRUE
;
786 ((wxTopLevelWindow
*)this)->m_bIconized
= FALSE
;
788 } // end of wxTopLevelWindowOS2::IsIconized
790 void wxTopLevelWindowOS2::Restore()
792 DoShowWindow(SWP_RESTORE
);
793 } // end of wxTopLevelWindowOS2::Restore
795 // generate an artificial resize event
796 void wxTopLevelWindowOS2::SendSizeEvent()
800 RECTL vRect
= wxGetWindowRect(GetHwnd());
802 (void)::WinPostMsg( m_hFrame
804 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
805 ,MPFROM2SHORT(vRect
.xRight
- vRect
.xLeft
, vRect
.yTop
- vRect
.yBottom
)
808 } // end of wxTopLevelWindowOS2::SendSizeEvent
810 // ----------------------------------------------------------------------------
811 // wxTopLevelWindowOS2 fullscreen
812 // ----------------------------------------------------------------------------
814 bool wxTopLevelWindowOS2::ShowFullScreen(
824 m_bFsIsShowing
= TRUE
;
828 // Zap the frame borders
832 // Save the 'normal' window lStyle
834 m_lFsOldWindowStyle
= ::WinQueryWindowULong( (HWND
)GetHWND()
839 // Save the old position, width & height, maximize state
841 m_vFsOldSize
= GetRect();
842 m_bFsIsMaximized
= IsMaximized();
845 // Decide which window lStyle flags to turn off
847 LONG lNewStyle
= m_lFsOldWindowStyle
;
850 if (lStyle
& wxFULLSCREEN_NOBORDER
)
851 lOffFlags
|= FCF_BORDER
;
852 if (lStyle
& wxFULLSCREEN_NOCAPTION
)
853 lOffFlags
|= (FCF_TASKLIST
| FCF_SYSMENU
);
855 lNewStyle
&= (~lOffFlags
);
858 // Change our window style to be compatible with full-screen mode
860 ::WinSetWindowULong( (HWND
)GetHWND()
866 // Resize to the size of the desktop
870 RECTL vRect
= wxGetWindowRect(HWND_DESKTOP
);
872 nWidth
= vRect
.xRight
- vRect
.xLeft
;
873 nHeight
= vRect
.yTop
- vRect
.yBottom
;
880 // Now flush the window style cache and actually go full-screen
882 ::WinSetWindowPos( m_hFrame
891 wxSizeEvent
vEvent( wxSize( nWidth
897 GetEventHandler()->ProcessEvent(vEvent
);
905 m_bFsIsShowing
= FALSE
;
906 Maximize(m_bFsIsMaximized
);
907 ::WinSetWindowULong( (HWND
)GetHWND()
911 ::WinSetWindowPos( m_hFrame
921 } // end of wxTopLevelWindowOS2::ShowFullScreen
923 // ----------------------------------------------------------------------------
924 // wxTopLevelWindowOS2 misc
925 // ----------------------------------------------------------------------------
927 void wxTopLevelWindowOS2::SetIcon(
931 SetIcons(wxIconBundle(rIcon
));
932 } // end of wxTopLevelWindowOS2::SetIcon
934 void wxTopLevelWindowOS2::SetIcons(
935 const wxIconBundle
& rIcons
941 wxTopLevelWindowBase::SetIcons(rIcons
);
943 const wxIcon
& vIcon
= rIcons
.GetIcon(wxSize(32, 32));
945 if (vIcon
.Ok() && vIcon
.GetWidth() == 32 && vIcon
.GetHeight() == 32)
947 ::WinSendMsg( m_hFrame
949 ,(MPARAM
)((HPOINTER
)vIcon
.GetHICON())
952 ::WinSendMsg( m_hFrame
958 } // end of wxTopLevelWindowOS2::SetIcon
960 bool wxTopLevelWindowOS2::EnableCloseButton(
965 // Get system (a.k.a. window) menu
967 HMENU hMenu
= ::WinWindowFromID(m_hFrame
, FID_SYSMENU
);
971 wxLogLastError(_T("GetSystemMenu"));
976 // Enabling/disabling the close item from it also automatically
977 // disables/enables the close title bar button
980 (void)::WinSendMsg( hMenu
982 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
983 ,MPFROM2SHORT(MIA_DISABLED
, FALSE
)
986 (void)::WinSendMsg( hMenu
988 ,MPFROM2SHORT(SC_CLOSE
, FALSE
)
989 ,MPFROM2SHORT(MIA_DISABLED
, MIA_DISABLED
)
993 // Update appearance immediately
995 ::WinSendMsg( m_hFrame
1001 } // end of wxTopLevelWindowOS2::EnableCloseButton