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
Setup an event log collector server(Windows Server 2008)
How to delete a replica from the synchronization list?
Excel - How to split a fullname column into seperate firstname and surname columns
vb.net check if form is open
Permissions on sub_folder are incorrectly ordered...
Parent form Subform firing order
How to give non-administrator rights to modify data sources ODBC Administrator
How to refresh a Tree View from another Form
activex can't create object solution, ahhh
Export Database