• WS_BORDER interference on SC_DRAGMOVE - how to fix ?

    From R.Wieser@21:1/5 to All on Fri Jan 6 12:21:55 2023
    Hello all,

    I'm dragging and/or resizing individual controls by sending them a
    SC_DRAGMOVE family message. That works.

    The problem is that when I give the control a WS_BORDER attribute (causing a black, single-pixel wide border to be drawn) than a number of the basic controls (static, edit, others) get a forced minimum size (which does seem
    to match the minimum width and height of a dialog).

    Question : Can, and if so how do I tell the move/size executing code *not*
    to apply those minimum size contraints ?

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul N@21:1/5 to R.Wieser on Fri Jan 6 08:24:44 2023
    On Friday, January 6, 2023 at 11:22:12 AM UTC, R.Wieser wrote:
    Hello all,

    I'm dragging and/or resizing individual controls by sending them a SC_DRAGMOVE family message. That works.

    The problem is that when I give the control a WS_BORDER attribute (causing a black, single-pixel wide border to be drawn) than a number of the basic controls (static, edit, others) get a forced minimum size (which does seem to match the minimum width and height of a dialog).

    Question : Can, and if so how do I tell the move/size executing code *not* to apply those minimum size contraints ?

    Can you intercept the WM_GETMINMAXINFO message? As far as I can tell, Windows sends this to a window as part of its check that a proposed new window size is actually OK, you just need to grab this message and "reply" saying that the current size of the
    window is indeed OK so there's no need for Windows to apply an unwanted default.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Fri Jan 6 18:12:09 2023
    "Paul N" <gw7rib@aol.com> wrote in message news:ab3b3601-3f96-425a-99a4-a0b2d043e61dn@googlegroups.com...

    Can you intercept the WM_GETMINMAXINFO message?

    Yep. And you hit the nail on the head. :-) Just setting the mintrackposition_x and -y members to someting small does the trick.

    Its a bit stupid though, I have put the handling of that message into my "framework" program for a new dialog, but simply didn't think about it. :-|

    Thanks.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)