How to use LoadBitmap in a dialog box
-
I have two images.I has to toggle according to the mouse movement. I nned to know how to get the dc of the dialog control.Please S.Yamini
-
after onInitdialog completes, whole dialog being repainted so your graphics erased. one solution is to override OnEraseBkgnd and return TRUE from it so System will never erase background. but be careful, system never erase Background !!
I cannot use erasebk bcoz i have to toggle the images. S.Yamini
-
I cannot use erasebk bcoz i have to toggle the images. S.Yamini
so whats problem will be in toggling images after overriding eraseBk ??? whatever painting done by you will be there, only system won't paint its default bkground ...
-
are you using the bitmap control you have in your tool bar, or is it ok for you if i give my active X control which can take any bitmap image any time. what all you have to do is, you have to specify the file path. for example, ctrl.SetImage("C:\\image1.bmp"); then after some time, ctrl.SetImage("C:\\image2.bmp"); is it ok for u.
-
I have two images.I has to toggle according to the mouse movement. I nned to know how to get the dc of the dialog control.Please S.Yamini
-
so whats problem will be in toggling images after overriding eraseBk ??? whatever painting done by you will be there, only system won't paint its default bkground ...
Yes it will work. Can u suggest me for transparenting the background for the button control S.Yamini
-
Yes it will work. Can u suggest me for transparenting the background for the button control S.Yamini
again, You can override OnEraceBk,, and return TRUE from there for that button, it won't paint buton background...
-
again, You can override OnEraceBk,, and return TRUE from there for that button, it won't paint buton background...
Thanks I will try S.Yamini
-
I have to load a bitmap in a dialog box. I have loaded the Image in bitmap resource and then I tried the below code HBITMAP hBitmap=(HBITMAP)LoadBitmap(AfxGetInstanceHandle,"IDB_IMAGE"); but when i execute this statement the hBitmap is 0x0000000. Can anyone give me some suggestions. Is there any way to transparent the background of a button S.Yamini
If you have bmp on the resource you can use of
CBitmap
class. -
If you have bmp on the resource you can use of
CBitmap
class.Thanks. Is there any calculation to convert the x,y coordinate of the CPoint to angle of the circle S.Yamini