I have an MFC MDIFrame / View architecture. When the child frame/view is resized I want to resize some of the displayed controls.
So, in my CMDIChildWnd
, I handle OnExitSizeMove
, because I don't want to recalculate on every OnSize
message. This works fine, but not when the child is maxmised or restored.
I thought it would be easy to check in my view's OnSize
event for nType == SIZE_MAXIMIZED
, but for some reason it is always equal to SIZE_MAXIMIZED
.
How can I detect my MDIChild's maximise / restore events?
What I have tried:
I tried catching every combination of size, window position and resizing messages I could think of. Both in my view and my child frame, using the function overrides and even through PreTranslateMessage
, I just can't usefully detect this simple event.
It's driving me mad.