how to load a jpg/bmp image ?
-
hi how to load a jpg/bmp image in an sdi application as the background graphics.... help help help me.... :(( and yah how u can show ur own graphics instead of titlebar....:) plz help and answer as soon as possible happy programming u all regards Nauman Ghazi Bahria University
-
hi how to load a jpg/bmp image in an sdi application as the background graphics.... help help help me.... :(( and yah how u can show ur own graphics instead of titlebar....:) plz help and answer as soon as possible happy programming u all regards Nauman Ghazi Bahria University
The following example code can be used for loading a BMP file image in any vc++ application. HBITMAP hbitmap; hbitmap = (HBITMAP)LoadImage(NULL,"C:\\house.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); HDC hmemdc; hmemdc = CreateCompatibleDC(pDC->m_hdc); SelectObject(hmemdc,hbitmap); BitBlt(pDC->m_hdc,0,0,image_width,image_height,hmemdc,0,0,SRCCOPY); For viewing as a background image in an SDI application the above code can be used inside the OnDraw(CDC *pDC) method of view class. For loading a JPEG file you can use external JPEG libraries such as the IJL15.DLL which is freely available. R.Balachandran