Cycling through the controls
I want to know how to cycle through the controls using tab !!
i''ve tried everything , WS_TABSTOP (for the controls) , WS_EX_CONTROLPARENT (for the controls parent) , WS_GROUP (for the parent) and nothin'' worked , should i do it manually with SetFocus!!
what is the proper way to do it ?
i''m programming in Win32(NO MFC) with VC++ 6.0 , on XP
oh btw , i remembered something , does AnimateWindow() operate on windows XP??
thanks for your help ...
...Xeee
Given that you have N controls with values arranged such that base_number + ( random_number % N ) yields one of the controls' id:
[Edit: Left out base_number.]
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
[edited by - Oluseyi on April 29, 2002 6:04:08 PM]
// subclass control with this procedure:LRESULT CALLBACK SubclassProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ){ if( msg == WM_CHAR && wparam == VK_TAB ) { SetFocus( GetDlgItem( GetParent(hwnd), base_number + ( (GetWindowLong(GWL_ID) + 1) % N ) ); } return 0; return CallWindowProc( DefaultProc, hwnd, msg, wparam, lparam );}
[Edit: Left out base_number.]
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
[edited by - Oluseyi on April 29, 2002 6:04:08 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement