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

Thread: SetWindowPos ?

  1. #1
    Join Date
    Nov 2002
    Posts
    278

    SetWindowPos ?

    Can someone show me some sample code that uses SetWindowPos() to move / resize a command button?

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    If you don't want to change the Z-order, you would rather use MoveWindow() to do that:
    Code:
    CButton m_button;
    
    //...
    
    CRect bounds;
    m_button.GetWindowRect(bounds);
    bounds.OffsetRect(dx, dy);
    m_button.MoveWindow(bounds);

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