Thread: System metric for the window size

  1. #1
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    System metric for the window size

    i have looked on msdn for the window im working with's x and y size using GetSystemMetrics does any one know what it is

    ps: sorry if that dont make sence im tired :P

  2. #2
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463
    I'm not sure what you're asking for exactly. The paramters for getting the size of the desktop are SM_CXSCREEN and SM_CYSCREEN. I'm not sure on this one because I'm only looking through the headers but I think the size of your window would be SM_CXSIZE and SM_CYSIZE. Try those and let me know if they work

  3. #3
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    reply

    ok here is what i have and it should explain a little bit better wat i am doing

    Code:
    		int x = GetSystemMetrics(SM_CXSIZE);
    		MoveWindow(hwndEdit , 10 , 10 , x - 50 , 15 , TRUE);
    when it starts up it seams that the edit control is not responding and it is not resizing, im trying to make auto resize with the main window (hwnd)
    thanks

  4. #4
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214
    in other words i want to get the width of the client rect.

  5. #5
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    :)

    i got it worked out now..for those who may come accross this you need to use GetClienRect()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. Invalid conversion from 'void*' to 'BYTE' help
    By bikr692002 in forum C++ Programming
    Replies: 9
    Last Post: 02-22-2006, 11:27 AM
  3. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  4. Complete compilable createProcess Example needed
    By Extolfreak in forum Windows Programming
    Replies: 6
    Last Post: 01-17-2006, 04:52 AM
  5. Invoking MSWord
    By Donn in forum C Programming
    Replies: 21
    Last Post: 09-08-2001, 04:08 PM