|
-
January 29th, 2004, 01:00 PM
#1
SHLoadDIBitmap() doesn't work
Hi,
I'm getting desperate 'cause SHLoadDIBitmap() doesn't work in my code. When I try loading the image from file like this:
Hbmp=SHLoadDIBitmap(_T("Kozana.bmp"));
or
Hbmp=SHLoadDIBitmap(L"Kozana.bmp");
the function returns 0. The Kozana.bmp file is placed in the project directory and also into the subdirectory where the eVC creates the executable file.
When I tried including the bitmap into resources and loading it with LoadBitmap everything worked perfectly. Unfortunately I can't use the LR_LOADFROMFILE option with LoadBitmap on PPC2002 as I do in Win2000.
I've found many code snippets with SHLoadDIBitmap() on the net and it seems there shouldn't be any problem with this function. Does anybody know where the problem might be?
thankx
Koxin
-
February 27th, 2004, 04:12 PM
#2
But where you test your application? If it is an emulator so you need to put your pictures in its folder. If you have a PDA, so copy the application and the picture into \\Windows\StartMenu, for example.
I use CDibSectionLite for bmp-files. So I don't remember even parameters for SHLoadDIBitmap.
Good luck
-
March 1st, 2004, 01:28 AM
#3
I've solved the problem already, but thanks for your answer anyway. The catch was really in my putting the image files in a wrong directory.
Koxin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|