Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: mahaju on December 03, 2011, 12:33:38 pm

Title: default position of output console window
Post by: mahaju on December 03, 2011, 12:33:38 pm
I am using Codeblocks 8.02 in Windows 7 ultimate
Is there a way to change the default location of the console window that appears when I run my programs as well as the debugger?
Please let me know
Thank you
Title: Re: default position of output console window
Post by: eoneuk on December 03, 2011, 06:10:00 pm
I use XP Pro and this works for me:

with the console window open, click in upper left corner

a drop down menu will open

select properties, and the layout tab

uncheck "let system position window"

enter size and position

close
Title: Re: default position of output console window
Post by: JackDawson on December 04, 2011, 11:56:37 pm
You know, this is actually a very useful TIP about the Console default positions. I am wondering if an option could be added to C::B to be able to set that.

By the way, Thank you eoneuk for this help. I been curious about this with C::B myself.

Here is some info about how this could be implemented into the next version of C::B.

Console Functions
http://msdn.microsoft.com/en-us/library/ms682073.aspx (http://msdn.microsoft.com/en-us/library/ms682073.aspx)

MoveWindow function
http://msdn.microsoft.com/en-us/library/ms633534.aspx (http://msdn.microsoft.com/en-us/library/ms633534.aspx)

SetWindowPos function
http://msdn.microsoft.com/en-us/library/ms633545.aspx (http://msdn.microsoft.com/en-us/library/ms633545.aspx)

Jack
Title: Re: default position of output console window
Post by: oBFusCATed on December 05, 2011, 12:26:27 am
JackDawson:
Positioning windows is not a task for the IDE, but for the "window manager" -> explorer.exe or whatever it is called in newer windows.
So this feature won't be added in any of the future versions of C::B
Title: Re: default position of output console window
Post by: JackDawson on December 05, 2011, 12:37:28 am
JackDawson:
Positioning windows is not a task for the IDE, but for the "window manager" -> explorer.exe or whatever it is called in newer windows.
So this feature won't be added in any of the future versions of C::B

Hmm, I can see your point. However on the flip side the IDE is so it makes things easier to program with, and it is even talking to your Windows GUI in some cases. So why not have an option to set the window position ?  It would be just a simple code addition. This could come in handy whether its a console or a windows form.

Code
BOOL WINAPI SetWindowPos(  __in      HWND hWnd,  __in_opt  HWND hWndInsertAfter,  __in      int X,  __in      int Y,  __in      int cx,  __in      int cy,  __in      UINT uFlags);

Pulled that off this link : http://msdn.microsoft.com/en-us/library/ms633545.aspx (http://msdn.microsoft.com/en-us/library/ms633545.aspx)


EDIT : I retract the word Simple. Nothing in programing is simple.
Title: Re: default position of output console window
Post by: oBFusCATed on December 05, 2011, 11:32:20 am
You have the code and you're free to change it to suit your needs:)
Title: Re: default position of output console window
Post by: JackDawson on December 05, 2011, 03:27:37 pm
You have the code and you're free to change it to suit your needs:)

Thank you :)