Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i tried a code like this to use mfc

Status
Not open for further replies.

vkarthik

Programmer
Aug 30, 2001
126
US
i tried a code like this to use mfc's IActiveDesktop.


#include "comdef.h"
#include "wininet.h"
#include "shlobj.h"
IActiveDesktop *pActiveDesktop;
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (void**)&pActiveDesktop);
pActiveDesktop->Release();

i dont get an error if the last line is not included. if included, this is what i get
"Use of undefined class or struct IActiveDesktop"

what do i do?
 
put in the first line #include"stdafx.h". See also some comutil.h, atlcom.h... Ion Filipski
1c.bmp


filipski@excite.com
 
First of all IActiveDesxsktop is not MFC's. I think you can use it without using MFC.(Although I heard that the code is somehow deopendent of MFC).

Read the article:
"PRB: ActiveDesktop Compilation Errors Under Visual C++ 6.0 MFC" from MSDN

HTH, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top