Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Accelerators in CXTPControlComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Accelerators in CXTPControlComboBox

 Post Reply Post Reply
Author
Message
Timur View Drop Down
Newbie
Newbie


Joined: 21 September 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Timur Quote  Post ReplyReply Direct Link To This Post Topic: Accelerators in CXTPControlComboBox
    Posted: 21 September 2004 at 5:23am

When i put CXTPControlComboBox control in my CommandBar with SetDropDownListStyle(TRUE)

When I am editing text in the combo box edit, main frame accelerators kick in so i cannot type any letter which is assigned as accelerator, isi there a simple way to disable them while typing in this combox box?

 

Aslo how is it possible to Switch On/Off XTToolkitPro accelerators?

In original XTToolkit it was possible with this:

CXTAccelManager &accelManager = CXTAccelManager::Get();

accelManager.UpdateWindowAccelerator();

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2004 at 7:09am

Add to MainFrame:

 virtual BOOL PreTranslateMessage(MSG* pMsg)
 {
  if ((pMsg->message >= WM_KEYFIRST && pMsg->message <= WM_KEYLAST)
   && (pMsg->wParam != VK_RETURN && pMsg->wParam != VK_TAB && pMsg->wParam != VK_ESCAPE))
  {
   CWnd* pWnd = CWnd::GetFocus();
   if (pWnd && pWnd->IsKindOf(RUNTIME_CLASS(CXTPEdit)))
    return FALSE;
  }
  
  return Base::PreTranslateMessage(pMsg))
 }

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.