Is there a way to change the maximum width of a window without using the WM_GETMINMAXINFO message?

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-04-23T11:29:31Z Indexed on 2010/04/23 11:33 UTC
Read the original article Hit count: 300

Filed under:
|
|
|
|

I want to change the imposed Windows maximum width that a window can be resized to, for an external application's window (not my C#/WinForms program's window).

The documentation of GetSystemMetrics for SM_CXMAXTRACK says: "The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message."

Is there a way to modify this SM_CXMAXTRACK value (either system wide or for one particular window), without processing the WM_GETMINMAXINFO message? Maybe an undocumented function, a registry setting, etc.?

(Or: The documentation for MINMAXINFO.ptMaxTrackSize says: "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." Maybe there is a way to change the size of the virtual screen?)

Thank you

© Stack Overflow or respective owner

Related posts about c#

Related posts about win32