Microsoft
Software
Hardware
Network
Question : simple: place a bitmap in a Cdialog
I want a small bitmap 10x10 pixel on a CDialog "MyDlg".
1) use OnPaint()
When I use OnPaint do draw it with provided dc, the graphical updating of the cdialog doesn't work anymore.
example 1:
the dialog has a CTabControl. When I click on Tabs, the inner dialog is not painted.
example 2: the windows OS doesn't repaint "MyDlg", when I drag another window over it.
2) using a picture control:
added in resource editor, placed on dialog( type CStatic), in the properties, switched to "bitmap", insert the desired resource bitmap "IDB_MY_LITTLE_BITMAP". In the resources, the bitmap is displayed. This is great. But this bitmap has a transparent color. it needs to be drawed using ::TransparentBlt(..) The transparent mode seems not supported for picture controls. So this is not an option (?)
3) using OnWmEraseBkgnd()
doesn't redraw the dialog, no matter of returning TRUE or FALSE. This message handler seems not suitable because I want the system to draw nearly everything of the CDialog. The Only thing I want to draw with a CDC object is a small bitmap. Everything else should be done by the system.
Where to add the drawing for my transparent bitmap ?
Thanks.
Answer : simple: place a bitmap in a Cdialog
Create a custom icon (also was so in VS6) of the size you want.
Random Solutions
Tab into subform new record does not work if prior records are disabled by Conditional Formatting
Windows XP clients not getting gpo folder redirection informtaion
SBS2008 losing gateway address after restart
Push out Office 2007 configuration settings
Aligning an ASP.NET Menu Control
How do I print data only from forms in Word 2007?
Excel Arrange numbers in Random Order
How do I get Access to "not" treat blank cells as null.
Can't change sound schemes, XP
Approach for importing Excel spreadsheets into SQL tables using Access