0

I want to hook to the resizing and/or position change of TrayNotifyWnd
I am utilizing what I found here:

How to use winapi SetWinEventHook in python?

Now I do realize that this captures events from all instances, instead of just the ones in the taskbar or to be more precise just TrayNotifyWnd, however it should fire also when window elements inside Shell_TrayWnd like TrayNotifyWnd are resized ???

EVENT_SYSTEM_MOVESIZEEND= 0x000B

user32.SetWinEventHook.restype = ctypes.wintypes.HANDLE
hook = user32.SetWinEventHook(
    EVENT_SYSTEM_MOVESIZEEND,
    EVENT_SYSTEM_MOVESIZEEND,
    0,
    WinEventProc,
    0,
    0,
    WINEVENT_OUTOFCONTEXT
)

It does fire on every window being resized, but not TrayNotifyWnd.
I've been testing this by manually resizing TrayNotifyWnd with win32gui.SetWindowPos, hook does not trigger

Windows 11, Python 3.10.7

YAWL
  • 27
  • 7
  • This [shouldn't come](https://stackoverflow.com/questions/74044578/python-resize-rebarwindow32-with-setwindowpos-win32gui#comment130751061_74044578) as a surprise. – IInspectable Oct 14 '22 at 12:11
  • 1
    Fair enough. Here's valuable information then: [Is it legal to have a cross-process parent/child or owner/owned window relationship?](https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683). Make sure you do not confuse *"I don't understand what this is telling me"* with *"This is useless spam"*. – IInspectable Oct 15 '22 at 09:57

0 Answers0