#pragma once #include "afxwin.h" // this class inheritance is as follows // CObject->CCmdTarget->CWin->CComboBox->CTrapKeyComboBox //to use: //1. create a dialog witha CDialog object compatible class //2. create a CComboBox type ComboBox on the dialog page //3. add a control variable for the ComboBox box //4. rename the control variable class type to this class class CTrapKeyComboBox : public CComboBox { public: CTrapKeyComboBox(void); virtual ~CTrapKeyComboBox(); bool isEnterKey; bool isLButton; virtual BOOL PreTranslateMessage(MSG* pMsg); };