I'm stumped. The GetWindowLong API, which was working fine last night, is returning zero today. According to MSDN:

Return Values
If the function succeeds, the return value is the requested 32-bit value. If the function fails, the return value is zero. To get extended error information, callGetLastError.
So I've got an "if Ret = 0" line which bails out of the routine so that I don't write crap to the window attributes. See, I have to "OR" the return value with the layered attribute, then write it back to the window. So if it's all zeroes (ie, the get function fails), then I'm writing all zeroes back to the window attributes (well all but the one bit that indicates layered). So I have something in there to prevent that.

But if I remove the prevention line, then it all works. Even if it writes all zeroes.

I'm guessing this is a case of poor documentation... I guess it's possible for a window's extended attributes to be all zeroes in some cases. In direct contradiction to Microsoft's own documentation on the function.

I hate Microsoft.

/me works on a maintenance release...
_________________________
Tony Fabris