Compile fix (VC++ 6 doesn't like wxString::Format with only 1 arg: gives several pages of template-related warnings)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-08 11:53:13 +00:00
parent bbf941bda9
commit f196316400

View File

@@ -129,12 +129,12 @@ public:
{ {
wxLogMessage(_T("Listbox item %d double clicked."), event.GetInt()); wxLogMessage(_T("Listbox item %d double clicked."), event.GetInt());
} }
void OnHtmlLinkClicked(wxHtmlLinkEvent& event); void OnHtmlLinkClicked(wxHtmlLinkEvent& event);
void OnHtmlCellHover(wxHtmlCellEvent &event); void OnHtmlCellHover(wxHtmlCellEvent &event);
void OnHtmlCellClicked(wxHtmlCellEvent &event); void OnHtmlCellClicked(wxHtmlCellEvent &event);
wxSimpleHtmlListBox *GetSimpleBox() wxSimpleHtmlListBox *GetSimpleBox()
{ return wxDynamicCast(m_hlbox, wxSimpleHtmlListBox); } { return wxDynamicCast(m_hlbox, wxSimpleHtmlListBox); }
MyHtmlListBox *GetMyBox() MyHtmlListBox *GetMyBox()
{ return wxDynamicCast(m_hlbox, MyHtmlListBox); } { return wxDynamicCast(m_hlbox, MyHtmlListBox); }
@@ -238,9 +238,9 @@ MyFrame::MyFrame()
#if wxUSE_MENUS #if wxUSE_MENUS
// create a menu bar // create a menu bar
wxMenu *menuFile = new wxMenu; wxMenu *menuFile = new wxMenu;
menuFile->AppendRadioItem(HtmlLbox_CustomBox, _T("Use custom box"), menuFile->AppendRadioItem(HtmlLbox_CustomBox, _T("Use custom box"),
_T("Use a wxHtmlListBox virtual class control")); _T("Use a wxHtmlListBox virtual class control"));
menuFile->AppendRadioItem(HtmlLbox_SimpleBox, _T("Use simple box"), menuFile->AppendRadioItem(HtmlLbox_SimpleBox, _T("Use simple box"),
_T("Use a wxSimpleHtmlListBox control")); _T("Use a wxSimpleHtmlListBox control"));
menuFile->AppendSeparator(); menuFile->AppendSeparator();
menuFile->Append(HtmlLbox_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); menuFile->Append(HtmlLbox_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
@@ -288,7 +288,7 @@ MyFrame::MyFrame()
CreateStatusBar(2); CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!")); SetStatusText(_T("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
// create the child controls // create the child controls
CreateBox(); CreateBox();
wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, _T(""), wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, _T(""),
@@ -321,7 +321,7 @@ void MyFrame::CreateBox()
{ {
m_hlbox = new wxSimpleHtmlListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_hlbox = new wxSimpleHtmlListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
0, NULL, multi ? wxLB_MULTIPLE : 0); 0, NULL, multi ? wxLB_MULTIPLE : 0);
// unlike wxHtmlListBox which is abstract, wxSimpleHtmlListBox is a // unlike wxHtmlListBox which is abstract, wxSimpleHtmlListBox is a
// concrete control and doesn't support virtual mode, this we need // concrete control and doesn't support virtual mode, this we need
// to add all of its items from the beginning // to add all of its items from the beginning
@@ -354,12 +354,12 @@ void MyFrame::CreateBox()
void MyFrame::OnSimpleOrCustomBox(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSimpleOrCustomBox(wxCommandEvent& WXUNUSED(event))
{ {
wxWindow *old = m_hlbox; wxWindow *old = m_hlbox;
// we need to recreate the listbox // we need to recreate the listbox
CreateBox(); CreateBox();
GetSizer()->Replace(old, m_hlbox); GetSizer()->Replace(old, m_hlbox);
delete old; delete old;
GetSizer()->Layout(); GetSizer()->Layout();
Refresh(); Refresh();
} }
@@ -401,7 +401,7 @@ void MyFrame::OnSetMargins(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnToggleMulti(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnToggleMulti(wxCommandEvent& WXUNUSED(event))
{ {
wxWindow *old = m_hlbox; wxWindow *old = m_hlbox;
// we need to recreate the listbox // we need to recreate the listbox
CreateBox(); CreateBox();
GetSizer()->Replace(old, m_hlbox); GetSizer()->Replace(old, m_hlbox);
@@ -575,7 +575,7 @@ wxString MyHtmlListBox::OnGetItem(size_t n) const
{ {
if ( !n && m_firstItemUpdated ) if ( !n && m_firstItemUpdated )
{ {
return wxString::Format(_T("<h1><b>Just updated</b></h1>")); return _T("<h1><b>Just updated</b></h1>");
} }
#ifdef USE_HTML_FILE #ifdef USE_HTML_FILE