I've found some more questions on StackOverflow about my topic. One of them is here.
I have also read the Microsoft Documentation about MINMAXINFO
and the message associated with this structure. I simply can't make it work... Here is what I've tried so far:
case WM_PAINT:
{
MINMAXINFO mmi = { 0 };
SendMessage(hWnd, WM_GETMINMAXINFO, NULL, (LPARAM)&mmi);
POINT sz = { 640, 480 };
mmi.ptMaxSize = sz;
}
break;
I think this is completely wrong, since it is not having any effect on the window...
How can I get this working, for a minimum size of W: 450, H: 250
, and a maximum of W:800, H: 600
?
Further explanation of the effect that I need: when the user drags one corner, or border of the window, and the window has the maximum/minimum size, the user cannot make the window larger or smaller than the minimum_size
/maximum_size