How do you find out on Microsoft WIndows how big your desktop is? Just ask the desktop window:
OSHwnd getDesktopWindow
getWindowRect: (rect := OSRect new).
One might expect this to work with dual monitors as well, of course. It doesn't. Instead of asking the desktop window, you have to dig out the program manager from the shadows it's been condemned to ever since Windwos 95:
(OSHwnd findWindow: 'Progman' lpszWindow: 'Program Manager')
getWindowRect: (rect := OSRect new)
This is one of those days where I'd want to give the person responsible for that a vivid impression of what I think of it.
Sigh.

Leave a comment