🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

IPicture

Started by
10 comments, last by daniel_i_l 18 years, 4 months ago
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.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Advertisement
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]
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.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
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.
Just to make sure, lets say I have a folder DevC++ and in it a folder MyStuff, if I uninstall Dev will all MyStuff get erased? (there lot of stuff)
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Well, not sure exactly, it shouldn't, but it's always good to move your files and not trust software. Ever. [grin]
I tried deleteing the Dev-Cpp folder after doing the uninstall but it kept saying that I didn't have access to delete it?
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Hm, odd, try restarting your computer, some file has a lock on that directory still. If you still can't it's ok, just install to Dev-Cpp2 and it should be fine.
if thats doesn't work, restart into safe mode with console and delete them there.
I got the new Dev and it works! Thanks!
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky

This topic is closed to new replies.

Advertisement