1 #include "studiox_includes.h" 2 #include "express_combobox.h" 3 express_combobox()4express_combobox::express_combobox() 5 { 6 7 } 8 ~express_combobox()9express_combobox::~express_combobox() 10 { 11 12 } 13 14 PreTranslateMessage(MSG * pMsg)15BOOL express_combobox::PreTranslateMessage(MSG* pMsg) 16 { 17 // TODO: Add your specialized code here and/or call the base class 18 if (pMsg->message == WM_KEYDOWN) 19 { 20 switch (pMsg->wParam) 21 { 22 case VK_SPACE: 23 case VK_RETURN: 24 if (!GetDroppedState()) 25 { 26 // show drop list 27 ShowDropDown(TRUE); 28 } 29 else 30 { 31 ShowDropDown(FALSE); 32 } 33 return TRUE; 34 } 35 36 } 37 38 return CComboBox::PreTranslateMessage(pMsg); 39 } 40