Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bitmap as a Resource?

Started by paul8262 Jul 16, 2003 at 5:11 PM 1 replies 350+ views
Original Post
paul8262
paul8262
I have a Question about loading a bitmap as a resource from within my app,instead of from disk. Its for a custom dialog box that starts up before the game,and lets the user choose the display mode etc. ---------------------------------------------------------------- background.lbHatch = (long) LoadImage(GetModuleHandle(NULL),"MyImage.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); ---------------------------------------------------------------- Is it possible to load the bitmap as a resource? instead of from a file on disk? something like how the icon is done below. ---------------------------------------------------------------- LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_MY_ICON));//standardicon ---------------------------------------------------------------- I couldn''t get it to do it. Any help would be great. Thanks.
paul8262
paul8262
got it now,thanks!


background.lbHatch = (long)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_VideoOptions), IMAGE_BITMAP, 0, 0,
LR_DEFAULTCOLOR);


(HBITMAP),hInstance,instead of (long),(GetModuleHandle(NULL), gave me errors.

working fine now :-)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.