Window location

This is a discussion on Window location within the Windows Programming forums, part of the Platform Specific Boards category; I am creating an app that I want to be a.] non-resizable and b.] set at the bottom right corner ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    5

    Question Window location

    I am creating an app that I want to be a.] non-resizable
    and b.] set at the bottom right corner of the users screen by default

    Could someone point me in the right direction? I am not using MFC -

    Thank you

    exle

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    If you currently have any code, post it.

    Here are some things that may interest you:

    GetSystemMetrics()
    WS_SIZEBOX

    Look those up and you should be able to work it out.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Hi,

    I tried this:
    Code:
    hDesktop = GetDesktopWindow();
    
    GetClientRect(hDesktop, &DeskRect);
    
    MoveWindow(hwnd, DeskRect.right-640, DeskRect.bottom-480, 640, 480, true);
    (you could replace the 640 and 480 with x, y variables)

    This works fine except the taskbar is over the client area of the desktop window so the window appears under it, and I can't find a way as yet to find the width of the taskbar.
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

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, 09:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 11:50 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM

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