Placing GUI in Top Right Corner

This is a discussion on Placing GUI in Top Right Corner within the Windows Programming forums, part of the Platform Specific Boards category; Hi, Ive got an application written and running. However when the program starts i'd like the app to be located ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    29

    Question Placing GUI in Top Right Corner

    Hi,

    Ive got an application written and running.

    However when the program starts i'd like the app to be located in the top right corner of the screen.

    How can i do this please??

    Currently the dialog box is set up like this

    PHP Code:

    IDD_CONFIG_DIALOG DIALOG DISCARDABLE  0
    0225347
    STYLE DS_MODALFRAME 
    WS_POPUP WS_CAPTION WS_SYSMENU
    CAPTION 
    "Test Box"
    FONT 8"Arial"
    BEGIN 
    I take it the 0, 0 value make it start up in the top left, so therefore how can i work out the screensize etc?? If thats the best way to do it??

    Any help whatsoever would be great

    Thanks,

    Paul
    Last edited by pldd4; 07-16-2003 at 08:36 AM.

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    162
    I take it the 0, 0 value make it start up in the top left, so therefore how can i work out the screensize etc?? If thats the best way to do it??
    Here are two ways:

    1. Use the GetSystemMetrics function with the parameter SM_CXSCREEN, "ScreenWidth = GetSystemMetrics(SM_CXSCREEN);"

    2. Use the GetDeviceCaps function with the GetDC function and HORZRES as parameters, "ScreenWidth = GetDeviceCaps(GetDC(NULL), HORZRES);"

    I recommend the first option
    Last edited by Aidman; 07-16-2003 at 09:42 AM.
    We haven't inherited Earth from our parents; instead we have borrowed her from our children - old Indian saying.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    29
    Cheers mate, sorted

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI coding, placing of objects
    By jsithy in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 11:59 PM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. OpenGL, loading BMP Textures?
    By Zeusbwr in forum Game Programming
    Replies: 12
    Last Post: 12-09-2004, 05:16 PM
  4. Stack functions as arrays instead of node pointers
    By sballew in forum C Programming
    Replies: 8
    Last Post: 12-04-2001, 11:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21