|
-
June 24th, 2002, 06:17 AM
#1
To Display Bitmap & Icon in a single picture ctrl
Hi All,
How can we display a bitmap & icon in a single picture
control at different time.
We can display a bitmap in a picture ctrl by setting its "type"
property to BITMAP. Similarly Icon can also be displayed.
But can we change this "type" property at run time.
i.e. from Icon to Bitmap & vice versa.
I called the ModifyStyleEx(). Eventhough this functionis returning success, Bitmaps and Icons ae not getting inerchanged.
Thanks in Advance
Cherian
-
June 24th, 2002, 06:19 AM
#2
does it show after you hide the window and focus it again?
if so you might have to invalidate your window and therefor force a repaint.
Just try moving your window out of the screen and back and see if the change is then visible.
CU
Ingo
-
June 24th, 2002, 06:26 AM
#3
OnButton1() click , i would call to display Bitmap
and on OnButton2() click i would call to display Icon
Button1()
-------------
m_Picture.ModifyStyleEx( SS_ICON,SS_BITMAP, 0);
m_Picture.SetBitmap( ::LoadBitmap( AfxGetInstanceHandle() , MAKEINTRESOURCE(IDB_BITMAP1) ) );
Button2()
------------
m_Picture.ModifyStyleEx(SS_BITMAP ,SS_ICON, 0);
m_Picture.SetIcon( ::LoadIcon( AfxGetInstanceHandle() , MAKEINTRESOURCE(IDI_ICON1) ) );
Thanks
Cherian
-
June 24th, 2002, 08:41 PM
#4
hi there, how do i load bmp or icon files onto the button on the runtime. i need to specify different bmp files on runtime, but how do i specify (commands) to load straight from file.
TQ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|