Ideas for an embedded interactive console?
-
I want to create a console like dialog, I was thinking like in a multi-line edit boxt, but I don't know how so I need some ideas to start with. It should work like a "real" console, where you only can write at the prompt, only delete what you just have written, but not yet executed and so on. Many games have a console like this, to send messages etc, maybe there's some code to start with? What the result should be is an interactive console for Python, but intergrated in my application as a modeless window or a dialog. Python is easy to embed with, for example PyRun_InteractiveLoop, reading and writing to stdin/out. Any ideas how this can be archived? Thanks!
-
I want to create a console like dialog, I was thinking like in a multi-line edit boxt, but I don't know how so I need some ideas to start with. It should work like a "real" console, where you only can write at the prompt, only delete what you just have written, but not yet executed and so on. Many games have a console like this, to send messages etc, maybe there's some code to start with? What the result should be is an interactive console for Python, but intergrated in my application as a modeless window or a dialog. Python is easy to embed with, for example PyRun_InteractiveLoop, reading and writing to stdin/out. Any ideas how this can be archived? Thanks!
Well you can paint it back bg with CTL_COLORSTATIC notification message, you can use keyboard handler to do pretty cool stuff or you can simply trace for keywrds like record for keyboard msgs in wnd proc, and use gettickcount know make if a word is typed.then you can simply use GetDlgItemText to get text then append, i recommend use sstream.h for string formatting. then simply set the text to edit box with setdlgitemtext