如何检测窗口大小的调整用的Windows7大小、窗口

由网友(只照我的心上人)分享简介:[问题] 1 。如何检测的窗口(WPF)的大小由 Aero对齐?那么我可以忽略新的大小和位置。1. How to detect the window (WPF) was resized by Aero Snap? then i can ignore the new size and position.谢谢您的...

[问题]

1 。如何检测的窗口(WPF)的大小由 Aero对齐?那么我可以忽略新的大小和位置。

1. How to detect the window (WPF) was resized by Aero Snap? then i can ignore the new size and position.

谢谢您的回答和评论的进步。

Thanks for your answer and comments in advance.

推荐答案

在出口处,呼叫的 GetWindowPlacement 。这将返回当前窗口的大小和位置,以及是否最小化,最大化或restord,它也会给你最新的恢复窗口的大小和位置。

On exit, Call GetWindowPlacement. This will return the current window size and position, and whether you are minimized, maximized or restord, it will also give you the latest 'restored' window size and position.

所以,你不必跟踪更改您的窗口位置,只问当你需要它。

So you don't have to track changes to your window position, just ask when you need it.

typedef struct _WINDOWPLACEMENT {
    UINT length;
    UINT flags;
    UINT showCmd;
    POINT ptMinPosition;
    POINT ptMaxPosition;
    RECT rcNormalPosition;
} WINDOWPLACEMENT;
阅读全文

相关推荐

最新文章