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

Thread: windowsize

  1. #1
    Guest

    windowsize

    I want a MFC-program (SDI) to run in a big window, same size as the entire
    screen without a border. Can someone tell me how to do that?


  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: windowsize

    I didn't test this, but you should be able to determine the maximum width and height for your window by using the desktop window's dimensions as a guide:

    CDC *pDC = CWnd::GetDeskTopWindow()->GetDC();
    int MaxXSize = pDC->GetDeviceCaps(HORZRES);
    int MaxYSize = pDC->GetDeviceCaps(VERTRES);
    pDC->ReleaseDC();
    ...

    Now create a top-level window without a border that's MaxXSize wide and MaxYSize tall, positioned at (0,0).

    Regards,

    Paul McKenzie


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