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
Determine PrintArea in Excel
Parsing .aspx page with XMLReader, get a list of controls
VBA code to prompt user to enter a password when the user wants to access a form or report in DESIGN view
export to excel from dataset
Control lock Question
Undefined Functions in Access 2003 MDE
HTTP/1.1 503 Service Unavailable after server reboot
Toggle Buttons!!!
event 2436
connection has timed out ... iis setting?