matthieu.bocktaels@lapost
Guest
|
Posted:
Thu Dec 29, 2005 1:30 pm Post subject:
error C2228 |
|
|
Hello,
I'm trying to host a WMP im a windows application using ActiveX.
So I've installed the WMP SDK.
After reading the doc, I've tried this :
" To host the Windows Media Player control using the CAxWindow
class, follow these steps:
Include the following headers:
#include "wmp.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlhost.h>
#include <atlctl.h>
Declare member variables, as follows:
CAxWindow m_wndView; // ActiveX host window class.
CComPtr<IWMPPlayer> m_spWMPPlayer; // Smart pointer to
IWMPPlayer interface.
When your application window is created, call AtlAxWinInit, which
is required when using the ATL ActiveX host window.
AtlAxWinInit();
Declare local variables for return codes and to contain the
pointer to the host window interface:
CComPtr<IAxWinHostWindow> spHost;
HRESULT hr;
etc......"
But when I compile my application I have a lot of errors like these:
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2065: '_Module' :
undeclared identifier
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2228: left of '.Lock'
must have class/struct/union type
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2947) : error C2228: left of '.Unlock'
must have class/struct/union type
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(3318) : error C2228: left of
'.m_csTypeInfoHolder' must have class/struct/union type
It must be files that are missing but which ones?
Thanks for your help.
Matthieu Bocktaels
|
|