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

    *** URGENT *** -- Reposting -- How to programatically resize and move an Edit Control within a Dlg b

    Hello,
    I am new to Windows Programming, especially the UI part.... I am facing this problem:
    I am writing a dialog based app, that contains a child edit control. I want to decrease the height of the edit control (say, by 'n' units), and shift its position downward by 'n' units.... in a way, creating space above the edit control, to dynamically create other controls. Except for the height and vertical position of the control, nothing changes.

    I don't know how to accomplish this. I would appreciate if you could help me out with this.

    Thanks a lot in advance,
    Narasimha


  2. #2
    Join Date
    Apr 1999
    Posts
    48

    Re: *** URGENT *** -- Reposting -- How to programatically resize and move an Edit Control within a D

    Get a pointer to the control using GetDlgItem().
    Use the GetWindowRect() function on it to find where the control currently is, calculate the desired new position, then use MoveWindow() to relocate it where you want it.

    Cheers,
    Roger.




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