how to load a bitmap from file?
-
I am using Visual Studio 5 C++. The platform is Windows CE 6.0 R3. I need to load a bitmap from file and need the HBITMAP handle to use in my program. I have searched the Internet for this with no result. SHLoadImagefile() I can't use. OleLoadPicture() I may can use but gives me a unresolved external.
Maybe someone has encountered this problem before and want to share the solution with me.
-
I am using Visual Studio 5 C++. The platform is Windows CE 6.0 R3. I need to load a bitmap from file and need the HBITMAP handle to use in my program. I have searched the Internet for this with no result. SHLoadImagefile() I can't use. OleLoadPicture() I may can use but gives me a unresolved external.
Maybe someone has encountered this problem before and want to share the solution with me.
-
LoadImage() is suppoted for Windows CE but dous not support load from file (LR_LOADFROMFILE) I am afreid. Thanks for your answer.
-
I am using Visual Studio 5 C++. The platform is Windows CE 6.0 R3. I need to load a bitmap from file and need the HBITMAP handle to use in my program. I have searched the Internet for this with no result. SHLoadImagefile() I can't use. OleLoadPicture() I may can use but gives me a unresolved external.
Maybe someone has encountered this problem before and want to share the solution with me.
Does SHLoadDIBitmap[^] work maybe? [MSDN RANT]Is it me or does MSDN confuse the hell out of one? If you check it here[^] it says: lpszName ... If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image. fuLoad [in] Set to zero. ... So basicly this says: if you use LR_LOADFROMFILE then you can load a bitmap from file, but wait, you can't because you have to specify 0 for fuLoad. Gee, thanks. [/MSDN RANT]
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
Does SHLoadDIBitmap[^] work maybe? [MSDN RANT]Is it me or does MSDN confuse the hell out of one? If you check it here[^] it says: lpszName ... If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image. fuLoad [in] Set to zero. ... So basicly this says: if you use LR_LOADFROMFILE then you can load a bitmap from file, but wait, you can't because you have to specify 0 for fuLoad. Gee, thanks. [/MSDN RANT]
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
Does SHLoadDIBitmap[^] work maybe? No it does not work, but it compiled OK and the handle it returnes looks OK. The LR_LOADFROMFILE is not supported for win CE and yes that MSDN article is confusing. Thanks for your time.
-
Does SHLoadDIBitmap[^] work maybe? No it does not work, but it compiled OK and the handle it returnes looks OK. The LR_LOADFROMFILE is not supported for win CE and yes that MSDN article is confusing. Thanks for your time.
If it compiles and gives you a good looking handle, what is wrong with it?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
If it compiles and gives you a good looking handle, what is wrong with it?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
I did something wrong. Now it works (the handle was invalid by the time I started using it). Thanks a lot.
hurrah there was a real good answer Now I have plenty of time left.
-
I am using Visual Studio 5 C++. The platform is Windows CE 6.0 R3. I need to load a bitmap from file and need the HBITMAP handle to use in my program. I have searched the Internet for this with no result. SHLoadImagefile() I can't use. OleLoadPicture() I may can use but gives me a unresolved external.
Maybe someone has encountered this problem before and want to share the solution with me.
-
Thanks for your reply It is working now I used SHLoadDIBitmap()
hurrah...I have plenty of time left.