git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31870
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return false;
// now create the real HWND
return false;
// now create the real HWND
- if ( !MSWCreateControl(wxT("COMBOBOX"), _T(""), pos, size) )
+ if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) )
{
int pos = (int)SendMessage(GetHwnd(), CB_FINDSTRINGEXACT,
(WPARAM)-1, (LPARAM)s.c_str());
{
int pos = (int)SendMessage(GetHwnd(), CB_FINDSTRINGEXACT,
(WPARAM)-1, (LPARAM)s.c_str());
return pos == LB_ERR ? wxNOT_FOUND : pos;
}
#endif // Watcom/!Watcom
return pos == LB_ERR ? wxNOT_FOUND : pos;
}
#endif // Watcom/!Watcom
else
{
// We cannot pass wxDefaultCoord as height to wxControl. wxControl uses
else
{
// We cannot pass wxDefaultCoord as height to wxControl. wxControl uses
- // wxGetWindowRect() to determine the current height of the combobox,
- // and then again sets the combobox's height to that value. Unfortunately,
- // wxGetWindowRect doesn't include the dropdown list's height (at least
- // on Win2K), so this would result in a combobox with dropdown height of
+ // wxGetWindowRect() to determine the current height of the combobox,
+ // and then again sets the combobox's height to that value. Unfortunately,
+ // wxGetWindowRect doesn't include the dropdown list's height (at least
+ // on Win2K), so this would result in a combobox with dropdown height of
// 1 pixel. We have to determine the default height ourselves and call
// wxControl with that value instead.
int w, h;
// 1 pixel. We have to determine the default height ourselves and call
// wxControl with that value instead.
int w, h;
DoGetSize(&w, &h);
if (::SendMessage(GetHwnd(), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM) &r) != 0)
{
DoGetSize(&w, &h);
if (::SendMessage(GetHwnd(), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM) &r) != 0)
{
- height = h + r.bottom - r.top;
+ height = h + r.bottom - r.top;
return false;
// create the native control
return false;
// create the native control
- if ( !MSWCreateControl(DATETIMEPICK_CLASS, _T(""), pos, size) )
+ if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxEmptyString, pos, size) )
return false;
if ( dt.IsValid() )
return false;
if ( dt.IsValid() )
}
OutputDebugString(wxString::Format(_T("tag=%s%s"),
}
OutputDebugString(wxString::Format(_T("tag=%s%s"),
- nested ? _T("nested ") : _T(""),
+ nested ? _T("nested ") : wxEmptyString,
TagString(tag).c_str()));
if ( tag == wxDbgHelpDLL::SYMBOL_TAG_UDT )
{
TagString(tag).c_str()));
if ( tag == wxDbgHelpDLL::SYMBOL_TAG_UDT )
{
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false;
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false;
- if ( !MSWCreateControl(WC_LISTVIEW, _T(""), pos, size) )
+ if ( !MSWCreateControl(WC_LISTVIEW, wxEmptyString, pos, size) )
return false;
// explicitly say that we want to use Unicode because otherwise we get ANSI
return false;
// explicitly say that we want to use Unicode because otherwise we get ANSI
static HGLOBAL wxCreateDevNames(const wxString& driverName, const wxString& printerName, const wxString& portName)
{
HGLOBAL hDev = NULL;
static HGLOBAL wxCreateDevNames(const wxString& driverName, const wxString& printerName, const wxString& portName)
{
HGLOBAL hDev = NULL;
- // if (!driverName.IsEmpty() && !printerName.IsEmpty() && !portName.IsEmpty())
- if (driverName.IsEmpty() && printerName.IsEmpty() && portName.IsEmpty())
+ // if (!driverName.empty() && !printerName.empty() && !portName.empty())
+ if (driverName.empty() && printerName.empty() && portName.empty())
{
case DMDUP_HORIZONTAL: data.SetDuplex( wxDUPLEX_HORIZONTAL ); break;
case DMDUP_VERTICAL: data.SetDuplex( wxDUPLEX_VERTICAL ); break;
{
case DMDUP_HORIZONTAL: data.SetDuplex( wxDUPLEX_HORIZONTAL ); break;
case DMDUP_VERTICAL: data.SetDuplex( wxDUPLEX_VERTICAL ); break;
case DMDUP_SIMPLEX: data.SetDuplex( wxDUPLEX_SIMPLEX ); break;
}
}
case DMDUP_SIMPLEX: data.SetDuplex( wxDUPLEX_SIMPLEX ); break;
}
}
// Not sure if we should check for this mismatch
// wxASSERT_MSG( (m_printerName == "" || (devName == m_printerName)), "Printer name obtained from DEVMODE and DEVNAMES were different!");
// Not sure if we should check for this mismatch
// wxASSERT_MSG( (m_printerName == "" || (devName == m_printerName)), "Printer name obtained from DEVMODE and DEVNAMES were different!");
- if (printerName != wxT(""))
+ if (!printerName.empty())
data.SetPrinterName( printerName );
GlobalUnlock(hDevNames);
}
}
data.SetPrinterName( printerName );
GlobalUnlock(hDevNames);
}
}
//// Printer name
wxString name = data.GetPrinterName();
//// Printer name
wxString name = data.GetPrinterName();
{
//int len = wxMin(31, m_printerName.Len());
wxStrncpy((wxChar*)devMode->dmDeviceName,name.c_str(),31);
{
//int len = wxMin(31, m_printerName.Len());
wxStrncpy((wxChar*)devMode->dmDeviceName,name.c_str(),31);
}
// TODO: I hope it's OK to pass some empty strings to DEVNAMES.
}
// TODO: I hope it's OK to pass some empty strings to DEVNAMES.
- m_devNames = (void*) (long) wxCreateDevNames(wxT(""), data.GetPrinterName(), wxT(""));
-
+ m_devNames = (void*) (long) wxCreateDevNames(wxEmptyString, data.GetPrinterName(), wxEmptyString);
+
// ---------------------------------------------------------------------------
// wxPrintDialog
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// wxPrintDialog
// ---------------------------------------------------------------------------
// MSW handle
m_printDlg = NULL;
// MSW handle
m_printDlg = NULL;
if ( data )
m_printDialogData = *data;
if ( data )
m_printDialogData = *data;
ConvertToNative( m_printDialogData );
PRINTDLG *pd = (PRINTDLG*) m_printDlg;
ConvertToNative( m_printDialogData );
PRINTDLG *pd = (PRINTDLG*) m_printDlg;
if (m_dialogParent)
pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
else if (wxTheApp->GetTopWindow())
if (m_dialogParent)
pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
else if (wxTheApp->GetTopWindow())
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
data.GetPrintData().ConvertToNative();
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
data.GetPrintData().ConvertToNative();
PRINTDLG *pd = (PRINTDLG*) m_printDlg;
// Shouldn't have been defined anywhere
if (pd)
return false;
PRINTDLG *pd = (PRINTDLG*) m_printDlg;
// Shouldn't have been defined anywhere
if (pd)
return false;
pd = new PRINTDLG;
memset( pd, 0, sizeof(PRINTDLG) );
m_printDlg = (void*) pd;
pd = new PRINTDLG;
memset( pd, 0, sizeof(PRINTDLG) );
m_printDlg = (void*) pd;
pd->Flags = PD_RETURNDEFAULT;
pd->nCopies = 1;
pd->Flags = PD_RETURNDEFAULT;
pd->nCopies = 1;
// Pass the devmode data to the PRINTDLG structure, since it'll
// be needed when PrintDlg is called.
if (pd->hDevMode)
// Pass the devmode data to the PRINTDLG structure, since it'll
// be needed when PrintDlg is called.
if (pd->hDevMode)
if ( data.GetSetupDialog() )
pd->Flags |= PD_PRINTSETUP;
#endif
if ( data.GetSetupDialog() )
pd->Flags |= PD_PRINTSETUP;
#endif
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
// Pass the devmode data back to the wxPrintData structure where it really belongs.
if (pd->hDevMode)
{
// Pass the devmode data back to the wxPrintData structure where it really belongs.
if (pd->hDevMode)
{
data.EnableHelp( ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP) );
#if WXWIN_COMPATIBILITY_2_4
data.SetSetupDialog( ((pd->Flags & PD_PRINTSETUP) == PD_PRINTSETUP) );
data.EnableHelp( ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP) );
#if WXWIN_COMPATIBILITY_2_4
data.SetSetupDialog( ((pd->Flags & PD_PRINTSETUP) == PD_PRINTSETUP) );
int wxWindowsPageSetupDialog::ShowModal()
{
ConvertToNative( m_pageSetupData );
int wxWindowsPageSetupDialog::ShowModal()
{
ConvertToNative( m_pageSetupData );
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageDlg;
if (m_dialogParent)
pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageDlg;
if (m_dialogParent)
pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
// Shouldn't have been defined anywhere
if (pd)
return false;
// Shouldn't have been defined anywhere
if (pd)
return false;
pd = new PAGESETUPDLG;
pd->hDevMode = NULL;
pd->hDevNames = NULL;
pd = new PAGESETUPDLG;
pd->hDevMode = NULL;
pd->hDevNames = NULL;
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
wxWindowsPrintNativeData *native_data =
(wxWindowsPrintNativeData *) data.GetPrintData().GetNativeData();
// Pass the devmode data back to the wxPrintData structure where it really belongs.
if (pd->hDevMode)
{
// Pass the devmode data back to the wxPrintData structure where it really belongs.
if (pd->hDevMode)
{
native_data->SetDevMode( (void*) pd->hDevMode );
pd->hDevMode = NULL;
}
native_data->SetDevMode( (void*) pd->hDevMode );
pd->hDevMode = NULL;
}
// Isn't this superfluous? It's called again below.
// data.GetPrintData().ConvertFromNative();
// Isn't this superfluous? It's called again below.
// data.GetPrintData().ConvertFromNative();
data.SetMarginTopLeft( wxPoint(pd->rtMargin.left / 100, pd->rtMargin.top / 100) );
data.SetMarginBottomRight( wxPoint(pd->rtMargin.right / 100, pd->rtMargin.bottom / 100) );
data.SetMarginTopLeft( wxPoint(pd->rtMargin.left / 100, pd->rtMargin.top / 100) );
data.SetMarginBottomRight( wxPoint(pd->rtMargin.right / 100, pd->rtMargin.bottom / 100) );
void wxStackFrame::OnParam(PSYMBOL_INFO pSymInfo)
{
void wxStackFrame::OnParam(PSYMBOL_INFO pSymInfo)
{
- m_paramTypes.Add(_T(""));
+ m_paramTypes.Add(wxEmptyString);
m_paramNames.Add(wxString::FromAscii(pSymInfo->Name));
m_paramNames.Add(wxString::FromAscii(pSymInfo->Name));
__except ( EXCEPTION_EXECUTE_HANDLER )
#endif
{
__except ( EXCEPTION_EXECUTE_HANDLER )
#endif
{
- m_paramValues.Add(_T(""));
+ m_paramValues.Add(wxEmptyString);
case TTN_NEEDTEXT:
{
// TODO
case TTN_NEEDTEXT:
{
// TODO
-// if (tool->m_shortHelpString != "")
+// if (!tool->m_shortHelpString.empty())
// ttText->lpszText = (char *) (const char *)tool->m_shortHelpString;
}
#endif
// ttText->lpszText = (char *) (const char *)tool->m_shortHelpString;
}
#endif
wxString wxTreeCtrl::GetItemText(const wxTreeItemId& item) const
{
wxString wxTreeCtrl::GetItemText(const wxTreeItemId& item) const
{
- wxCHECK_MSG( item.IsOk(), wxT(""), wxT("invalid tree item") );
+ wxCHECK_MSG( item.IsOk(), wxEmptyString, wxT("invalid tree item") );
wxChar buf[512]; // the size is arbitrary...
wxChar buf[512]; // the size is arbitrary...