#include "wx/msw/private.h"
-#if defined(__WXWINCE__)
+#if defined(__WXWINCE__) && !defined(__HANDHELDPC__)
#include <ole2.h>
#include <shellapi.h>
#if _WIN32_WCE < 400
wxBEGIN_PROPERTIES_TABLE(wxListCtrl)
wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
- wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+ wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxListCtrl)
// explicitly say that we want to use Unicode because otherwise we get ANSI
// versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build
-#if wxUSE_UNICODE
- ::SendMessage(GetHwnd(), LVM_SETUNICODEFORMAT, TRUE, 0);
-#endif
+ wxSetCCUnicodeFormat(GetHwnd());
// for comctl32.dll v 4.70+ we want to have this attribute because it's
// prettier (and also because wxGTK does it like this)
0, LVS_EX_FULLROWSELECT);
}
- // inherit foreground colour but our background should be the same as for
- // listboxes and other such "container" windows and not inherited
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
- SetForegroundColour(GetParent()->GetForegroundColour());
-
return TRUE;
}
// accessors
// ----------------------------------------------------------------------------
+/* static */ wxVisualAttributes
+wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
+{
+ wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant);
+
+ // common controls have their own default font
+ attrs.font = wxGetCCDefaultFont();
+
+ return attrs;
+}
+
// Sets the foreground, i.e. text, colour
bool wxListCtrl::SetForegroundColour(const wxColour& col)
{
event.m_col = nmHDR->iItem;
break;
-#if defined(__WXWINCE__) && _WIN32_WCE < 400
+#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
case GN_CONTEXTMENU:
#endif //__WXWINCE__
case NM_RCLICK:
// where did the click occur?
POINT ptClick;
-#if defined(__WXWINCE__) && _WIN32_WCE < 400
+#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
if(nmhdr->code == GN_CONTEXTMENU) {
ptClick = ((NMRGINFO*)nmhdr)->ptAction;
} else
// there's a GPF in Windows.
// By returning TRUE here, we avoid further processing
// of this strange message.
- if ( info->iItem >= GetColumnCount() )
+ if ( (unsigned)info->iItem >= (unsigned)GetColumnCount() )
return TRUE;
}
// fall through
case LVN_ITEMCHANGED:
// we translate this catch all message into more interesting
- // (and more easy to process) wxWindows events
+ // (and more easy to process) wxWidgets events
// first of all, we deal with the state change events only and
// only for valid items (item == -1 for the virtual list
event.m_item.m_data = GetItemData(iItem);
break;
-#if defined(__WXWINCE__) && _WIN32_WCE < 400
+#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
case GN_CONTEXTMENU:
#endif //__WXWINCE__
case NM_RCLICK:
LV_HITTESTINFO lvhti;
wxZeroMemory(lvhti);
-#if defined(__WXWINCE__) && _WIN32_WCE < 400
+#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
if(nmhdr->code == GN_CONTEXTMENU) {
lvhti.pt = ((NMRGINFO*)nmhdr)->ptAction;
} else