applied patch 446010 (unicode compilation fixes)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-08-02 18:59:50 +00:00
parent 18dbb1f630
commit 4acb6ca672
2 changed files with 22 additions and 22 deletions

View File

@ -284,7 +284,7 @@ private:
// other
//----------------------------------------------------------------------
static void SetControlClientData(const char *name,
static void SetControlClientData(const wxChar *name,
wxControlWithItems *control);
IMPLEMENT_APP(MyApp)
@ -315,8 +315,8 @@ bool MyApp::OnInit()
y = 50;
if ( argc == 3 )
{
wxSscanf(argv[1], "%d", &x);
wxSscanf(argv[2], "%d", &y);
//wxSscanf(argv[1], "%d", &x);
//wxSscanf(argv[2], "%d", &y);
}
// Create the main frame window
@ -569,7 +569,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
wxBitmap bmp(s_iconNames[n]);
if ( !bmp.Ok() || (imagelist->Add(bmp) == -1) )
{
wxLogWarning("Couldn't load the image '%s' for the notebook page %d.",
wxLogWarning(wxT("Couldn't load the image '%s' for the notebook page %d."),
s_iconNames[n], n);
}
}
@ -596,8 +596,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
wxPoint(10,90), wxSize(120,70),
5, choices, wxLB_SORT );
SetControlClientData("listbox", m_listbox);
SetControlClientData("listbox", m_listboxSorted);
SetControlClientData(wxT("listbox"), m_listbox);
SetControlClientData(wxT("listbox"), m_listboxSorted);
m_listbox->SetCursor(*wxCROSS_CURSOR);
#if wxUSE_TOOLTIPS
@ -634,8 +634,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
5, choices, wxCB_SORT );
SetControlClientData("choice", m_choice);
SetControlClientData("choice", m_choiceSorted);
SetControlClientData(wxT("choice"), m_choice);
SetControlClientData(wxT("choice"), m_choiceSorted);
m_choice->SetSelection(2);
m_choice->SetBackgroundColour( "red" );
@ -1504,14 +1504,14 @@ void MyComboBox::OnKeyUp(wxKeyEvent& event)
event.Skip();
}
static void SetControlClientData(const char *name,
static void SetControlClientData(const wxChar *name,
wxControlWithItems *control)
{
size_t count = control->GetCount();
for ( size_t n = 0; n < count; n++ )
{
wxString s;
s.Printf("%s client data for '%s'",
s.Printf(wxT("%s client data for '%s'"),
name, control->GetString(n).c_str());
control->SetClientObject(n, new wxStringClientData(s));

View File

@ -113,7 +113,7 @@ int wxCALLBACK MyCompareFunction(long item1, long item2, long sortData)
bool MyApp::OnInit()
{
// Create the main frame window
MyFrame *frame = new MyFrame("wxListCtrl Test", 50, 50, 450, 340);
MyFrame *frame = new MyFrame(wxT("wxListCtrl Test"), 50, 50, 450, 340);
// Show the frame
frame->Show(TRUE);
@ -483,10 +483,10 @@ void MyFrame::OnShowSelInfo(wxCommandEvent& event)
void MyFrame::OnShowColInfo(wxCommandEvent& event)
{
int count = m_listCtrl->GetColumnCount();
wxLogMessage("%d columns:", count);
wxLogMessage(wxT("%d columns:"), count);
for ( int c = 0; c < count; c++ )
{
wxLogMessage("\tcolumn %d has width %d", c,
wxLogMessage(wxT("\tcolumn %d has width %d"), c,
m_listCtrl->GetColumnWidth(c));
}
}
@ -504,7 +504,7 @@ void MyFrame::OnToggleMultiSel(wxCommandEvent& WXUNUSED(event))
else
flags |= wxLC_SINGLE_SEL;
m_logWindow->WriteText(wxString::Format("Current selection mode: %sle\n",
m_logWindow->WriteText(wxString::Format(wxT("Current selection mode: %sle\n"),
(flags & wxLC_SINGLE_SEL) ? "sing" : "multip"));
RecreateList(flags);
@ -554,35 +554,35 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
void MyListCtrl::OnCacheHint(wxListEvent& event)
{
wxLogMessage( "OnCacheHint: cache items %ld..%ld",
wxLogMessage( wxT("OnCacheHint: cache items %ld..%ld"),
event.GetCacheFrom(), event.GetCacheTo() );
}
void MyListCtrl::OnColClick(wxListEvent& event)
{
wxLogMessage( "OnColumnClick at %d.", event.GetColumn() );
wxLogMessage( wxT("OnColumnClick at %d."), event.GetColumn() );
}
void MyListCtrl::OnBeginDrag(wxListEvent& event)
{
wxLogMessage( "OnBeginDrag at %d,%d.",
wxLogMessage( wxT("OnBeginDrag at %d,%d."),
event.m_pointDrag.x, event.m_pointDrag.y );
}
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
{
wxLogMessage( "OnBeginRDrag at %d,%d.",
wxLogMessage( wxT("OnBeginRDrag at %d,%d."),
event.m_pointDrag.x, event.m_pointDrag.y );
}
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
{
wxLogMessage("OnBeginLabelEdit: %s", event.m_item.m_text.c_str());
wxLogMessage( wxT("OnBeginLabelEdit: %s"), event.m_item.m_text.c_str());
}
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
{
wxLogMessage("OnEndLabelEdit: %s", event.m_item.m_text.c_str());
wxLogMessage( wxT("OnEndLabelEdit: %s"), event.m_item.m_text.c_str());
}
void MyListCtrl::OnDeleteItem(wxListEvent& event)
@ -640,12 +640,12 @@ void MyListCtrl::OnSelected(wxListEvent& event)
info.m_mask = wxLIST_MASK_TEXT;
if ( GetItem(info) )
{
wxLogMessage("Value of the 2nd field of the selected item: %s",
wxLogMessage(wxT("Value of the 2nd field of the selected item: %s"),
info.m_text.c_str());
}
else
{
wxFAIL_MSG("wxListCtrl::GetItem() failed");
wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed"));
}
}
}