The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
March 23, 2023, 07:50:31 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  General Forums
| |-+  The Campus
| | |-+  Button with Icon on top and 90° text.
« previous next »
Pages: [1] Print
Author Topic: Button with Icon on top and 90° text.  (Read 4020 times)
caraveiro
Member
**
Gender: Male
Posts: 28



Button with Icon on top and 90° text.
« 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]
Logged

"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com
hutch--
Administrator
Member
*****
Posts: 12013


Mnemonic Driven API Grinder


Re: Button with Icon on top and 90° text.
« Reply #1 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.
Logged

Regards,



Download site for MASM32
http://www.masm32.com
caraveiro
Member
**
Gender: Male
Posts: 28



Re: Button with Icon on top and 90° text.
« Reply #2 on: June 01, 2009, 02:50:52 PM »

...use the style BS_OWNERDRAW.

Thank you Hutch, I'll run for OwnerDraw!
Logged

"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com
BATSoftware
Member
**
Posts: 32


Re: Button with Icon on top and 90° text.
« Reply #3 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.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!