Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPPopupBar::PumpMessage()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPopupBar::PumpMessage()

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


Joined: 21 October 2008
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote goldfish40 Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPopupBar::PumpMessage()
    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!
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: 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
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.047 seconds.