This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup window size: a suggestion


Igor Pechtchanski writes:

> I like that last one (detecting the video mode), and was going to suggest
> it too, but then thought that some users might like more control over
> their window size...  However, on reflection, it does sound good.  And for
> the control freaks (like me), a command-line option wouldn't hurt,
> either... ;-)

#include <windows.h>

     DEVMODE dm;
     dm.dmSize = sizeof(DEVMODE);
     EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);

Relevant bits are

   dm.dmPelsWidth    // screen width
   dm.dmPelsHeight  //  screen height

HTH

Norman


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]