Print Page | Close Window

Accelerators in CXTPControlComboBox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1195
Printed Date: 03 July 2024 at 3:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Accelerators in CXTPControlComboBox
Posted By: Timur
Subject: Accelerators in CXTPControlComboBox
Date 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();




Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net