X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf9b6266faaa6534b75e5282aab58f1476eecbaa..2fe212b0336512aac9eace69fab09ce856b0bf4b:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 5e20b78bb5..f6dab4428b 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2070,9 +2070,6 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } case TVN_ITEMEXPANDING: - event.m_code = FALSE; - // fall through - case TVN_ITEMEXPANDED: { NM_TREEVIEW* tv = (NM_TREEVIEW*)lParam; @@ -2104,7 +2101,13 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) eventType = wxEVT_COMMAND_TREE_KEY_DOWN; TV_KEYDOWN *info = (TV_KEYDOWN *)lParam; - event.m_code = wxCharCodeMSWToWX(info->wVKey); + // we pass 0 as last CreateKeyEvent() parameter because we + // don't have access to the real key press flags here - but as + // it is only used to determin wxKeyEvent::m_altDown flag it's + // not too bad + event.m_evtKey = CreateKeyEvent(wxEVT_KEY_DOWN, + wxCharCodeMSWToWX(info->wVKey), + 0); // a separate event for Space/Return if ( !wxIsCtrlDown() && !wxIsShiftDown() &&