Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS General Discussion » Keyboard window selection Collapse All
Subject Author Date
Keyur Bhatnagar Mar 17, 2011 - 8:42 AM

Hi,

I have an application which has a lot of windows, that can be docked to a control bar or be undocked. My problem is that i want to use "Tab" button on the keyboard to swotch between these windows.

Thanks,
Keyur

Technical Support Mar 21, 2011 - 12:55 AM

Each CExtControlBar adds itself into a global array of bars in the constructor and removes in the destructor. This means the array generated by the _GetFrameControlBars() method uses an order which depends only on method parameters.

Keyur Bhatnagar Mar 17, 2011 - 4:18 PM

Thank You!

I had one more concern, what order does the _GetFrameControlBars() returns the array in? would it always be the same order?

Like if i open up 5 windows... would the function be in order i.e. the latest at zero index and so on?

Technical Support Mar 17, 2011 - 9:36 AM

You can implement the PreTranslateMessage() method in your main frame class to handle tab key pressing. You can get an array of needed control bars using the CExtControlBar::_GetFrameControlBars()static method. Sending the WM_COMMAND message to the main frame window and specifying bar’s dialog control identifier in WPARAM message parameter will activate and focus any resizable control bar in any state.