[RESOLVED] Largest Console window supported?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: [RESOLVED] Largest Console window supported?

  1. #1
    Join Date
    Jan 2009
    Location
    England
    Posts
    23

    [RESOLVED] Largest Console window supported?

    I am having issues with establishing the largest console window supported on my system. I have written this code:

    Code:
    void vmApp::GetMaxConsoleAppSize()
    {
        COORD maxConsoleSize;
    
    
        maxConsoleSize = GetLargestConsoleWindowSize(m_hStdOut);
        cout << "X = " << maxConsoleSize.X << " Y = " << maxConsoleSize.Y << endl;
    
    
        m_nMaxAppWidth = maxConsoleSize.X;
        m_nMaxAppHeight = maxConsoleSize.Y;
    }
    This reports X = 170 Y = 59 on my system. Issue here is that if I open a dos window (CMD), I am able to open the properties of that window and adjust the window size beyond what my method reports? How can I achieve this?
    What the mind can conceive it can achieve.

  2. #2
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,000

    Re: Largest Console window supported?

    Console, properties, layout, window size will allow you to set the width and height to any value you want. However, if you set a value for the window size larger than the values returned from GetLargestConsoleWindowSize(), then the window size is only adjusted to the largest console window size. If you save the values in properties and then go back to properties, layout you will see that the values have been set to the largest possible size and are not now the values you entered.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Jan 2009
    Location
    England
    Posts
    23

    Re: Largest Console window supported?

    My apologies, this method is returning the correct values. I was playing around with the screen buffer. Thanks for your reply.
    What the mind can conceive it can achieve.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center