User 32 - Workspace Size

Blitz3D Forums/Blitz3D Programming/User 32 - Workspace Size

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi, I am using window mode 2 for my current project, and making it the size of the desktop by using the the User32 userlib command:

api_GetSystemMetrics(SM_CXSCREEN)

which is all fine, works great and returns a nice int of the screen width.

The trouble I am having is with the height, as it returns the total desktop height, not taking into consideration the start bar height (so it gets covered over, which I don't want).

What I am after seems to be the SPI_GETWORKAREA command, which works out the desktop size and automatically takes away any size taken up by the start bar. Unfortunately I don't know how to use this as it seems to return a custom variable that then needs processing to find the width.

I am not really too sure on this, here are some links that someone with more knowledge of such things could decipher:

http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2007-08/msg01786.html
http://lists.trolltech.com/qt-interest/2000-01/thread00432-0.html
http://support.microsoft.com/kb/q154823/

and, of course, the user32 userlib in the code archives:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1179