[time-nuts] Lady Heather wants to know: How big is your tube?

David C. Partridge david.partridge at dsl.pipex.com
Thu Oct 15 09:36:24 UTC 2009

Mark, just ask the system how big the screen is using GetWindowRect():

#include "wtypes.h"
#include <iostream>
using namespace std;
// Get the horizontal and vertical screen sizes in pixel
void GetDesktopResolution(int& horizontal, int& vertical)
   RECT desktop;
   // Get a handle to the desktop window
   const HWND hDesktop = GetDesktopWindow();
   // Get the size of screen to the variable desktop
   GetWindowRect(hDesktop, &desktop);
   // The top left corner will have coordinates (0,0)
   // and the bottom right corner will have coordinates
   // (horizontal, vertical)
   horizontal = desktop.right;
   vertical = desktop.bottom;
int main()
   int horizontal = 0;
   int vertical = 0;
   GetDesktopResolution(horizontal, vertical);
   cout << horizontal << '\n' << vertical << '\n';
   return 0;


-----Original Message-----
From: time-nuts-bounces at febo.com [mailto:time-nuts-bounces at febo.com] On
Behalf Of Mark Sims
Sent: 15 October 2009 04:50
To: time-nuts at febo.com
Subject: [time-nuts] Lady Heather wants to know: How big is your tube?

The next version of Lady Heather has support for some bigger screen sizes.
 Unfortunately the graphics library used cannot enter an arbitrary full
screen video mode.  It needs to know what the screen res is before it can
set a full screen video mode.  

It can create a window of arbitrary size.  If the window is smaller than the
screen size,  it looks OK.  If it is bigger than the native screen size,
 the window gets downscaled into an unreadable blob.

The question is what is the maximum full screen resolution of your video
monitor?   If there is some consensus on screen sizes in use,  I can
optimize the code for maximum natural goodness...


Hotmail: Free, trusted and rich email service.
time-nuts mailing list -- time-nuts at febo.com To unsubscribe, go to
and follow the instructions there.

More information about the time-nuts mailing list