OnCreateControl, edit control in toolbar |
Post Reply |
Author | |
Maye Johnson
Groupie Joined: 16 October 2004 Status: Offline Points: 40 |
Post Options
Thanks(0)
Posted: 21 March 2005 at 9:39pm |
I have an edit control in my toolbar that was created in
OnCreateControl(). I want the user to be able to input, hit
Enter, and have an action occur. How do I capture the Enter key?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ON_XTP_EXECUTE(ID_EDIT_FIND, OnEditFind)
void CCustomThemesView::OnEditFind(NMHDR* pNMHDR, LRESULT* pResult) CXTPControlEdit* pControl = (CXTPControlEdit*)tagNMCONTROL->pControl; |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Maye Johnson
Groupie Joined: 16 October 2004 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
I already have a handler, but it doesn't get called when the Enter key
is pressed. Maybe there's something wrong with my setup code?
|
|
Maye Johnson
Groupie Joined: 16 October 2004 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
I added ES_WANTRETURN to the Create call, but it didn't change
anything. What I want is a masked input control in the
toolbar, set to accept only numbers and have a specified input
length. That's why I used CEdit, but then I don't get the Enter
key and the input field doesn't get outlined when the mouse is over it.
Edited by Maye Johnson |
|
Barto
Groupie Joined: 27 February 2005 Location: Germany Status: Offline Points: 60 |
Post Options
Thanks(0)
|
I have code like this that works for me:
|
|
xxcln
Newbie Joined: 05 June 2007 Location: China Status: Offline Points: 12 |
Post Options
Thanks(0)
|
//header file
afx_msg void OnUpdateGoto(CCmdUI* pCmdUI);
//cpp file
ON_UPDATE_COMMAND_UI(ID_WINDOW_GOTO, OnUpdateGoto)
void CMainFrame::OnUpdateGoto(CCmdUI* pCmdUI)
{ pCmdUI->Enable(MDIGetActive() != NULL);
}
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |