Problem Hosting ActiveX Control
From: Ricardo Peres (rjperes_at_sapo.pt)
Date: 09/09/04
- Next message: John: "Sinking HTML events, full example anywhere?"
- Previous message: Igor Tandetnik: "Re: Visibility of the particular word on the screen"
- Next in thread: Igor Tandetnik: "Re: Problem Hosting ActiveX Control"
- Reply: Igor Tandetnik: "Re: Problem Hosting ActiveX Control"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 23:37:45 +0100
Hi,
I'm having trouble hosting an ActiveX control the way Microsoft recomends; I
believe I may be doing something wrong...
What I have is a Win32 C++ project, which is using the debug multithreaded
libraries. I am including all the needed include files, have no
compilation/build problems, and I keep receiving an error message
complaining on the output window about not having enough storage space, just
after CreateWindow() fails with error code 0x00000002 ("the system cannot
find the file specified"). I am not linking with atl.lib.
What annoies me is that there are some pointers on the Internet refering
this problem, but are either outdated (Microsoft Knowledge Base Article -
192560: How To Add ATL Control Containment Support to Any Window, for
example) or plain wrong. I suspect someone has already come across this...
any ideas?
...
#include <atlbase.h>
#include <atlhost.h>
...
HWND hParent = ...; //OK
AtlAxWinInit(); //OK
HWND h =
::CreateWindow(_T(ATLAXWIN_CLASS),_T("InternetExplorer.Application"),WS_CHILD
|
WS_VISIBLE |
WS_BORDER,0,0,300,300,hParent,NULL,::GetModuleHandle(NULL),NULL); //Fails
with error code 0x00000007
::ShowWindow(hParent,SW_SHOW); //OK
::UpdateWindow(hParent); //OK
...
I am using Visual Studio .NET 2003 and Windows XP Professional SP2.
Any help would be much apreciated.
Thanks very much in advance!
Ricardo Peres
PS - If possible, reply also to my e-mail address rjperes@sapo.pt
- Next message: John: "Sinking HTML events, full example anywhere?"
- Previous message: Igor Tandetnik: "Re: Visibility of the particular word on the screen"
- Next in thread: Igor Tandetnik: "Re: Problem Hosting ActiveX Control"
- Reply: Igor Tandetnik: "Re: Problem Hosting ActiveX Control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|