Print Page | Close Window

CXTPPopupBar::PumpMessage()

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=12496
Printed Date: 28 February 2025 at 3:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPopupBar::PumpMessage()
Posted By: goldfish40
Subject: CXTPPopupBar::PumpMessage()
Date Posted: 21 October 2008 at 9:30am

I'm using Toolkit controls from a MFC DLL inside a COM server (ActiveX). The client is a .NET app, using an ActiveX interop wrapper. In short, ::AfxGetThread called from CXTPPopupBar::PumpMessage returns NULL and app crashes (XTPCommandBars.cpp, 1463), !::AfxGetThread()->PreTranslateMessage().

Would it be possible in future versions to check for NULL state thread? Like:
 

if (NULL == AfxGetThread () ||

(NULL != AfxGetThread () &&

!AfxGetThread()->PreTranslateMessage(&msg)))

{

// process this message

::TranslateMessage(&msg);

::DispatchMessage(&msg);

}

Does that makes sense? It works fine this way. Thank you!



Replies:
Posted By: Oleg
Date Posted: 22 October 2008 at 1:39am
Hi,
Something wrong with your code. AfxGetThread should return something.
You have add some CWinApp derived class.

-------------
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