|

@项目部004
以下是改进的代码:
|
窗口_限制尺寸 | 逻辑型 | | |
窗口句柄 | | | | | 最小宽度 | | | | | 最小高度 | | | | | 最大宽度 | | | | | 最大高度 | | | | | SetPropA (窗口句柄, “minimum width”, 选择 (是否为空 (最小宽度 ), -1, 最小宽度 )) SetPropA (窗口句柄, “minimum height”, 选择 (是否为空 (最小高度 ), -1, 最小高度 )) SetPropA (窗口句柄, “maximum width”, 选择 (是否为空 (最大宽度 ), -1, 最大宽度 )) SetPropA (窗口句柄, “maximum height”, 选择 (是否为空 (最大高度 ), -1, 最大高度 )) 返回 (SetPropA (窗口句柄, “Limit size”, SetWindowLongA (窗口句柄, -4, 到整数 (&限制尺寸回调 )) )) |
限制尺寸回调 | 整数型 | | |
hwnd | | | | | uMsg | | | | | wParam | | | | | lParam | | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | subproc | | | | maxwin | MINMAXINFO | | | val | | | |
subproc = GetPropA (hwnd, “Limit size”) 如果真 (GetPropA (hwnd, “Cancel the limit”) = 1 ) RemovePropA (hwnd, “Limit size”) RemovePropA (hwnd, “Cancel the limit”) RemovePropA (hwnd, “minimum width”) RemovePropA (hwnd, “minimum height”) RemovePropA (hwnd, “maximum width”) RemovePropA (hwnd, “maximum height”) SetWindowLongA (hwnd, -4, subproc ) 返回 (0 ) 如果真 (uMsg = 36 ) CopyMemory_int2minmaxinfo (maxwin, lParam, 40 ) val = GetPropA (hwnd, “minimum width”) 如果真 (val > -1 )  maxwin.ptMinTrackSize.横 = val val = GetPropA (hwnd, “minimum height”) 如果真 (val > -1 )  maxwin.ptMinTrackSize.纵 = val val = GetPropA (hwnd, “maximum width”) 如果真 (val > -1 )  maxwin.ptMaxTrackSize.横 = val val = GetPropA (hwnd, “maximum height”) 如果真 (val > -1 )  maxwin.ptMaxTrackSize.纵 = val CopyMemory_minmaxinfo2int (lParam, maxwin, 40)返回 (CallWindowProcA (subproc, hwnd, uMsg, wParam, lParam)) |
评分
-
查看全部评分
|