The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: caraveiro on May 29, 2009, 05:50:47 PM

Title: Button with Icon on top and 90° text.
Post by: caraveiro on May 29, 2009, 05:50:47 PM
Hi !

I just tried to make button with an icon on the top side and Vertical text down.

The only I get was the Icon on Top, but dunno how to draw the text.

Do I have to draw the text in the button dc?
Any clues?

[attachment deleted by admin]
Title: Re: Button with Icon on top and 90° text.
Post by: hutch-- on May 30, 2009, 04:58:27 AM
Your options are a custom control or use the style BS_OWNERDRAW. In both instances you will have to handle the display yourself as a standard button does not have this capacity. It is most probably best to do this using a bitmap for the button.
Title: Re: Button with Icon on top and 90° text.
Post by: caraveiro on June 01, 2009, 02:50:52 PM
Quote from: hutch-- on May 30, 2009, 04:58:27 AM
...use the style BS_OWNERDRAW.

Thank you Hutch, I'll run for OwnerDraw!
Title: Re: Button with Icon on top and 90° text.
Post by: BATSoftware on June 12, 2009, 08:57:47 PM
Any non standard looking button can be drawn using a bitmap. Use BS_BITMAP as the style, get rectangle coord for the button window, CreateCompatableDC, CreateCompatableBitmap, BitBlt image, ExtTextOut text string, then, DeleteDC the compatable DC, finally BM_SETIMAGE using button handle and memory compatible bitmap handle. Wala! you can draw anything thing you like.