The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: caraveiro on May 25, 2009, 05:28:35 PM

Title: How to make a Static control with Vertical Text?
Post by: caraveiro on May 25, 2009, 05:28:35 PM


Dunno how to rotate 90° Angle a Static Control Text .

Any Clues?
Title: Re: How to make a Static control with Vertical Text?
Post by: dedndave on May 25, 2009, 05:43:49 PM
you will have to more descriptive
"static control test", "verticle text" - are you trying to display Chinese ?
define what you are trying to do - or, perhaps, show us some code
Title: Re: How to make a Static control with Vertical Text?
Post by: jj2007 on May 25, 2009, 06:10:39 PM
Try something along these lines:

      invoke CreateFont, -12, 0, 900, 900, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0
      mov hFnt, eax

      invoke CreateWindowEx, NULL, addr ClassStatic, addr txStatic,
         WS_CHILD or WS_VISIBLE or ES_LEFT, sx, sy, swd, sht,
         hWnd, IdStatic, hInstance, NULL
      mov hStatic, eax                  ; static window created
      invoke SendMessage, eax, WM_SETFONT, hFnt, 1   ; give it the vertical font
Title: Re: How to make a Static control with Vertical Text?
Post by: caraveiro on May 25, 2009, 06:35:45 PM
Quote from: jj2007 on May 25, 2009, 06:10:39 PM
Try something along these lines:

      invoke CreateFont, -12, 0, 900, 900, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0
      mov hFnt, eax
.
.
.
      invoke SendMessage, eax, WM_SETFONT, hFnt, 1   ; give it the vertical font



That works!

I'd had to manage the size and aling of the control to get it perfet!

Thank you!
Title: Re: How to make a Static control with Vertical Text?
Post by: dedndave on May 25, 2009, 06:38:10 PM
You da man, Jochen  :U