Get/SetTitle only for wxTopLevelWindow (wxOS2 part).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-11-04 21:13:03 +00:00
parent c032d94e60
commit 743e24aa72
11 changed files with 221 additions and 251 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: control.h
// Name: wx/os2/control.h
// Purpose: wxControl class
// Author: David Webster
// Modified by:
@@ -30,14 +30,7 @@ public:
,const wxString& rsName = wxControlNameStr
)
{
Create( pParent
,vId
,rPos
,rSize
,lStyle
,rValidator
,rsName
);
Create( pParent, vId, rPos, rSize, lStyle, rValidator, rsName );
}
virtual ~wxControl();
@@ -51,6 +44,7 @@ public:
);
virtual void SetLabel(const wxString& rsLabel);
virtual wxString GetLabel() const { return m_label; }
//
// Simulates an event
@@ -70,7 +64,7 @@ public:
//
// For ownerdraw items
//
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return false; };
virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return 0L; };
wxArrayLong& GetSubcontrols() { return m_aSubControls; }
@@ -101,7 +95,7 @@ public:
,long lStyle
);
//
// Create the control of the given class with the given style, returns FALSE
// Create the control of the given class with the given style, returns false
// if creation failed.
//
bool OS2CreateControl( const wxChar* zClassname
@@ -127,8 +121,10 @@ public:
private:
int m_nXComp;
int m_nYComp;
wxString m_label;
DECLARE_EVENT_TABLE()
}; // end of wxControl
#endif // _WX_CONTROL_H_

View File

@@ -160,14 +160,14 @@ public:
);
virtual bool SetStringSelection(const wxString& rsStr);
void SetLabel( int nItem
,const wxString& rsLabel
);
void SetLabel( int item
,wxBitmap* pBitmap
);
wxString GetLabel(int nItem) const;
virtual void SetLabel(const wxString& rsLabel)
{ wxControl::SetLabel(rsLabel); }
virtual wxString GetLabel() const
{ return wxControl::GetLabel(); }
void SetLabel( int nItem, const wxString& rsLabel );
void SetLabel( int item, wxBitmap* pBitmap );
wxString GetLabel(int nItem) const;
protected:
virtual wxSize DoGetBestSize(void) const;
@@ -192,13 +192,8 @@ protected:
int m_nSizeFlags;
private:
inline wxString GetLabel() const
{ return wxWindowBase::GetLabel(); }
inline void SetLabel(const wxString& rsLabel)
{ wxWindowBase::SetLabel(rsLabel); }
DECLARE_DYNAMIC_CLASS(wxRadioBox)
}; // end of wxRadioBox
#endif
// _WX_RADIOBOX_H_
#endif // _WX_RADIOBOX_H_

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/toplevel.h
// Purpose: wxTopLevelWindowMSW is the MSW implementation of wxTLW
// Name: wx/os2/toplevel.h
// Purpose: wxTopLevelWindowOS2 is the OS2 implementation of wxTLW
// Author: Vadim Zeitlin
// Modified by:
// Created: 20.09.01
@@ -12,10 +12,12 @@
#ifndef _WX_MSW_TOPLEVEL_H_
#define _WX_MSW_TOPLEVEL_H_
enum ETemplateID { kResizeableDialog = 130
,kCaptionDialog
,kNoCaptionDialog
};
enum ETemplateID
{
kResizeableDialog = 130,
kCaptionDialog,
kNoCaptionDialog
};
// ----------------------------------------------------------------------------
// wxTopLevelWindowOS2
@@ -55,26 +57,28 @@ public:
//
// Implement base class pure virtuals
//
virtual void Iconize(bool bIconize = TRUE);
inline virtual bool IsFullScreen(void) const { return m_bFsIsShowing; }
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
virtual void Iconize(bool bIconize = true);
virtual bool IsFullScreen(void) const { return m_bFsIsShowing; }
virtual bool IsIconized(void) const;
virtual bool IsMaximized(void) const;
virtual void Maximize(bool bMaximize = TRUE);
virtual void Maximize(bool bMaximize = true);
virtual void Restore(void);
virtual void SendSizeEvent(void);
virtual void SetIcon(const wxIcon& rIcon);
virtual void SetIcons(const wxIconBundle& rIcons);
virtual bool Show(bool bShow = TRUE);
virtual bool ShowFullScreen( bool bShow
,long lStyle = wxFULLSCREEN_ALL
);
virtual bool Show(bool bShow = true);
virtual bool ShowFullScreen( bool bShow,
long lStyle = wxFULLSCREEN_ALL );
//
// EnableCloseButton(FALSE) may be used to remove the "Close"
// EnableCloseButton(false) may be used to remove the "Close"
// button from the title bar
//
bool EnableCloseButton(bool bEnable = TRUE);
bool EnableCloseButton(bool bEnable = true);
HWND GetFrame(void) const { return m_hFrame; }
//
@@ -87,14 +91,16 @@ public:
void SetLastFocus(wxWindow *pWin) { m_pWinLastFocused = pWin; }
wxWindow* GetLastFocus(void) const { return m_pWinLastFocused; }
protected:
//
// Common part of all ctors
//
void Init(void);
//
// Create a new frame, return FALSE if it couldn't be created
// Create a new frame, return false if it couldn't be created
//
bool CreateFrame( const wxString& rsTitle
,const wxPoint& rPos
@@ -103,7 +109,7 @@ protected:
//
// Create a new dialog using the given dialog template from resources,
// return FALSE if it couldn't be created
// return false if it couldn't be created
//
bool CreateDialog( ULONG ulDlgTemplate
,const wxString& rsTitle
@@ -170,4 +176,3 @@ protected:
}; // end of CLASS wxTopLevelWindowOS2
#endif // _WX_MSW_TOPLEVEL_H_

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: window.h
// Name: wx/os2/window.h
// Purpose: wxWindow class
// Author: David Webster
// Modified by:
@@ -90,8 +90,8 @@ public:
);
// implement base class pure virtuals
virtual void SetTitle(const wxString& rTitle);
virtual wxString GetTitle(void) const;
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel(void) const;
virtual void Raise(void);
virtual void Lower(void);
virtual bool Show(bool bShow = true);
@@ -587,5 +587,4 @@ WX_DECLARE_HASH(wxWindowOS2, wxWindowList, wxWinHashTable);
extern wxWinHashTable *wxWinHandleHash;
#endif
// _WX_WINDOW_H_
#endif // _WX_WINDOW_H_

