Message handler functions in overloaded Tcustomform
Procedure Wmgetminmaxinfo (var message:twmgetminmaxinfo); Message wm_getminmaxinfo;
Procedure Tbrxserverform.wmgetminmaxinfo (var message:twmgetminmaxinfo);
Begin
inherited;
With message.minmaxinfo^ do
Begin
Ptmintracksize.x: = 640;
PTMINTRACKSIZE.Y: = 480;
End
End
Wm_getminmaxinfo messages are sent to a window when the form changes size or position, the application can overwrite the form in it
The size and position of the.
The message structure is defined as follows:
LRESULT CALLBACK WindowProc (
HWND hwnd,//Handle to Window
UINT umsg,//Wm_getminmaxinfo
WPARAM WPARAM,//Not used
LPARAM LPARAM//Window information (lpminmaxinfo)
);
The second parameter is the ID value of this message.
The last parameter is the pointer to the Minmaxinfo struct. This structure is defined as follows:
typedef struct TAGMINMAXINFO {
Point ptreserved;
Point Ptmaxsize;
Point Ptmaxposition;
Point ptMinTrackSize;
Point ptMaxTrackSize;
} minmaxinfo;
Ptreserved:
Reserved items, not currently used.
Ptmaxsize:
Specifies the maximum height (point.x) and width (point.y) of the form. In a multi-monitor system, the settings are applied to the primary monitor.
Ptmaxposition:
Specifies the position of the left side of the form that maximizes the state (point.x) and the position of the maximized form Dingbian (POINT.Y). In the multi-monitor
System, the settings are applied to the primary monitor.
ptMinTrackSize:
Specifies the minimum width lower limit (point.x) and minimum height (point.y) of the form frame. In a multi-monitor system, no
have been changed.
ptMaxTrackSize:
Specifies the minimum width lower limit (point.x) and minimum height (point.y) of the form frame in a multi-monitor system, the size and
The largest value in the monitor.
Remarks
The following table describes the changes that occur for a system with multiple monitors.
Minmaxinfo member Definition for multiple monitors
Ptmaxsize when a window was maximized or resized, this refers to the primary monitor.
Ptmaxposition refers to the monitor, the window would maximize on, not the desktop.
ptMinTrackSize unchanged.
ptMaxTrackSize Size for a window, made as large as the virtual screen.
The system automatically compensates for differences between the primary monitor and the monitor of the window. Thus, if the user leaves ptmaxsize untouched, a window on a monitor larger than the primary monitor would maximize to the S Ize of the larger monitor.
Requirements
Windows nt/2000/xp:included in Windows NT 3.1 and later.
Windows 95/98/me:included in Windows later and.
Header:declared in Winuser.h; Include Windows.h.
Limit the size of a form