Can someone show me some sample code that uses SetWindowPos() to move / resize a command button?
Printable View
Can someone show me some sample code that uses SetWindowPos() to move / resize a command button?
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);