T
TC
Hi Stephen (assuming you get to see this),
I'm revisiting the hoary old problem of disabling the minimize,
restore & close buttons in the titlebar of a maximized form.
I'm trying the following method, which I haven't seen suggested
before: subclass the form, and trap/ignore all WM_SYSCOMMAND messages
with SC_MINIMIZE, SC_RESTORE and SC_CLOSE. (Certainly, killing
WM_CLOSE disables the close box, so this approach seems worthy of
further investigation.)
I get SC_MINIMIZE and SC_CLOSE ok, but I only see SC_RESTORE when I
restore a *minimized* window - not when I restore a *maximized* one.
So that is a fatal deficiency. MSDN says that you get SC_RESTORE when
you restore a minimized or maximized window, but my tests on win98,
A97 do not support that.
You've done tons of work with subclassing etc, so maybe you can shed
some light on this, from your existing knowledge?
TIA,
TC
I'm revisiting the hoary old problem of disabling the minimize,
restore & close buttons in the titlebar of a maximized form.
I'm trying the following method, which I haven't seen suggested
before: subclass the form, and trap/ignore all WM_SYSCOMMAND messages
with SC_MINIMIZE, SC_RESTORE and SC_CLOSE. (Certainly, killing
WM_CLOSE disables the close box, so this approach seems worthy of
further investigation.)
I get SC_MINIMIZE and SC_CLOSE ok, but I only see SC_RESTORE when I
restore a *minimized* window - not when I restore a *maximized* one.
So that is a fatal deficiency. MSDN says that you get SC_RESTORE when
you restore a minimized or maximized window, but my tests on win98,
A97 do not support that.
You've done tons of work with subclassing etc, so maybe you can shed
some light on this, from your existing knowledge?
TIA,
TC