Get toast notification dimensions (size, rect)

32 views Asked by At

I'm trying to work out how to get the X/Y/W/H dimensions/size of a third-party toast (app) notification that pops up (not created by myself). I can get the hWnd to it easily enough, but the GetWindowRect API doesn't match the hWnd size. Any clues? Thanks.

Tried this so far:

RECT rect;
GetWindowRect(hWnd, &rect);

Which as I said, isn't working in that it doesn't get the actual size of the toast (it gets larger by including the invisible area under it). Toasts can be different sizes too, so I need it to be exactly as the toast's size. Thanks for any clues.

0

There are 0 answers