3V3LYN
3V3LYN

Reputation: 61

Delphi enable and disable click through to form

I use SetWindowLong() to click through my form. I would like to reverse this process, but do not know how. I use the code below:

SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_TRANSPARENT);
SetWindowLong(Handle, GWL_HWNDPARENT, GetDesktopWindow);

Upvotes: 0

Views: 737

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597941

To remove the transparent style:

SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) and not WS_EX_TRANSPARENT);

Upvotes: 2

Related Questions