News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

default position of output console window

Started by mahaju, December 03, 2011, 12:33:38 PM

Previous topic - Next topic

mahaju

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

eoneuk

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

JackDawson

#2
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

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

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

Jack

oBFusCATed

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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

JackDawson

#4
Quote from: 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

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.


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


EDIT : I retract the word Simple. Nothing in programing is simple.

oBFusCATed

You have the code and you're free to change it to suit your needs:)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

JackDawson