|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Christoph Stoepel
|
Nov 12, 2005 - 9:38 AM
|
Hi,
this should be added to the FAQs. I added an Edit control to a toolbar as described in the FAQ Section:
if (!n_wndEditName.Create(WS_CHILD | WS_VISIBLE, CRect(0, 0, 150, 18), &m_wndToolBar, ID_INPUT_SEARCH) || !m_wndToolBar.SetButtonCtrl(m_wndToolBar.CommandToIndex(n_wndEditName.GetDlgCtrlID()), &n_wndEditName) ) ...
But how can I get informed, when the user hits "Return" (to start a search or whatever)? I think this is more a MFC question but also applies to Prof-UIS. For what message do I have to wait (WM_CHAR, WM_KEYDOWN) or which method do I have to override (PreTranslateMessage) in CMainFrame? Registering an ON_COMMAND Handler ist obviously wrong.
Regards Christoph (currently using Freeware Version)
|
|
Technical Support
|
Nov 14, 2005 - 3:27 AM
|
Just create a CExtEdit or CEdit -derived class and handle the WM_KEYDOWN message in it by adding the OnKeyDown() method with the class wizard or by overriding the WindowProc() virtual method manually. This question is not too complex, but we will add it.
|
|