replaced T() makro with wxT() due to namespace probs, _T() exists, too
fixed compilation problems, mainly in html code compiles and links fine on Solaris, runs with samples and Mahogany git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -133,7 +133,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
event.m_commandInt = aSelections[0] ;
|
||||
event.m_clientData = GetClientData(event.m_commandInt);
|
||||
wxString str(GetString(event.m_commandInt));
|
||||
if (str != T(""))
|
||||
if (str != wxT(""))
|
||||
{
|
||||
event.m_commandString = str;
|
||||
}
|
||||
@@ -232,13 +232,13 @@ bool wxListBox::Create(wxWindow *parent,
|
||||
wstyle |= WS_BORDER;
|
||||
}
|
||||
|
||||
m_hWnd = (WXHWND)::CreateWindowEx(exStyle, T("LISTBOX"), NULL,
|
||||
m_hWnd = (WXHWND)::CreateWindowEx(exStyle, wxT("LISTBOX"), NULL,
|
||||
wstyle | WS_CHILD,
|
||||
0, 0, 0, 0,
|
||||
(HWND)parent->GetHWND(), (HMENU)m_windowId,
|
||||
wxGetInstance(), NULL);
|
||||
|
||||
wxCHECK_MSG( m_hWnd, FALSE, T("Failed to create listbox") );
|
||||
wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create listbox") );
|
||||
|
||||
#if wxUSE_CTL3D
|
||||
if (want3D)
|
||||
@@ -287,7 +287,7 @@ void wxListBox::SetupColours()
|
||||
void wxListBox::SetFirstItem(int N)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::SetFirstItem") );
|
||||
wxT("invalid index in wxListBox::SetFirstItem") );
|
||||
|
||||
SendMessage(GetHwnd(),LB_SETTOPINDEX,(WPARAM)N,(LPARAM)0) ;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ void wxListBox::SetFirstItem(const wxString& s)
|
||||
void wxListBox::Delete(int N)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::Delete") );
|
||||
wxT("invalid index in wxListBox::Delete") );
|
||||
|
||||
SendMessage(GetHwnd(), LB_DELETESTRING, N, 0);
|
||||
m_noItems--;
|
||||
@@ -337,7 +337,7 @@ void wxListBox::Append(const wxString& item, void *Client_data)
|
||||
if ( m_windowStyle & wxLB_OWNERDRAW ) {
|
||||
// client data must be pointer to wxOwnerDrawn, otherwise we would crash
|
||||
// in OnMeasure/OnDraw.
|
||||
wxFAIL_MSG(T("Can't use client data with owner-drawn listboxes"));
|
||||
wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -377,7 +377,7 @@ void wxListBox::Set(int n, const wxString *choices, void** clientData)
|
||||
ListBox_SetItemData(GetHwnd(), ui, pNewItem);
|
||||
|
||||
wxASSERT_MSG(clientData[ui] == NULL,
|
||||
T("Can't use client data with owner-drawn listboxes"));
|
||||
wxT("Can't use client data with owner-drawn listboxes"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -415,7 +415,7 @@ void wxListBox::Clear()
|
||||
void wxListBox::SetSelection(int N, bool select)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::SetSelection") );
|
||||
wxT("invalid index in wxListBox::SetSelection") );
|
||||
|
||||
if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED))
|
||||
SendMessage(GetHwnd(), LB_SETSEL, select, N);
|
||||
@@ -431,7 +431,7 @@ void wxListBox::SetSelection(int N, bool select)
|
||||
bool wxListBox::Selected(int N) const
|
||||
{
|
||||
wxCHECK_MSG( N >= 0 && N < m_noItems, FALSE,
|
||||
T("invalid index in wxListBox::Selected") );
|
||||
wxT("invalid index in wxListBox::Selected") );
|
||||
|
||||
return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? FALSE : TRUE;
|
||||
}
|
||||
@@ -439,7 +439,7 @@ bool wxListBox::Selected(int N) const
|
||||
void wxListBox::Deselect(int N)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::Deselect") );
|
||||
wxT("invalid index in wxListBox::Deselect") );
|
||||
|
||||
if ((m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED))
|
||||
SendMessage(GetHwnd(), LB_SETSEL, FALSE, N);
|
||||
@@ -448,7 +448,7 @@ void wxListBox::Deselect(int N)
|
||||
void *wxListBox::GetClientData(int N) const
|
||||
{
|
||||
wxCHECK_MSG( N >= 0 && N < m_noItems, NULL,
|
||||
T("invalid index in wxListBox::GetClientData") );
|
||||
wxT("invalid index in wxListBox::GetClientData") );
|
||||
|
||||
return (void *)SendMessage(GetHwnd(), LB_GETITEMDATA, N, 0);
|
||||
}
|
||||
@@ -456,10 +456,10 @@ void *wxListBox::GetClientData(int N) const
|
||||
void wxListBox::SetClientData(int N, void *Client_data)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::SetClientData") );
|
||||
wxT("invalid index in wxListBox::SetClientData") );
|
||||
|
||||
if ( ListBox_SetItemData(GetHwnd(), N, Client_data) == LB_ERR )
|
||||
wxLogDebug(T("LB_SETITEMDATA failed"));
|
||||
wxLogDebug(wxT("LB_SETITEMDATA failed"));
|
||||
}
|
||||
|
||||
// Return number of selections and an array of selected integers
|
||||
@@ -473,7 +473,7 @@ int wxListBox::GetSelections(wxArrayInt& aSelections) const
|
||||
if (no_sel != 0) {
|
||||
int *selections = new int[no_sel];
|
||||
if ( ListBox_GetSelItems(GetHwnd(), no_sel, selections) == LB_ERR ) {
|
||||
wxFAIL_MSG(T("This listbox can't have single-selection style!"));
|
||||
wxFAIL_MSG(wxT("This listbox can't have single-selection style!"));
|
||||
}
|
||||
|
||||
aSelections.Alloc(no_sel);
|
||||
@@ -499,7 +499,7 @@ int wxListBox::GetSelection() const
|
||||
wxCHECK_MSG( !(m_windowStyle & wxLB_MULTIPLE) &&
|
||||
!(m_windowStyle & wxLB_EXTENDED),
|
||||
-1,
|
||||
T("GetSelection() can't be used with multiple-selection "
|
||||
wxT("GetSelection() can't be used with multiple-selection "
|
||||
"listboxes, use GetSelections() instead.") );
|
||||
|
||||
return ListBox_GetCurSel(GetHwnd());
|
||||
@@ -509,7 +509,7 @@ int wxListBox::GetSelection() const
|
||||
wxString wxListBox::GetString(int N) const
|
||||
{
|
||||
wxCHECK_MSG( N >= 0 && N < m_noItems, "",
|
||||
T("invalid index in wxListBox::GetClientData") );
|
||||
wxT("invalid index in wxListBox::GetClientData") );
|
||||
|
||||
int len = ListBox_GetTextLen(GetHwnd(), N);
|
||||
|
||||
@@ -531,7 +531,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
|
||||
return;
|
||||
TEXTMETRIC lpTextMetric;
|
||||
|
||||
if (s != T(""))
|
||||
if (s != wxT(""))
|
||||
{
|
||||
int existingExtent = (int)SendMessage(GetHwnd(), LB_GETHORIZONTALEXTENT, 0, 0L);
|
||||
HDC dc = GetWindowDC(GetHwnd());
|
||||
@@ -584,20 +584,20 @@ void
|
||||
wxListBox::InsertItems(int nItems, const wxString items[], int pos)
|
||||
{
|
||||
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
|
||||
T("invalid index in wxListBox::InsertItems") );
|
||||
wxT("invalid index in wxListBox::InsertItems") );
|
||||
|
||||
int i;
|
||||
for (i = 0; i < nItems; i++)
|
||||
ListBox_InsertString(GetHwnd(), i + pos, items[i]);
|
||||
m_noItems += nItems;
|
||||
|
||||
SetHorizontalExtent(T(""));
|
||||
SetHorizontalExtent(wxT(""));
|
||||
}
|
||||
|
||||
void wxListBox::SetString(int N, const wxString& s)
|
||||
{
|
||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||
T("invalid index in wxListBox::SetString") );
|
||||
wxT("invalid index in wxListBox::SetString") );
|
||||
|
||||
int sel = -1;
|
||||
if (!(m_windowStyle & wxLB_MULTIPLE) && !(m_windowStyle & wxLB_EXTENDED))
|
||||
@@ -754,7 +754,7 @@ bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
|
||||
MEASUREITEMSTRUCT *pStruct = (MEASUREITEMSTRUCT *)item;
|
||||
|
||||
wxDC dc;
|
||||
dc.SetHDC((WXHDC)CreateIC(T("DISPLAY"), NULL, NULL, 0));
|
||||
dc.SetHDC((WXHDC)CreateIC(wxT("DISPLAY"), NULL, NULL, 0));
|
||||
dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_ANSI_VAR_FONT));
|
||||
|
||||
pStruct->itemHeight = dc.GetCharHeight() + 2*OWNER_DRAWN_LISTBOX_EXTRA_SPACE;
|
||||
|
Reference in New Issue
Block a user