+ m_oldSelections.clear();
+ m_oldSelections.push_back(n);
+ }
+
+ // Do generate an event otherwise.
+ return SendEvent(evtType, n, true /* selection */);
+}
+
+WXLRESULT
+wxListBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+ // Remember whether there was a keyboard or mouse event before
+ // LBN_SELCHANGE: this allows us to correctly determine the item affected
+ // by it in MSWCommand() above in any case.
+ if ( WM_KEYFIRST <= nMsg && nMsg <= WM_KEYLAST )
+ m_selectedByKeyboard = true;
+ else if ( WM_MOUSEFIRST <= nMsg && nMsg <= WM_MOUSELAST )
+ m_selectedByKeyboard = false;