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
How to supress blank page
Help with GPEDIT.MSC
One to one relationship Access 2003 and a dlookup
Powerpoint slide numbering - start on page 3 as page number 1, question re-posted
Populate missing values in specific Excel worksheet and import into Access
Mail merge selected records into Word
Compile Error: Object Required
What does this mean - Passing variables
Copy cell using Copy Function in VBA
in-place upgrade