![]() |
Crash on TrackPopupMenu |
Post Reply
|
| Author | |
karim
Newbie
Joined: 09 January 2006 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: Crash on TrackPopupMenuPosted: 05 September 2006 at 12:59pm |
|
I'm seeing a crash when I call the static version of CXTPCommandBars::TrackPopupMenu where the first parameter is the CMenu pointer. This call is being made inside a DLL that dynamically links to MFC(and Codejock). It's crashing in the function below and I believe the problem is AfxGetThread is returning NULL. I think it's a manage state problem, but the message is originating from a control in the dll - the call isn't being made from the executable.
Thanks, Karim
|
|
|
Karim Shehadeh
Verint Video Solutions http://www.verint.com |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2006 at 3:07pm |
|
Yes, you have to switch state in your dll.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
karim
Newbie
Joined: 09 January 2006 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2006 at 3:49pm |
|
I'm sorry I wasn't clear about that. Yeah, I am switching state but it makes no difference. Specifically, I'm calling
Can CXTPCommandBars::TrackPopupMenu be called anywhere or are there certain restrictions? I don't know what they would be, but... Thanks, Karim |
|
|
Karim Shehadeh
Verint Video Solutions http://www.verint.com |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 September 2006 at 2:01pm |
|
Hello,
if AfxGetThread returns NULL it means that AfxGetApp will return NULL also. and this means something wrong with initialization/swiching MFC.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |