Thread: System Metrics

  1. #1
    Unregistered
    Guest

    Question System Metrics

    Hi All,

    Hope you're having a cool Xmas.
    Can anyone tell me how to get VC++ to let me use the GetSystemMetrics function? I can find it in help, and apparently can include the appropriate header file, but do I have to do something with the libraries? And how? I've never mucked about in this area before.

    Cheers, and Happy new Year!

    Phil.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I'm not at home now so I cannot bring up my SDK help. I'm fairly sure that you must specify which system metric you want via a pre-defined mneumonic.

  3. #3
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    Hey,

    Its In Lib: User32.lib
    And is in Winuser.h (windows.h)

    So really i should think the problem your having is with the systax of the function as the above lib and header should already be included.

    Heres an example of how its used:

    //the SM_CXSCREEN Param gets the x length of the screen
    int cx = GetSystemMetrics(SM_CXSCREEN);


    Hope the helps

    Cheers
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File System Implementation
    By dodgeviper in forum C Programming
    Replies: 9
    Last Post: 11-16-2007, 01:04 PM
  2. Using system icons
    By @nthony in forum Windows Programming
    Replies: 1
    Last Post: 01-13-2007, 07:56 PM
  3. Linux database system needed
    By BobS0327 in forum Tech Board
    Replies: 7
    Last Post: 06-11-2006, 03:56 PM
  4. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  5. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 07:12 AM