_T("SelectItem(false) works only for multiselect") );
wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
_T("SelectItem(false) works only for multiselect") );
wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
// fire EVT_RIGHT_DOWN
HandleMouseEvent(nMsg, x, y, wParam);
// fire EVT_RIGHT_DOWN
HandleMouseEvent(nMsg, x, y, wParam);
nmhdr.idFrom, (LPARAM)&nmhdr);
// prevent tree control default processing, as we've
nmhdr.idFrom, (LPARAM)&nmhdr);
// prevent tree control default processing, as we've
wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, this, htItem);
event.m_pointDrag = wxPoint(x, y);
wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, this, htItem);
event.m_pointDrag = wxPoint(x, y);
// if we don't do it, the tree seems to think that 2 items
// are selected simultaneously which is quite weird
// if we don't do it, the tree seems to think that 2 items
// are selected simultaneously which is quite weird
// fabricate the lParam and wParam parameters sufficiently
// similar to the ones from a "real" WM_KEYDOWN so that
// CreateKeyEvent() works correctly
// fabricate the lParam and wParam parameters sufficiently
// similar to the ones from a "real" WM_KEYDOWN so that
// CreateKeyEvent() works correctly
// Vista's tree control has introduced some problems with our
// multi-selection tree. When TreeView_SelectItem() is called,
// the wrong items are deselected.
// Vista's tree control has introduced some problems with our
// multi-selection tree. When TreeView_SelectItem() is called,
// the wrong items are deselected.
// Fortunately, Vista provides a new notification, TVN_ITEMCHANGING
// that can be used to regulate this incorrect behavior. The
// following messages will allow only the unlocked item's selection
// Fortunately, Vista provides a new notification, TVN_ITEMCHANGING
// that can be used to regulate this incorrect behavior. The
// following messages will allow only the unlocked item's selection
{
// item's state is locked, don't allow the change
// returning 1 will disallow the change
{
// item's state is locked, don't allow the change
// returning 1 will disallow the change