   Help!!! I can't load BMP
  I use the following code to load a Bitmap, but always failed.Is there somebody so kind to tell me why?( It''s a MFC application.)CBitmap BG;if( !BG.LoadBitmap( "Back.BMP" ) )    ::MessageBox( this->m_hWnd, "Load Failed!", NULL, NULL );I use GetLastError() to get the last-error code value.It return 1814, and MSDN tell me 1814 means:The specified resource name cannot be found in the image file.I cannot understand it clearly, so help me!Thanks you!!! 
  You need to specify the full path to the image file.The error looks like that the CBitmap assumes you are referring to a resource inside your program, but can't obviously find it there.I am not a MFC expert but i think this is the problem here.   [edited by - Nik02 on August 2, 2003 9:42:53 AM];  I have triedif( !BG.LoadBitmap( "F:/CoreWill/Debug/Back.bmp" ) )andif( !BG.LoadBitmap( "F:\\CoreWill\\Debug\\Back.bmp" ) )but both failed.And what to do to let CBitmap know I am loading a Bitmap from a file?;  Sorry, my bad.LoadBitmap indeed assumes you are loading a resource from a module.But, i found you a solution: see msdn for LoadImage function!See here: LoadImage [edited by - Nik02 on August 2, 2003 10:04:08 AM];  Nik02,thanks for your reply!My program is a MFC application.In my program I used CBitmap to instead HBITMAP,used CDC to instead HDC, and ......At the beginning, I want to use CBitmap to load a Bitmap from a file, but if I really cannot work it out, I will give up, and use the WIN32 API LoadImage() to solute the problem.Thank you!!! ;  CBitmap::FromHandle(HBITMAP hBitmap)I looked this up also, thought you might ask something like this...  The C prefixed objects are just class encapsulations of the real windows functionality. No magic in them, see! NikEDIT: For alternative method of loading bitmap, see CBitmap::SetBitmapBits() method.Downside is that you have to understand, load and verify the bitmap data yourself.    [edited by - Nik02 on August 2, 2003 10:48:00 AM];  Yep!!!CBitmap::FromHandle(HBITMAP hBitmap)That''s what I wanted!!!Thank you for your help!!! 