I am working on an application in which a window is transparent initially,then on a key press (say shift+tab
) window should be Not ClickThrough
. Code which I use to get ClickThrough
is as follow:
_hwnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT,
TEXT("Example"),
title, WS_BORDER,
GetSystemMetrics(SM_CXSCREEN) / 2 - _width / 2,
GetSystemMetrics(SM_CYSCREEN) / 2 - _height / 2,
_width, _height,
NULL, NULL,
NULL, NULL);
int opacity = 70;
SetLayeredWindowAttributes(_hwnd, 0, (255 * opacity) / 100, LWA_ALPHA);
Now, any solution to get Not ClickThrough
? I google it but never find any one.