Advertisement

Nehe's Lesson 41 IPicture loading and Dev-C++

Started by July 19, 2004 05:37 AM
-1 comments, last by Vegetable 20 years, 4 months ago
Hi, i'm new here, and I'm french, my english is not good. In the Nehe's lesson 41, The Dev-c++ source does not use the IPicture loading. In order to make the IPicture loading work under Dev-C++, you must add #include <wtypes.h> //for VARIANT_BOOL #include <unknwn.h> // for LPUNKNOWN #include <oaidl.h> #include <objidl.h> // for the interfaces before the #include <olectl.h> It's com interface so you must add -fvtable-thunks in the Compiler Options | Add the following commands... Another problem : OleLoadPicturePath is not defined! So add this declaration before the last #ifdef __cplusplus in <olectl.h> : STDAPI OleLoadPicturePath(LPOLESTR szURLorPath,LPUNKNOWN punkCaller,DWORD dwReserved,OLE_COLOR clrReserved,REFIID riid,LPVOID * ppvRet ); And add the following libraries :liboleaut32.a and libuuid.a On my version of Dev-C++ (4.9.7.0) it works, i don't know if it works on all versions because there is always problems with com interface on dev-c++...

This topic is closed to new replies.

Advertisement