View File

@@ -157,6 +157,7 @@ public:
#if defined(__WXMSW__) || \
defined(__WXMGL__) || \
defined(__WXMOTIF__) || \
defined(__WXPM__) || \
defined(__WXGTK__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow

View File

@@ -171,6 +171,7 @@ public:
#if !defined(__WXMSW__) && \
!defined(__WXMGL__) && \
!defined(__WXMOTIF__) && \
!defined(__WXPM__) && \
!defined(__WXGTK__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: control.cpp
// Name: src/os2/control.cpp
// Purpose: wxControl class
// Author: David Webster
// Modified by:
@@ -64,18 +64,14 @@ wxControl::~wxControl()
m_isBeingDeleted = true;
}
bool wxControl::OS2CreateControl(
const wxChar* zClassname
, const wxString& rsLabel
, const wxPoint& rPos
, const wxSize& rSize
, long lStyle
)
bool wxControl::OS2CreateControl( const wxChar* zClassname,
const wxString& rsLabel,
const wxPoint& rPos,
const wxSize& rSize,
long lStyle )
{
WXDWORD dwExstyle;
WXDWORD dwStyle = OS2GetStyle( lStyle
,&dwExstyle
);
WXDWORD dwStyle = OS2GetStyle( lStyle, &dwExstyle );
return OS2CreateControl( zClassname
,dwStyle
@@ -112,7 +108,7 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname,
PSZ zClass = "";
if (!pParent)
return FALSE;
return false;
if ((wxStrcmp(zClassname, _T("COMBOBOX"))) == 0)
zClass = WC_COMBOBOX;
@@ -126,11 +122,12 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname,
zClass = WC_CONTAINER;
dwStyle |= WS_VISIBLE;
wxString sLabel = ::wxPMTextToLabel(rsLabel);
m_label = rsLabel;
wxString label = ::wxPMTextToLabel(m_label);
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,(PSZ)zClass // Window class
,(PSZ)sLabel.c_str() // Initial Text
,(PSZ)label.c_str() // Initial Text
,(ULONG)dwStyle // Style flags
,(LONG)0 // X pos of origin
,(LONG)0 // Y pos of origin
@@ -149,7 +146,7 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname,
wxLogError(wxT("Failed to create a control of class '%s'"), zClassname);
#endif // DEBUG
return FALSE;
return false;
}
//
// Subclass again for purposes of dialog editing mode
@@ -167,11 +164,7 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname,
SetXComp(0);
SetYComp(0);
SetSize( rPos.x
,rPos.y
,rSize.x
,rSize.y
);
SetSize( rPos.x, rPos.y, rSize.x, rSize.y );
return true;
} // end of wxControl::OS2CreateControl
@@ -210,9 +203,7 @@ WXHBRUSH wxControl::OnCtlColor(WXHDC hWxDC,
return (WXHBRUSH)pBrush->GetResourceHandle();
} // end of wxControl::OnCtlColor
void wxControl::OnEraseBackground(
wxEraseEvent& rEvent
)
void wxControl::OnEraseBackground( wxEraseEvent& rEvent )
{
RECTL vRect;
HPS hPS = rEvent.GetDC()->GetHPS();
@@ -223,14 +214,9 @@ void wxControl::OnEraseBackground(
::WinFillRect(hPS, &vRect, GetBackgroundColour().GetPixel());
} // end of wxControl::OnEraseBackground
WXDWORD wxControl::OS2GetStyle(
long lStyle
, WXDWORD* pdwExstyle
) const
WXDWORD wxControl::OS2GetStyle( long lStyle, WXDWORD* pdwExstyle ) const
{
long dwStyle = wxWindow::OS2GetStyle( lStyle
,pdwExstyle
);
long dwStyle = wxWindow::OS2GetStyle( lStyle, pdwExstyle );
if (AcceptsFocus())
{
@@ -239,13 +225,14 @@ WXDWORD wxControl::OS2GetStyle(
return dwStyle;
} // end of wxControl::OS2GetStyle
void wxControl::SetLabel(
const wxString& rsLabel
)
void wxControl::SetLabel( const wxString& rsLabel )
{
wxString sLabel = ::wxPMTextToLabel(rsLabel);
::WinSetWindowText(GetHwnd(), (PSZ)sLabel.c_str());
if(rsLabel != m_label)
{
m_label = rsLabel;
wxString label = ::wxPMTextToLabel(rsLabel);
::WinSetWindowText(GetHwnd(), (PSZ)label.c_str());
}
} // end of wxControl::SetLabel
// ---------------------------------------------------------------------------

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog.cpp
// Name: src/os2/dialog.cpp
// Purpose: wxDialog class
// Author: David Webster
// Modified by:
@@ -83,7 +83,7 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxDialogModalData);
void wxDialog::Init()
{
m_pOldFocus = (wxWindow *)NULL;
m_isShown = FALSE;
m_isShown = false;
m_pWindowDisabler = (wxWindowDisabler *)NULL;
m_modalData = NULL;
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
@@ -227,9 +227,7 @@ wxWindow *wxDialog::FindSuitableParent() const
return parent;
}
bool wxDialog::Show(
bool bShow
)
bool wxDialog::Show( bool bShow )
{
if ( bShow == IsShown() )
return false;
@@ -261,8 +259,9 @@ bool wxDialog::Show(
wxDialogBase::Show(bShow);
if (GetTitle().c_str())
::WinSetWindowText((HWND)GetHwnd(), (PSZ)GetTitle().c_str());
wxString title = GetTitle();
if (!title.empty())
::WinSetWindowText((HWND)GetHwnd(), (PSZ)title.c_str());
if ( bShow )
{
@@ -322,7 +321,7 @@ int wxDialog::ShowModal()
extern bool gbInOnIdle;
bool bWasInOnIdle = gbInOnIdle;
gbInOnIdle = FALSE;
gbInOnIdle = false;
// enter and run the modal loop
{
@@ -432,14 +431,10 @@ void wxDialog::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(rEvent) )
Refresh();
} // end of wxDialog::OnSysColourChanged
MRESULT wxDialog::OS2WindowProc(
WXUINT uMessage
, WXWPARAM wParam
, WXLPARAM lParam
)
MRESULT wxDialog::OS2WindowProc( WXUINT uMessage, WXWPARAM wParam, WXLPARAM lParam )
{
MRESULT rc = 0;
bool bProcessed = FALSE;
bool bProcessed = false;
switch (uMessage)
{

View File

@@ -376,16 +376,16 @@ bool wxRadioBox::Create(
//
// Create a dummy radio control to end the group.
//
(void)::WinCreateWindow ( GetHwndOf(pParent)
,WC_BUTTON
,""
,WS_GROUP | BS_AUTORADIOBUTTON
,0, 0, 0, 0
,GetWinHwnd(pParent)
,HWND_TOP
,(HMENU)NewControlId()
,NULL
,NULL
(void)::WinCreateWindow ( GetHwndOf(pParent),
WC_BUTTON,
"",
WS_GROUP | BS_AUTORADIOBUTTON,
0, 0, 0, 0,
GetWinHwnd(pParent),
HWND_TOP,
(HMENU)NewControlId(),
NULL,
NULL
);
SetFont(*wxSMALL_FONT);
fnWndProcRadioBox = (WXFARPROC)::WinSubclassWindow( GetHwnd()
@@ -824,10 +824,7 @@ int wxRadioBox::GetSelection() const
return m_nSelectedButton;
} // end of wxRadioBox::GetSelection
void wxRadioBox::GetSize(
int* pnWidth
, int* pnHeight
) const
void wxRadioBox::GetSize( int* pnWidth, int* pnHeight ) const
{
RECT vRect;
int i;
@@ -891,10 +888,7 @@ wxSize wxRadioBox::GetTotalButtonSize( const wxSize& rSizeBtn ) const
//
// And also wide enough for its label
//
GetTextExtent( GetTitle()
,&nWidthLabel
,NULL
);
GetTextExtent( GetLabel(), &nWidthLabel, NULL );
nWidthLabel += RADIO_SIZE;
if (nWidthLabel > nWidth)
nWidth = nWidthLabel;
@@ -1184,17 +1178,14 @@ MRESULT wxRadioBtnWndProc(
);
} // end of wxRadioBtnWndProc
MRESULT EXPENTRY wxRadioBoxWndProc(
HWND hWnd
, UINT uMessage
, MPARAM wParam
, MPARAM lParam
)
MRESULT EXPENTRY wxRadioBoxWndProc( HWND hWnd,
UINT uMessage,
MPARAM wParam,
MPARAM lParam )
{
return (fnWndProcRadioBox( hWnd
,(ULONG)uMessage
,(MPARAM)wParam
,(MPARAM)lParam
)
return (fnWndProcRadioBox( hWnd,
(ULONG)uMessage,
(MPARAM)wParam,
(MPARAM)lParam )
);
} // end of wxRadioBoxWndProc

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: os2/toplevel.cpp
// Name: src/os2/toplevel.cpp
// Purpose: implements wxTopLevelWindow for OS/2
// Author: Vadim Zeitlin
// Modified by:
@@ -49,10 +49,9 @@
// ----------------------------------------------------------------------------
// the name of the default wxWidgets class
extern void wxAssociateWinWithHandle( HWND hWnd
,wxWindowOS2* pWin
);
bool wxTopLevelWindowOS2::m_sbInitialized = FALSE;
extern void wxAssociateWinWithHandle( HWND hWnd, wxWindowOS2* pWin );
bool wxTopLevelWindowOS2::m_sbInitialized = false;
wxWindow* wxTopLevelWindowOS2::m_spHiddenParent = NULL;
// ============================================================================
@@ -132,19 +131,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxTLWHiddenParentModule, wxModule)
void wxTopLevelWindowOS2::Init()
{
m_bIconized = m_bMaximizeOnShow = FALSE;
m_bIconized = m_bMaximizeOnShow = false;
//
// Unlike (almost?) all other windows, frames are created hidden
//
m_isShown = FALSE;
m_isShown = false;
//
// Data to save/restore when calling ShowFullScreen
m_lFsStyle = 0;
m_lFsOldWindowStyle = 0;
m_bFsIsMaximized = FALSE;
m_bFsIsShowing = FALSE;
m_bFsIsMaximized = false;
m_bFsIsShowing = false;
m_hFrame = NULLHANDLE;
memset(&m_vSwp, 0, sizeof(SWP));
@@ -360,7 +359,7 @@ bool wxTopLevelWindowOS2::CreateDialog( ULONG ulDlgTemplate,
wxLogSysError(wxT("Can't create dialog using template '%ld'"), ulDlgTemplate);
return FALSE;
return false;
}
//
@@ -418,7 +417,7 @@ bool wxTopLevelWindowOS2::CreateDialog( ULONG ulDlgTemplate,
,(PVOID)&lColor
))
{
return FALSE;
return false;
}
::WinSetWindowPos( GetHwnd()
@@ -432,14 +431,12 @@ bool wxTopLevelWindowOS2::CreateDialog( ULONG ulDlgTemplate,
::WinQueryWindowPos(GetHwnd(), GetSwp());
m_hFrame = m_hWnd;
SubclassWin(m_hWnd);
return TRUE;
return true;
} // end of wxTopLevelWindowOS2::CreateDialog
bool wxTopLevelWindowOS2::CreateFrame(
const wxString& rsTitle
, const wxPoint& rPos
, const wxSize& rSize
)
bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
const wxPoint& rPos,
const wxSize& rSize )
{
WXDWORD lExflags;
WXDWORD lFlags = OS2GetCreateWindowFlags(&lExflags);
@@ -470,7 +467,7 @@ bool wxTopLevelWindowOS2::CreateFrame(
// Clear the visible flag, we always call show
//
ulStyleFlags &= (unsigned long)~WS_VISIBLE;
m_bIconized = FALSE;
m_bIconized = false;
//
// Create the frame window: We break ranks with other ports now
@@ -494,7 +491,7 @@ bool wxTopLevelWindowOS2::CreateFrame(
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error creating frame. Error: %s\n"), sError.c_str());
return FALSE;
return false;
}
//
@@ -518,7 +515,7 @@ bool wxTopLevelWindowOS2::CreateFrame(
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error creating frame. Error: %s\n"), sError.c_str());
return FALSE;
return false;
}
//
@@ -555,7 +552,7 @@ bool wxTopLevelWindowOS2::CreateFrame(
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error sizing frame. Error: %s\n"), sError.c_str());
return FALSE;
return false;
}
lStyle = ::WinQueryWindowULong( m_hWnd
,QWL_STYLE
@@ -565,7 +562,7 @@ bool wxTopLevelWindowOS2::CreateFrame(
,QWL_STYLE
,lStyle
);
return TRUE;
return true;
} // end of wxTopLevelWindowOS2::CreateFrame
bool wxTopLevelWindowOS2::Create(
@@ -713,9 +710,7 @@ void wxTopLevelWindowOS2::DoShowWindow(
m_bIconized = nShowCmd == SWP_MINIMIZE;
} // end of wxTopLevelWindowOS2::DoShowWindow
bool wxTopLevelWindowOS2::Show(
bool bShow
)
bool wxTopLevelWindowOS2::Show( bool bShow )
{
int nShowCmd;
SWP vSwp;
@@ -726,14 +721,14 @@ bool wxTopLevelWindowOS2::Show(
}
else
{
return FALSE;
return false;
}
if (bShow)
{
if (m_bMaximizeOnShow)
{
nShowCmd = SWP_MAXIMIZE;
m_bMaximizeOnShow = FALSE;
m_bMaximizeOnShow = false;
}
else
{
@@ -748,7 +743,7 @@ bool wxTopLevelWindowOS2::Show(
if (bShow)
{
wxActivateEvent vEvent(wxEVT_ACTIVATE, TRUE, m_windowId);
wxActivateEvent vEvent(wxEVT_ACTIVATE, true, m_windowId);
::WinQueryWindowPos(m_hFrame, &vSwp);
m_bIconized = ( vSwp.fl & SWP_MINIMIZE ) == SWP_MINIMIZE ;
@@ -778,7 +773,7 @@ bool wxTopLevelWindowOS2::Show(
::WinEnableWindow(hWndParent, TRUE);
}
}
return TRUE;
return true;
} // end of wxTopLevelWindowOS2::Show
// ----------------------------------------------------------------------------
@@ -812,9 +807,17 @@ bool wxTopLevelWindowOS2::IsMaximized() const
return (m_vSwp.fl & SWP_MAXIMIZE) == SWP_MAXIMIZE;
} // end of wxTopLevelWindowOS2::IsMaximized
void wxTopLevelWindowOS2::Iconize(
bool bIconize
)
void wxTopLevelWindowOS2::SetTitle( const wxString& title)
{
SetLabel(title);
}
wxString wxTopLevelWindowOS2::GetTitle() const
{
return GetLabel();
}
void wxTopLevelWindowOS2::Iconize( bool bIconize )
{
DoShowWindow(bIconize ? SWP_MINIMIZE : SWP_RESTORE);
} // end of wxTopLevelWindowOS2::Iconize
@@ -824,9 +827,9 @@ bool wxTopLevelWindowOS2::IsIconized() const
// also update the current state
::WinQueryWindowPos(m_hFrame, (PSWP)&m_vSwp);
if (m_vSwp.fl & SWP_MINIMIZE)
((wxTopLevelWindow*)this)->m_bIconized = TRUE;
((wxTopLevelWindow*)this)->m_bIconized = true;
else
((wxTopLevelWindow*)this)->m_bIconized = FALSE;
((wxTopLevelWindow*)this)->m_bIconized = false;
return m_bIconized;
} // end of wxTopLevelWindowOS2::IsIconized
@@ -992,9 +995,7 @@ void wxTopLevelWindowOS2::SetIcons(
}
} // end of wxTopLevelWindowOS2::SetIcon
bool wxTopLevelWindowOS2::EnableCloseButton(
bool bEnable
)
bool wxTopLevelWindowOS2::EnableCloseButton( bool bEnable )
{
//
// Get system (a.k.a. window) menu
@@ -1004,7 +1005,7 @@ bool wxTopLevelWindowOS2::EnableCloseButton(
if (!hMenu)
{
wxLogLastError(_T("GetSystemMenu"));
return FALSE;
return false;
}
//
@@ -1032,7 +1033,7 @@ bool wxTopLevelWindowOS2::EnableCloseButton(
,(MPARAM)FCF_MENU
,(MPARAM)0
);
return TRUE;
return true;
} // end of wxTopLevelWindowOS2::EnableCloseButton
// ============================================================================
@@ -1046,7 +1047,7 @@ bool wxTLWHiddenParentModule::OnInit()
{
m_shWnd = NULL;
m_szClassName = NULL;
return TRUE;
return true;
} // end of wxTLWHiddenParentModule::OnInit
void wxTLWHiddenParentModule::OnExit()
@@ -1086,20 +1087,19 @@ HWND wxTLWHiddenParentModule::GetHWND()
m_szClassName = zHIDDEN_PARENT_CLASS;
}
}
m_shWnd = ::WinCreateWindow( HWND_DESKTOP
,(PSZ)m_szClassName
,""
,0L
,(LONG)0L
,(LONG)0L
,(LONG)0L
,(LONG)0L
,NULLHANDLE
,HWND_TOP
,0L
,NULL
,NULL
);
m_shWnd = ::WinCreateWindow( HWND_DESKTOP,
(PSZ)m_szClassName,
"",
0L,
(LONG)0L,
(LONG)0L,
(LONG)0L,
(LONG)0L,
NULLHANDLE,
HWND_TOP,
0L,
NULL,
NULL );
if (!m_shWnd)
{
wxLogLastError(_T("CreateWindow(hidden TLW parent)"));

View File

@@ -574,15 +574,15 @@ void wxWindowOS2::Lower()
::WinSetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_ZORDER | SWP_DEACTIVATE);
} // end of wxWindowOS2::Lower
void wxWindowOS2::SetTitle( const wxString& rTitle )
void wxWindowOS2::SetLabel( const wxString& label )
{
::WinSetWindowText(GetHwnd(), (PSZ)rTitle.c_str());
} // end of wxWindowOS2::SetTitle
::WinSetWindowText(GetHwnd(), (PSZ)label.c_str());
} // end of wxWindowOS2::SetLabel
wxString wxWindowOS2::GetTitle() const
wxString wxWindowOS2::GetLabel() const
{
return wxGetWindowText(GetHWND());
} // end of wxWindowOS2::GetTitle
} // end of wxWindowOS2::GetLabel
void wxWindowOS2::DoCaptureMouse()
{
@@ -593,7 +593,7 @@ void wxWindowOS2::DoCaptureMouse()
::WinSetCapture(HWND_DESKTOP, hWnd);
m_bWinCaptured = true;
}
} // end of wxWindowOS2::GetTitle
} // end of wxWindowOS2::DoCaptureMouse
void wxWindowOS2::DoReleaseMouse()
{