CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: screensize

  1. #1
    Join Date
    May 1999
    Location
    Sweden
    Posts
    55

    screensize

    Hi, I´ve created a popup-dialog that I want to be center on the screen. What fuction will give me the screensize? I want it to be centered in all screenresolutions. Please help me.

    Frederik.


  2. #2
    Guest

    Re: screensize

    if you do
    SetCursorPos(2000,2000);
    the cursor go at this position, but because screen is shorter
    like 800,600 the cursor don't go farther, you have to do
    GetCursorPos you will know wath is the bottom right corner
    and the rest should be easy.

    BOOL GetCursorPos(
    LPPOINT lpPoint // address of structure for cursor position
    );
    you have to include winuser.h


  3. #3
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: screensize

    Cwnd::CenterWindow()

    Sally


  4. #4
    Join Date
    Apr 1999
    Posts
    383

    Re: screensize

    CentreWindow() centers relative to the parent window. To centre the window relative to the screen, use

    CenterWindow(CWnd::GetDesktopWindow());

    Dave



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured