load picture example
-
hello, I'm fresh to VC, I need an example for loading picture to PictureBox(control). e.g., if I enter the file path, like c:\abc.bmp, then the picture will be loaded into picture(control). I don't know which is good, using Hbitmap or Cbitmap. Could anyone give me some example code? Thanks.
-
hello, I'm fresh to VC, I need an example for loading picture to PictureBox(control). e.g., if I enter the file path, like c:\abc.bmp, then the picture will be loaded into picture(control). I don't know which is good, using Hbitmap or Cbitmap. Could anyone give me some example code? Thanks.
both of them does the same thing. Its just like if u set the bitmap through resource to any particular bitmap it is static type...There are other times when u need to change the bitmaps from time to time or depending on some conditions...then using HBitmap..and CBitmap are mre or less same..u can use any of them depending on the dialogs u r using..in most of the dialogs u will have to use CBitmap..as HBitmaps are global..and used for globally setting the Bitmaps to maybe other applications...not urs of course..Its just an idea..i am not sure though..Hope it helps Himanshu