Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WS_BORDER interference on SC_DRAGMOVE - how to fix ?

9 views
Skip to first unread message

R.Wieser

unread,
Jan 6, 2023, 6:22:12 AM1/6/23
to
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


Paul N

unread,
Jan 6, 2023, 11:24:46 AM1/6/23
to
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.

R.Wieser

unread,
Jan 6, 2023, 12:12:41 PM1/6/23
to
"Paul N" <gw7...@aol.com> wrote in message
news:ab3b3601-3f96-425a...@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


0 new messages