flat assembler
Message board for the users of flat assembler.

Index > Windows > How to get avaible area of the desktop?

Author
Thread Post new topic Reply to topic
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Does anybody have an idea how do do it? By avaible area I mean coordinates (a RECT?) of the desktop area without the taskbar.
Question
Post 26 Oct 2003, 14:24
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
GetSystemMetrics, SM_CXFULLSCREEN, SM_CYFULLSCREEN

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 26 Oct 2003, 17:12
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Thanks, but it didn't give me a proper result (return value was 553 while my taskbar "begins" at 570 Smile) So there was empty space beetwen my window and the taskbar. But I found another solution: SystemParametersInfo + SPI_GETWORKAREA, and it works just fine.
Post 26 Oct 2003, 17:54
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
Code:
invoke GetSystemMetrics,SM_CXSCREEN 
invoke GetSystemMetrics,SM_CYSCREEN
    

_________________
Code it... That's all...
Post 26 Oct 2003, 19:36
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
No, they return screen resolution, not the workarea size. And with SystemParametersInfo I can even handle the cases when user has his taskbar on top of the screen Smile
Post 26 Oct 2003, 20:21
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
Here is the documentation (excerpts actually) in win32.hlp under GetSystemMetrics:
Quote:
SM_CXFULLSCREEN, SM_CYFULLSCREEN
Width and height of the client area for a full-screen window. To get the coordinates of the portion of the screen not obscured by the tray, call the SystemParametersInfo function with the SPI_GETWORKAREA value.

SM_CXMAXIMIZED, SM_CYMAXIMIZED
Default dimensions, in pixels, of a maximized top-level window.

SM_CXSCREEN, SM_CYSCREEN
Width and height, in pixels, of the screen.


And here's some parts from the SystemParametersInfo section:
Quote:
SPI_GETWORKAREA
Retrieves the size of the working area. The working area is the portion of the screen not obscured by the tray. The pvParam parameter must point to the RECT structure that receives the coordinates of the working area.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 27 Oct 2003, 11:39
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
So all in all, SPI_GETWORKAREA is what I need.
Post 27 Oct 2003, 12:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.