4

Does someone know a message that gets send at the end of a resizing event (like double clicking app bar, maximize button click, drag to the top of the screen, ...), a good example is WM_EXITSIZEMOVE, but it's only at the end of the dragging of the window size bar.

So my question is, does it exist a message that gets called when any sizing event has occured, at the end of it (not like WM_SIZE)?

Rakete1111
  • 47,013
  • 16
  • 123
  • 162

1 Answers1

6

You'll get a WM_WINDOWPOSCHANGED message with the SWP_NOSIZE flag cleared at the end of any sizing event. There's no other message that indicates sizing has finished other than WM_EXITSIZEMOVE which indicates the end of a modal moving/sizing loop. If you get WM_WINDOWPOSCHANGED without previously getting WM_ENTERSIZEMOVE then you can assume you're not being resized modally.

Jonathan Potter
  • 36,172
  • 4
  • 64
  • 79
  • 1
    A hint to anyone using this technique to detect *client* size changes in addition to *window* size changes: Also listen to `SWP_FRAMECHANGED` to account for situations like adding/removing a menu, adding/removing scroll bars, or changing the border from overlapped -> popup and vice versa. – Krishty Oct 25 '20 at 23:21