We have previously implemented adding a combo box in the toolbar, and it is easy to execute a search in the view through the data input in the combo box. Now, we have encountered a problem, that is, every time you input data, you have to click the search button next to it. In IE, enter the URL and press enter to transfer it to the corresponding website. In the document view program, let the combo box directly press enter to send a message. 1. Add the IDOK message function declaration [cpp] afx_msg void OnOK () to the CxxxView class declaration; 2. Add the message ing [cpp] www.2cto to the Message ing table implemented by the CxxxView class. comBEGIN_MESSAGE_MAP (CCenterServerView, CListView )...... ON_COMMAND (IDOK, OnOK) END_MESSAGE_MAP () 3. Add the message Response Function in the CxxxView class implementation section [cpp] void CCenterServerView: OnOK () {AfxMessageBox (_ T ("cview");} in this case, when the focus is on the toolbar's combo box, you press the Enter key to bring up the cview message box.