• Advertisement

Archived

This topic is now archived and is closed to further replies.

Problem with loading Bitmap file into direct draw

This topic is 6351 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 used the code from article 1064(You find it here: http://www.gamedev.net/reference/articles/article1064.asp) to load a bitmap file into directDraw (Version 7.0a) And when i try to compile the code i get the following error: D:\Programme\Microsoft Visual Studio\Vc98\FS Speed Scout\FS_SScout\Bitmap.cpp(86) : error C2440: ''='' : cannot convert from ''void *'' to ''struct HBITMAP__ *'' Conversion from ''void*'' to pointer to non-''void'' requires an explicit cast Can anybody help me? Draggy

Share this post


Link to post
Share on other sites
Advertisement
By just looking at the code on that page I would say that you need to replace the line that reads "hBitmap = LoadImage(NULL, fname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);" with the following "hBitmap = (HBITMAP) LoadImage(NULL, fname, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);" without the quotes of course.

Hope this helps!

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites

  • Advertisement