Click here to Skip to main content
15,662,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker226-May-09 14:00
snacker226-May-09 14:00 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker226-May-09 14:12
snacker226-May-09 14:12 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker226-May-09 14:18
snacker226-May-09 14:18 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker226-May-09 14:21
snacker226-May-09 14:21 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson26-May-09 14:32
professionalStuart Dootson26-May-09 14:32 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker227-May-09 7:08
snacker227-May-09 7:08 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson26-May-09 14:19
professionalStuart Dootson26-May-09 14:19 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker231-May-09 18:22
snacker231-May-09 18:22 
I am able to get the ActiveX control to load now.
The thing that made this work was using
hr = AtlAxCreateControl( OLESTR( "c:\\test.pdf" ), pThreadParam->hwnd, NULL, &pUnk );
instead of using ::CreateWindow(...) or trying to use AtlAxWindow().

HOWEVER (darn it!) when I close the application window I get an access violation in the message loop:
while( 1 )
{
    rv = GetMessage(&msg, NULL, NULL, NULL) ;
    rv = TranslateMessage(&msg);
    rv = DispatchMessage(&msg);
}


It is erroring in the call to "GetMessage(...)".
I thought it might be that I need to send a WM_CLOSE message before the main window closes, but that doesn't help.
If I send WM_CLOSE it seems to cause an access violation in a different thread of the main application.
I tried breaking out of the message loop if WM_CLOSE (or some other event) is detected, but that just caused the app to hang (as I would expect).

Is there any way to unload the ActiveX control from the win32 cleanly?
I'm sure there is a way, I'm just not seeing it.

I can send source code if that would be useful.
I which I could attach it instead of inlining it though.
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson31-May-09 21:42
professionalStuart Dootson31-May-09 21:42 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker21-Jun-09 20:38
snacker21-Jun-09 20:38 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker21-Jun-09 20:42
snacker21-Jun-09 20:42 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson1-Jun-09 20:49
professionalStuart Dootson1-Jun-09 20:49 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker25-Jun-09 7:51
snacker25-Jun-09 7:51 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson5-Jun-09 7:57
professionalStuart Dootson5-Jun-09 7:57 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
Stuart Dootson1-Jun-09 20:52
professionalStuart Dootson1-Jun-09 20:52 
GeneralRe: Adding ActiveX Control Container to Win32 Window Pin
snacker25-Jun-09 7:55
snacker25-Jun-09 7:55 
QuestionAppending a number to the end of a string to display in GLUI_ EDITTEXT_TEXT Box? Pin
bushimports26-May-09 11:41
bushimports26-May-09 11:41 
AnswerRe: Appending a number to the end of a string to display in GLUI_ EDITTEXT_TEXT Box? Pin
Stuart Dootson26-May-09 12:56
professionalStuart Dootson26-May-09 12:56 
QuestionHow to save javascript file Pin
yunpil26-May-09 11:22
yunpil26-May-09 11:22 
AnswerRe: How to save javascript file Pin
David Crow26-May-09 17:00
David Crow26-May-09 17:00 
AnswerRe: How to save javascript file Pin
ThatsAlok26-May-09 22:13
ThatsAlok26-May-09 22:13 
Questionget the differents data from a list control Pin
MrKBA26-May-09 8:55
MrKBA26-May-09 8:55 
QuestionRe: get the differents data from a list control Pin
David Crow26-May-09 9:09
David Crow26-May-09 9:09 
AnswerRe: get the differents data from a list control Pin
MrKBA26-May-09 9:12
MrKBA26-May-09 9:12 
QuestionRe: get the differents data from a list control Pin
David Crow26-May-09 9:14
David Crow26-May-09 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.