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 Tech Support » Accelerator key problem Collapse All
Subject Author Date
Offer Har Jan 7, 2008 - 4:12 PM

Dead Support,

I have a an accelerator key which works well, only when the focus is set to an CExtTabPageContainerWnd control the accelerator key event handler is not called. It seems that control ’eats’ the accelerator - please advise as to how to solve this problem.

Thanks,
Ron.

Technical Support Jan 8, 2008 - 12:42 PM

The CExtTabPageContainerWnd control eats and processes Ctrl+PgUp and Ctrl+PgDown keys. All the other keys probably become eaten and/or handled by the page window inside the tab page container control. CDialog windows (including CExtResizableDialog) perform specific keyboard pre-translation which eats all the accelerators. If you are using the dialog window as a tab page, then your dialog class should pre-translate keyboard messages in the following way:

virtual BOOL PreTranslateMessage( MSG * pMsg )
{
      if( WM_KEYFIRST <= pMsg->message && pMsg->message <= WM_KEYLAST )
            return FALSE;
      return __base_class__::PreTranslateMessage( pMsg );
}