Skip to main content
www.olaf-groeger.de

Main navigation

  • Home
  • NMR
  • Programming
    • Streams
    • Subclassing of edit controls
  • Software
    • Calimah Scheduler
    • ServicesCtl

Breadcrumb

  1. Home
  2. Programming
  3. Streams
  4. Console Window For GUI-based Windows Applications
  5. Usage and Download

Usage and Download

By olaf , 30 June 2025

All the afford needed to create a new stream class was to override the methods sync and overflow of basic_streambuf and write implementations for the output routines. Now we can write to a console window from a GUI based application:

OG_constream text_fenster;

int i = 10;
double d = 3.14156;
std::string sstr("STL String");
CString cstr("Microsoft CString");

text_fenster << "i = " << i << std::endl;
text_fenster << "d = " << d << std::endl;
text_fenster << "STL String = " << sstr.c_str() << std::endl;
text_fenster << "Microsoft CString = " << (LPCSTR) cstr << std::endl;

 

OG_constream

Download OG_constream.zip

Book traversal links for 3

  • Derive a new outer class which uses the inner class
  • Up
  • Overloading of input/output operators

Language switcher

  • English
  • German
Powered by Drupal