The combobox popup window may appear outside the combobox window, how?

in windows, how to make the window "child" behind the parent window, and the parent window is always in the active state (GetActiveWindow () returns the parent element), as well as the combobox popup window.

+3
source share
1 answer

I think these are the main points when trying to do this:

  • A popup is a top-level window that has the same parent as the control. (i.e., the popup is not a child of the control. It is not a child at all, it is a top-level window, but one without a thick border, etc., so it does not look like a regular top-.) Therefore, it can extend beyond management boundaries.

  • When a popup is created, it is displayed using ShowWindow (hWndPopup, SW_SHOWNA), so that it does not accept input focus. This prevents an inactive parent window.

  • , SetCapture. , , , . , , ( , ). WM_CAPTURECHANGED, - . ReleaseCapture, .

  • WM_MOUSEACTIVATE, MA_NOACTIVATEANDEAT.

+1

Source: https://habr.com/ru/post/1777625/


All Articles