// Create the ListView control.
m_hWnd = (WXHWND)CreateWindowEx(exStyle,
WC_LISTVIEW,
- "",
+ _T(""),
wstyle,
x, y, width, height,
(HWND) parent->GetHWND(),
NULL);
if ( !m_hWnd ) {
- wxLogError("Can't create list control window.");
+ wxLogError(_T("Can't create list control window."));
return FALSE;
}
WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ;
HWND hWndListControl = CreateWindowEx(exStyle,
WC_LISTVIEW,
- "",
+ _T(""),
style,
x, y, width, height,
(HWND) GetParent()->GetHWND(),
if ( item.m_mask & wxLIST_MASK_TEXT )
{
lvCol.mask |= LVCF_TEXT;
- lvCol.pszText = new char[513];
+ lvCol.pszText = new wxChar[513];
lvCol.cchTextMax = 512;
}
#endif
lvItem.iItem = info.m_itemId;
+ lvItem.iSubItem = info.m_col;
if ( info.m_mask & wxLIST_MASK_TEXT )
{
lvItem.mask |= LVIF_TEXT;
- lvItem.pszText = new char[513];
+ lvItem.pszText = new wxChar[513];
lvItem.cchTextMax = 512;
}
else
else if ( code == wxLIST_RECT_LABEL )
code2 = LVIR_LABEL;
+#ifdef __WXWINE__
+ bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2 ) != 0);
+#else
bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2, code2) != 0);
+#endif
rect.x = rect2.left;
rect.y = rect2.top;
}
else
{
- wxLogDebug("Failed to insert the column '%s' into listview!",
+ wxLogDebug(_T("Failed to insert the column '%s' into listview!"),
lvCol.pszText);
}
if ( !event.m_item.m_text.IsNull() )
{
info->item.pszText = AddPool(event.m_item.m_text);
- info->item.cchTextMax = strlen(info->item.pszText) + 1;
+ info->item.cchTextMax = wxStrlen(info->item.pszText) + 1;
}
}
// wxConvertToMSWListItem(this, event.m_item, info->item);
return TRUE;
}
-char *wxListCtrl::AddPool(const wxString& str)
+wxChar *wxListCtrl::AddPool(const wxString& str)
{
// Remove the first element if 3 strings exist
if ( m_stringPool.Number() == 3 )
delete[] (char *)node->Data();
delete node;
}
- wxNode *node = m_stringPool.Add((char *) (const char *)str);
- return (char *)node->Data();
+ wxNode *node = m_stringPool.Add(WXSTRINGCAST str);
+ return (wxChar *)node->Data();
}
// List item structure
if ( needText )
{
- lvItem.pszText = new char[513];
+ lvItem.pszText = new wxChar[513];
lvItem.cchTextMax = 512;
}
// lvItem.mask |= TVIF_HANDLE | TVIF_STATE | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM ;
}
else
{
- lvItem.pszText = (char *) (const char *)info.m_text ;
+ lvItem.pszText = WXSTRINGCAST info.m_text ;
if ( lvItem.pszText )
lvItem.cchTextMax = info.m_text.Length();
else