How do you programmatically resize and move windows with the Windows API?

前端 未结 5 1746
刺人心
刺人心 2020-12-03 04:52

How do you programmatically resize and move windows with Windows API?

The scenario is: I want to vertically tile two windows (80%/20% width proportions).

5条回答
  •  生来不讨喜
    2020-12-03 05:20

    Use SetWindowPos() in the Windows API.

    Given a HWND, you can change the z-order, position (upper left), size, as well as numerous other flags (like showing or hiding, making it the active window or not, etc).

提交回复
热议问题