I'm trying to find a way to detect when my own
window is being activated from Alt+Tab
.
I thought about using CBTProc
but HCB_ACTIVATE
doesn't give this info, also using a LowLevelKeyboard
hook, but I would like to avoid hooking.
While searching more about I found that there's an API that stores this information SwitchToThisWindow
Type: BOOL
A TRUE for this parameter indicates that the window is being switched to using the Alt/Ctl+Tab key sequence. This parameter should be FALSE otherwise.
But this API is used by the taskbar
, I wonder if is possible to get this information into my window.