« November 2005 »
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
You are not logged in. Log in

Programming Tips
Tuesday, 8 November 2005
Loading images on the fly
Mood:  cool
Topic: VC++
Anywhere any time. Happy programming.


HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle()/*application instance handle*/,
		"C:\\Nibu.bmp"/*file name*/,
		IMAGE_BITMAP/*or IMAGE_ICON, IMAGE_CURSOR*/,
		0/*original width*/,
		0/*original height*/,
		LR_LOADFROMFILE
		);
//create bitmap object
CBitmap *bmp = CBitmap::FromHandle(hBmp);
//That's it. Very easy ;)

Posted by Nibu babu thomas at 1:43 PM
Updated: Thursday, 10 November 2005 4:44 PM

Newer | Latest | Older