WM_GETINFO相关

来源:互联网 发布:报纸排版软件有哪些 编辑:程序博客网 时间:2024/05/02 02:52

MINMAXINFO structure

typedef struct tagMINMAXINFO {
  POINT ptReserved;
  POINT ptMaxSize;
  POINT ptMaxPosition;
  POINT ptMinTrackSize;
  POINT ptMaxTrackSize;
} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;


ptMaxSize
Type: POINT
The maximized width (x member) and the maximized height (y member) of the window. For top-level windows, this value is based on the width of the primary monitor.

感觉这成员没有作用

 

ptMaxPosition
Type: POINT
The position of the left side of the maximized window (x member) and the position of the top of the maximized window (y member). For top-level windows, this value is based on the position of the primary monitor.
ptMinTrackSize
Type: POINT
The minimum tracking width (x member) and the minimum tracking height (y member) of the window. This value can be obtained programmatically from the system metrics SM_CXMINTRACK and SM_CYMINTRACK (see the GetSystemMetrics function).
ptMaxTrackSize
Type: POINT
The maximum tracking width (x member) and the maximum tracking height (y member) of the window. This value is based on the size of the virtual screen and can be obtained programmatically from the system metrics SM_CXMAXTRACK and SM_CYMAXTRACK (see the GetSystemMetrics function).

对于设置窗口的大小,需要用ptMinTrackSize, ptMaxTracksize即可

WM_GETMINMAXINFO message 里的解释:

Remarks
The maximum tracking size is the largest window size that can be produced by using the borders to size the window. The minimum tracking size is the smallest window size that can be produced by using the borders to size the window.

可见 ptMaxSize确实没有作用,可能在多屏幕里有用吧

简单例子:

case WM_GETMINMAXINFO:  //对lparam进行设置值

..............
break;