Guest dynamowku Posted March 31, 2005 Report Posted March 31, 2005 I have a dialog that has two list boxes and an edit box. <List> <List> <Edit> Once I arrow into the edit box the cursor is "stuck" there and I cannot get the focus to go back to a list box! Can someone please help me with this? Thanks!
Guest Ravi Ranjan Posted August 18, 2005 Report Posted August 18, 2005 I have a dialog that has two list boxes and an edit box. Once I arrow into the edit box the cursor is "stuck" there and I cannot get the focus to go back to a list box! Can someone please help me with this? Thanks! <{POST_SNAPBACK}> Hi, Try using window subclassing.for example LRESULT APIENTRY EditSubclassProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam) { switch(wParam) { case VK_DOWN : // your code to change the focus on which u want break; case VK_UP : // your code to change the focus on which u want break; } return CallWindowProc(m_OldProcEdit,hwnd, uMsg,wParam, lParam); } and in initdialog() call m_OldProcEdit= (WNDPROC) SetWindowLong(hwndEdit,GWL_WNDPROC,(long) (WNDPROC)EditSubclassProcc); Ravi Ranjan
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now