Hi, all.
I want to create a custom button which will draw a small bitmap(4x4) at the left-bottom corner of the button. This bitmap is used to indicate some kind of status.
Before I will write my own OnPaint(), in which I will draw the border, the label and the bitmap. But the work is complex and it will take me a lot of time, like doing some position calculating work, handling resize event and fixing the bad flicker!
This time, I just want to paste a small bitmap on a standard button! I just want to know whether there are some methods to draw the bitmap based on the standard controls. So I can just paint the bitmap on the default well-drawed dc. That will save a lot of time.
Any suggestions?
Thanks and regards.
How to draw custom control based on some standard controls?
Re: How to draw custom control based on some standard contro
You could also use a wxCustomButton from wxThings.bloodlee wrote:This time, I just want to paste a small bitmap on a standard button! I just want to know whether there are some methods to draw the bitmap based on the standard controls. So I can just paint the bitmap on the default well-drawed dc. That will save a lot of time.
http://wxcode.cvs.sourceforge.net/viewv ... /wxthings/
It has the ability of drawing a button with both a bitap and label. I'm not sure if you can place the bitmap at the lower left, but even here you have options (alter the positioning code of the control / creating a bitmap sized as required - but with the upper part simply reflecting the background colour of the button).
It might offer a starting point for you.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/