how to create console window without frame ???

Started by
6 comments, last by aayudh 16 years, 4 months ago
Hi, I want to create a console window without a frame. Basically I want to use this within another win32 window created with CreateWindow. How can I do this ? OR I really really want to create this child window with CreateWindowEx (because it offers the functionality to create the window with/without frame and other stuff?), but how do I make this win32 window execute/display/interact console app, for example cmd.exe ?? Thanks for any help, madan
Advertisement
I haven't trued this, so it may not work - but you could use GetConsoleWindow to get the handle to the console window once you've created it, and then use SetWindowLongPtr to change the style and parent.
If you want to create your own window that interacts and displays a console window, you may want to check out the source code to Console, a console replacement program.
WOOOOWWW!!!! superb..

Thanks for the reply. You made my day. What I wanted is exactly (and even better) this Console!!! I think I can call this Console from another win32 app and with its frames and stuff ..

Thanks man !!!
OK. Now I have another problem.

How can I make this console appear above my render window. I basically want to use the transparent feature of Console2. But I am not able to do it. I tried all these functions

SetWindow
SetActiveWindow
SetFocus
ShowWindow

in many combinations. It works if the windows are like normal win32 windows and we can happily switch our focus. But here the render area must be updated before Console2 can draw its window above mine. How to do this ?

The problem is even worse if my renderer is in full - screen mode !!! I cant see the Console2 window and no way to change focus.

[Edited by - aayudh on December 3, 2007 10:31:39 AM]
I'm pretty sure you can't draw a GDI window (includes buttons etc) on a fullscreen DirectX window without pulling some tricks at least.

I haven't tried this in a long time though, but this at least might help you in your search to make it work!
I don't know if that can help you, but eConsole seems to provide a borderless console, at least from the screenshots...
regardless it being econsole or Console2, they have to be started as a new process(using CreateProcess command in my app) if I dont want to mess the source code of that. Which means, in full screen mode they will change their focus and my full sceen app is now stuck as the console (which now has the focus) cant be seen in full screen mode.

hmm...so I am thinking this whole idea having a seperate process for the console is bad.

opinions ? suggestions ?

This topic is closed to new replies.

Advertisement