I want to display one of those layered windows, and it's supposed to change transparency value when it gets the input focus.

It works fine, clicking in and out of the window switches the alpha value - just not the first time round when the prog starts.
I've used a message spy and a WM_SETFOCUS message gets sent, it just doesn't seem to have an effect: I just get an empty client area.

Here's my code. If I take out the ; it works even on the first time!

.elseif uMsg == WM_SETFOCUS
;PrintDec 123
invoke SetWndAlpha, hi

.elseif uMsg == WM_KILLFOCUS
;PrintDec 123
invoke SetWndAlpha, lo

Looks like when the debug window becomes active, it does something to the keyboard status of my window, fixing it.

What's happening? Why does the first WM_SETFOCUS message after startup get ignored?
Posted on 2002-03-07 16:05:27 by Odolo
Perhaps another (one-time) message between 1st & 2nd WM_SETFOCUS is changing the alpha again ? Why don't you monitor all messages in-between ?
Posted on 2002-03-08 03:06:37 by micmic