Use IsWindowVisible instead of GetWindowLong(GWL_STYLE) & WS_VISIBLE as a test for desktop visibility

Dmitry Timoshkov dmitry at
Thu Mar 3 02:09:48 CST 2005

"Robert Shearman" <rob at> wrote:

> I would have thought the suggestions at this page would be better:

"To determine whether a service is running as an interactive service,
call the GetProcessWindowStation function to retrieve a handle to the
window station, and the GetUserObjectInformation function to test whether
the window station has the WSF_VISIBLE attribute."

Good suggestion. Although according to
msg.c:2524: Test failed: IsWindowVisible() should return TRUE

IsWindowVisible() detects an invisible desktop under win2k just fine.
According to results Win95 and Win98 are not affected
by desktop visibility at all (thanks to their broken services model),
and IsWindowVisible() doesn't detect an invisible desktop under NT40.


More information about the wine-devel mailing list