//minmax 限制窗口大小
namespace win.ui;
//minmax 限制窗口大小
class minmax{ 
	ctor(winform,minX,minY,maxX,maxY){  
		if( ! (minX && minY) ){
			_,_,minX,minY = winform.getPos();
		}
		
		if(!maxX) maxX = ::GetSystemMetrics(0x10/*_SM_CXFULLSCREEN*/); 
			if(!maxY) maxY = ::GetSystemMetrics(0x11/*_SM_CYFULLSCREEN*/)   
      			+ ::GetSystemMetrics(0x4/*_SM_CYCAPTION窗口标题的高度*/) ;
      			 
		winform.onGetMinMaxInfo = function(hwnd, message, wParam, lParam){
			::CopyMemoryByStruct( topointer( lParam ), this, 40 ); 
			return 0;
		}; 
	};
	struct reserved = ::POINT();
	struct maxSize = ::POINT(maxX,maxY);
	struct maxPosition = ::POINT();
	struct minTrackSize = ::POINT(minX,minY);
	struct maxTrackSize = ::POINT(maxX,maxY);
}
 

/**intellisense()
win.ui.minmax = 限制窗口拖动改变大小的范围
win.ui.minmax(.(winform,最小宽度,最小高度,最大宽度,最大高度) = 除第一个参数以外,其他参数可选\n默认最小为当前窗口大小,最大为最大化大小
win.ui.minmax() = !minmaxinfo.
!minmaxinfo.maxSize = !point.
!minmaxinfo.maxPosition = !point.
!minmaxinfo.minTrackSize = !point.
!minmaxinfo.maxTrackSize = !point.
end intellisense**/
