dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: how to align static to text

  1. #1
    Join Date
    Nov 2008
    Location
    Netherlands
    Posts
    77

    how to align static to text

    how can i adjust the width and height of that static control to fit the text inside?

    its just one line adjust in the width

  2. #2
    Join Date
    Nov 2008
    Location
    Netherlands
    Posts
    77

    Re: how to align static to text

    basicly i want to get the width of the text in my static control in pixels

  3. #3
    Join Date
    Jan 2009
    Posts
    28

    Re: how to align static to text

    Code:
    RECT r;
    DrawText(....."Hello Width",&r,DT_CALCRECT);
    int iWidth = r.right - r.left;
    http://msdn.microsoft.com/en-us/libr...09(VS.85).aspx

    Best Wishes.
    -David Delaune
    Last edited by Randor; January 17th, 2009 at 09:54 PM.

  4. #4
    Join Date
    Nov 2008
    Location
    Netherlands
    Posts
    77

    Re: how to align static to text

    thanks alot

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)