/////////////////////////////////////////////////////////////////////////////
-// Name: dialog.cpp
+// Name: src/os2/dialog.cpp
// Purpose: wxDialog class
// Author: David Webster
// Modified by:
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));
return parent;
}
-bool wxDialog::Show(
- bool bShow
-)
+bool wxDialog::Show( bool bShow )
{
if ( bShow == IsShown() )
return false;
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 )
{
// dialogs don't get WM_SIZE message after creation unlike most (all?)
- // other windows and so could start their life non laid out correctly
+ // other windows and so could start their life not laid out correctly
// if we didn't call Layout() from here
//
// NB: normally we should call it just the first time but doing it
extern bool gbInOnIdle;
bool bWasInOnIdle = gbInOnIdle;
- gbInOnIdle = FALSE;
+ gbInOnIdle = false;
// enter and run the modal loop
{
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;
+ MRESULT rc = 0;
+ bool bProcessed = false;
switch (uMessage)
{