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

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


"Robert Shearman" <rob at codeweavers.com> wrote:

> I would have thought the suggestions at this page would be better:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/interactive_services.asp

"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

http://test.winehq.org/data/200502231000/2000_IDWASEMPTY_5/user32:msg.txt
msg.c:2524: Test failed: IsWindowVisible() should return TRUE

IsWindowVisible() detects an invisible desktop under win2k just fine.
According to test.winehq.org 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.

-- 
Dmitry.




More information about the wine-devel mailing list