git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11263
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// other
//----------------------------------------------------------------------
// other
//----------------------------------------------------------------------
-static void SetControlClientData(const char *name,
+static void SetControlClientData(const wxChar *name,
wxControlWithItems *control);
IMPLEMENT_APP(MyApp)
wxControlWithItems *control);
IMPLEMENT_APP(MyApp)
y = 50;
if ( argc == 3 )
{
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
}
// Create the main frame window
wxBitmap bmp(s_iconNames[n]);
if ( !bmp.Ok() || (imagelist->Add(bmp) == -1) )
{
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."),
wxPoint(10,90), wxSize(120,70),
5, choices, wxLB_SORT );
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
m_listbox->SetCursor(*wxCROSS_CURSOR);
#if wxUSE_TOOLTIPS
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
5, choices, wxCB_SORT );
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" );
m_choice->SetSelection(2);
m_choice->SetBackgroundColour( "red" );
-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;
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));
name, control->GetString(n).c_str());
control->SetClientObject(n, new wxStringClientData(s));
bool MyApp::OnInit()
{
// Create the main frame window
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);
// Show the frame
frame->Show(TRUE);
void MyFrame::OnShowColInfo(wxCommandEvent& event)
{
int count = m_listCtrl->GetColumnCount();
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++ )
{
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));
}
}
m_listCtrl->GetColumnWidth(c));
}
}
else
flags |= wxLC_SINGLE_SEL;
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);
(flags & wxLC_SINGLE_SEL) ? "sing" : "multip"));
RecreateList(flags);
void MyListCtrl::OnCacheHint(wxListEvent& 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)
{
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)
{
}
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)
{
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)
{
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)
{
}
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)
}
void MyListCtrl::OnDeleteItem(wxListEvent& event)
info.m_mask = wxLIST_MASK_TEXT;
if ( GetItem(info) )
{
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
{
info.m_text.c_str());
}
else
{
- wxFAIL_MSG("wxListCtrl::GetItem() failed");
+ wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed"));