![]() |
| ||
| MFC - OnKeyDown event. In CApplView I create a Login Form. void CApplView::Login_Entry(CDC *pDC) {How do I add code to set the focus on pPasswd when TAB or RETN is entered in pUserid? Something like... OnKeyDown (in pUserid)I cannot figure out how to incorporate the event in the MESSAGE MAP. |
| ||
| Re: MFC - OnKeyDown event. You want to add a "Event Handler" for the event of pressing a Tab key or Return key? What Compiler of VC are you using? |
| ||
| Re: MFC - OnKeyDown event. Quote:
I can include, in my MESSAGE MAP, ON_WM_KEYDOWN() and write a handler function.. void CApplView::OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) {...} That will work to capture a key stroke when the main window has focus. I want it to capture the key stroke when pUserid has the focus. I know I can do this by creating a new class derived from CEdit, but I thought there must be a simpler way. Quote:
|
| All times are GMT -4. The time now is 6:24 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC