- if ( m_windowStyle & wxTR_MULTIPLE )
- {
- ::SelectItem(GetHwnd(), HITEM(item), select);
- }
- else
- {
- wxASSERT_MSG( select,
- _T("SelectItem(false) works only for multiselect") );
-
- // inspite of the docs (MSDN Jan 99 edition), we don't seem to receive
- // the notification from the control (i.e. TVN_SELCHANG{ED|ING}), so
- // send them ourselves
+ wxASSERT_MSG( select || HasFlag(wxTR_MULTIPLE),
+ _T("SelectItem(false) works only for multiselect") );