Print Page | Close Window

no message in PreTranslateMessage()

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5362
Printed Date: 11 November 2025 at 4:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: no message in PreTranslateMessage()
Posted By: SunMarc
Subject: no message in PreTranslateMessage()
Date Posted: 26 October 2006 at 7:58am
Hello,

I'm using XTP in a DLL with a  CXTPTabControl.
I don't receive any messages in the PreTranslateMessage() method for the
dialogs contained in the CXTPTabControl.

I'm using a CXTColorPicker too and nothing happend when I click in...

Maybe due to the same pb. Any idea?



Replies:
Posted By: Oleg
Date Posted: 26 October 2006 at 8:17am
Hello,
if you use it in ActiveX context, then it is expected behaviour.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: SunMarc
Date Posted: 02 November 2006 at 9:11am
I'm not using ActiveX...


Posted By: Oleg
Date Posted: 02 November 2006 at 9:20am
Hello,
for non MFC extension DLls same problem....
 
 
Anyway. for 10.4 release we replace method from PreTranslateMessage to OnWndMsg to be sure it will call fro ActicveX/ simple DLL contexts. please patch your sources.
 

BOOL CXTColorPicker::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
 if (!m_bPopupActive)
 {
  if (message == WM_LBUTTONDOWN)
  {
   ShowPopupWindow();
   // in this case the message is not "swallowed" so the button will
   // get it and display itself in a recessed state
  }
  else if (message == WM_KEYDOWN &&
   (wParam == VK_RETURN ||
   wParam == VK_SPACE ||
   wParam == VK_DOWN))
  {
   ShowPopupWindow();
   return TRUE;  // swallow message
  }
 }
 return CXTButton::OnWndMsg(message, wParam, lParam, pResult);
}


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: SunMarc
Date Posted: 02 November 2006 at 10:20am
Thanks! It works 




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