News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Button with Icon on top and 90° text.

Started by caraveiro, May 29, 2009, 05:50:47 PM

Previous topic - Next topic

caraveiro

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]
"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--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

caraveiro

"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

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.