CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    How to create a StdFont with Vertical Drawing capability?





    Hi Gurus,


    I want to create a vertical drawing font, and want to use like any other font.

    For Ex: I create a font and set it to the Font property of a label say. And i adjust the labels height & width props. Is it possoble for VB to then draw in that label with this 'Vertical' font.

    They app i am wroking on is a graph drawing routine. and i want to use this vertical font for Y-axis's label and values drawing.


    Win-Api 'CreateFont' with escapement & orientation as 900 gives a vertical drawing font. But the return value is of type HFont. How do i convert this HFONT to StdFont of VB? Thisway, i can set this to any control, and it should be able to paint itself vertically, i presume!.


    Any ideas are most welcome.


    Thanks

    Ravi Kiran

  2. #2
    Guest

    Re: How to create a StdFont with Vertical Drawing capability?

    You can find an example of how to do this at:

    wwww.vbaccelerator.com

    - Alex


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: How to create a StdFont with Vertical Drawing capability?

    Hi,

    I had accomplised what i wanted with 'CreateFont'.
    where in the vbaccelerator code, he uses CreateFontIndirect, to achieve the same result.

    But then it is not same as StdFont, which i can set to .Font member of a label,button etc. and forget about painting the regions myself. Just imagine doing all the painting by 'VB' code...

    Ravi



  4. #4
    Join Date
    May 1999
    Location
    St-Petersburg (Russia)
    Posts
    32

    Re: How to create a StdFont with Vertical Drawing capability?

    Ahh.. i read your question too quickly. I don't know how to do it with stdfont.. perhaps there is someway you could copy a picture of the textbox and rotate that picture,but thats probably harder.

    - alex


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured