Re: Setting button bitmaps
It might be that you have to make the bitmap available to the button after the scope where you set the bitmap runs out. That is, try making bmp a member of your class so it isn't destroyed when your function returns. Otherwise, the bitmap is destroyed and when the button tries to access it(when repainting itself), you get a run time error.
/Michael Grundberg
M.Sc. Computer Science
Visionova IT-System, Sweden
[email protected]
Re: Setting button bitmaps
Why not use the CBitmapButton class ? It's really very simple.
It handles the subclassing of the button so that the new drawing
function is called. It also manages the drawing of the four states
of a button. The sample CTRLTEST has a good illustration of
this but it doesn't show all four states of the button (I think).