Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Ideas for an embedded interactive console?

Ideas for an embedded interactive console?

Scheduled Pinned Locked Moved C / C++ / MFC
pythonhardwaretutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    z33z
    wrote on last edited by
    #1

    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!

    R 1 Reply Last reply
    0
    • Z z33z

      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!

      R Offline
      R Offline
      raja jamwal
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups