Author Topic: default position of output console window  (Read 12722 times)

Offline mahaju

  • Multiple posting newcomer
  • *
  • Posts: 25
default position of output console window
« 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

Offline eoneuk

  • Multiple posting newcomer
  • *
  • Posts: 18
    • http://
Re: default position of output console window
« Reply #1 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

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: default position of output console window
« Reply #2 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

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

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

Jack
« Last Edit: December 05, 2011, 12:01:25 am by JackDawson »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: default position of output console window
« Reply #3 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
(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!]

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: default position of output console window
« Reply #4 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


EDIT : I retract the word Simple. Nothing in programing is simple.
« Last Edit: December 05, 2011, 01:01:06 am by JackDawson »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: default position of output console window
« Reply #5 on: December 05, 2011, 11:32:20 am »
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!]

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: default position of output console window
« Reply #6 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 :)