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. Below, we will implement the document viewProgramIn the left-side navigation pane.
1. Add the corresponding function declaration of the idok message to the cxxxview class declaration.
Afx_msg void onok ();
2. Add message ing in the message ing table implemented by the cxxxview class
Begin_message_map (ccenterserverview, clistview) ...... on_command (idok, onok) end_message_map ()
3. added the message Response Function in the cxxxview implementation section.
Void ccenterserverview: onok () {afxmessagebox (_ T ("cview "));}
When the focus is on the toolbar's combo box, you can press the Enter key to bring up the cview message box.