Sign in to follow this  

IPicture

This topic is 4297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I tried using the NeHe IPicture code and I got the error: 74 C:\Dev-Cpp\Examples\nehe_ipicture\NeHe_IPicture\NeHe_IPicture.cpp `OleLoadPicturePath' undeclared (first use this function) Even though I included the olectl.h and all the libraries with ole..:) What could the problem be? Thanks.

Share this post


Link to post
Share on other sites
That's very odd, I just made a new Dev-Cpp console project and added in the IPicture files and the only initial errors I got were linker errors. I added in the default windows libs needed for a Win32 devcpp project and it worked perfect! I'm not sure why you project isn't working, but I've uploaded the one I just made here, so you can try opening that in Dev and recompile it (ctrl + F11). If it works, then you can check against yours. If it doesn't, then there's a big problem! Good luck [smile]

Share this post


Link to post
Share on other sites
I unzipped the project and pressed the "compile" button and I got the same error?! Do you think that there's a problem with my header file? (olectl.h)
I looked at the header filr and couldn't find the OleLoadPicturePath? At the end of the filr there was:
STDAPI DllRegisterServer(void);
STDAPI DllUnregisterServer(void);
STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);

There's a LoadPicture but no LoadPicturePath, could that be the problem? Or maybe I need a certain dll? but that would give a different error I think.

Thanks.

Share this post


Link to post
Share on other sites
Yea, there has to be something wrong with your files. If you can, redownload the latest DevCpp. Uninstall your old one first (save any project files you store in that directory before deleting it), then reinstall it. That should hopefully do the trick, all the files I was using come with DevCpp. Make sure you install it to C;/Dev-Cpp or some C:/ root folder that does not contain any spaces (no program files for example). See how that goes then you can report back.

Share this post


Link to post
Share on other sites

This topic is 4297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this