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

Thread: Position

  1. #1
    Join Date
    Oct 2003
    Posts
    72

    Position

    Hi guys

    A simple question.

    I have got a dialog where from resource view I have added a static text
    I need to know the position of the static text inside the window

    Do you Know a function or method that can help me?

    Thanks in advance

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867

    Re: Position

    CStatic::GetWindowRect() would give you the screen co-ordinates of the static control itself. Could you work it out from there?
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  3. #3
    Join Date
    Dec 2003
    Location
    Omagh
    Posts
    133

    Re: Position

    You could then use ScreenToClient(rect) which converts the rectangle to the windows client coordinates.

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