CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    9

    Resizing the console

    Is is possible to resize the console window so that when your program starts, the console is not at its default size? For example, if you open a command prompt, right click on the title bar, and go to Properties, you can change the window dimensions on the Layout tab. Is there a way to set these dimensions in your code so that they are customized when your program starts running?

    Thanks

  2. #2
    Join Date
    Aug 2005
    Posts
    478

    Re: Resizing the console


  3. #3
    Join Date
    Oct 2005
    Posts
    9

    Re: Resizing the console

    I sort of understand that.
    Follow up question though... does it matter which development environment I'm using? Just out of curiosity, because that's from MSDN and I'm currently working with Bloodshed Dev-C++.

  4. #4
    Join Date
    Feb 2005
    Location
    Normandy in France
    Posts
    4,590

    Re: Resizing the console

    No, it does not matter.
    You must just compile a Win32 PE executable.
    ::SetConsoleDisplayMode is an API of the kernel32.dll of Win32 OS.
    However, you can perfectly use this function in debug versions of your program, but it is preferable to don't use in the release of your program, if you want that your program run on old Windows, because it does not exists before Windows XP. Even Windows 2000 and Windows Me don't support this function.
    "inherit to be reused by code that uses the base class, not to reuse base class code", Sutter and Alexandrescu, C++ Coding Standards.
    Club of lovers of the C++ typecasts cute syntax: Only recorded member.

    Out of memory happens! Handle it properly!
    Say no to g_new()!

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