Computer Science Canada

How do I set MaxX and MaxY to the window?

Author:  Cancer Sol [ Fri Apr 05, 2013 6:19 pm ]
Post subject:  How do I set MaxX and MaxY to the window?

^Title.
I've only found how to in other languages like Turing: http://compsci.ca/holtsoft/doc/view_set.html
but not C++. It'd be really useful for some of my programs.

Edward Yang

Author:  Insectoid [ Fri Apr 05, 2013 6:37 pm ]
Post subject:  RE:How do I set MaxX and MaxY to the window?

Are you still using the console window? You can't do this without accessing OS-specific libraries. There might be a cross-platform library available that does it, but I don't know of any. #include windows.h will give you some functions to do this, but it will, naturally, only work on Windows. See: http://www.cplusplus.com/forum/windows/10731/

Author:  Cancer Sol [ Fri Apr 05, 2013 7:20 pm ]
Post subject:  Re: RE:How do I set MaxX and MaxY to the window?

Insectoid @ 4/5/2013, 6:37 pm wrote:
Are you still using the console window? You can't do this without accessing OS-specific libraries. There might be a cross-platform library available that does it, but I don't know of any. #include windows.h will give you some functions to do this, but it will, naturally, only work on Windows. See: http://www.cplusplus.com/forum/windows/10731/

Yeah, I still use consoles. I'll be using consoles until the end of Alex Allain's ebook (if it doesn't teach me how to make GUIs), and I'll start making
GUIs and textboxes and stuff, after that.

I'm not trying to change the console's size, I'm just trying to make the coordinates of 0,0 to the top-left corner of the console, for e.g.
So instead of 0,0 being at the top-left corner of the screen, it'll be at the top-left corner of the console window. (not sure if it is top-left though, I get my coordinates using GetCursorPos).

Sorry if my post was confusing to you, and/or unclear. Sad

Author:  Cancer Sol [ Sat Apr 06, 2013 9:49 pm ]
Post subject:  RE:How do I set MaxX and MaxY to the window?

Bump (am I allowed to?)


: