Click here to Skip to main content
15,909,737 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Vector & structur Pin
markkuk20-May-03 1:23
markkuk20-May-03 1:23 
GeneralRe: Vector & structur Pin
aguest20-May-03 12:02
aguest20-May-03 12:02 
GeneralRe: Vector & structur Pin
markkuk20-May-03 12:31
markkuk20-May-03 12:31 
GeneralRe: Vector & structur Pin
aguest20-May-03 14:36
aguest20-May-03 14:36 
GeneralRe: Vector & structur Pin
markkuk21-May-03 1:25
markkuk21-May-03 1:25 
GeneralWriting my own stream class Pin
Patje19-May-03 22:12
Patje19-May-03 22:12 
GeneralRe: Writing my own stream class Pin
cerez0220-May-03 5:15
cerez0220-May-03 5:15 
GeneralRe: Writing my own stream class Pin
Joaquín M López Muñoz20-May-03 10:28
Joaquín M López Muñoz20-May-03 10:28 
Writing your iostream class is not hard, but it's not trivial either. Basically you have to make CPrinter derive from std::ostream and provide a special std::streambuf class:
class CPrinter: public std::ostream
{
  typedef std::ostream super;
  CPrinterStreambuf sbuf; // more on this later
public:
  CPrinter():super(&buf){}
 
...
 
};
Now, std::ostream handles all the IO via the provided CPrinterStreambuf object, which derives from the virtual base class std::streambuf. Depending on where you want the bytes to be sent, you might consider writing CPrinterStreambuf from scratch or deriving from say std::filebuf or std::stringbuf. Now you can intercept outgoing data by overriding overflow and sync. Here[^] is an example provided by MS that might be useful.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Writing my own stream class Pin
Patje20-Jun-03 3:50
Patje20-Jun-03 3:50 
Generalvector troubles Pin
aguest19-May-03 4:30
aguest19-May-03 4:30 
GeneralRe: vector troubles Pin
Joaquín M López Muñoz19-May-03 6:42
Joaquín M López Muñoz19-May-03 6:42 
GeneralInsert icons into ListView Pin
User 1605519-May-03 4:05
User 1605519-May-03 4:05 
QuestionHow Can Get current dll 's directory path Pin
Boyren18-May-03 1:29
Boyren18-May-03 1:29 
AnswerRe: How Can Get current dll 's directory path Pin
Tim Smith18-May-03 1:50
Tim Smith18-May-03 1:50 
GeneralRe: How Can Get current dll 's directory path Pin
Boyren18-May-03 3:45
Boyren18-May-03 3:45 
AnswerRe: How Can Get current dll 's directory path Pin
Michael Dunn18-May-03 8:49
sitebuilderMichael Dunn18-May-03 8:49 
QuestionHow Can use CFileDialog in WTL Frameworks? Pin
Boyren18-May-03 1:22
Boyren18-May-03 1:22 
AnswerRe: How Can use CFileDialog in WTL Frameworks? Pin
Boyren18-May-03 1:40
Boyren18-May-03 1:40 
GeneralCstring/Atlstr.h Pin
DuFF17-May-03 1:36
DuFF17-May-03 1:36 
GeneralRe: Cstring/Atlstr.h Pin
Tim Smith17-May-03 4:07
Tim Smith17-May-03 4:07 
GeneralRe: Cstring/Atlstr.h Pin
Michael Dunn17-May-03 7:52
sitebuilderMichael Dunn17-May-03 7:52 
GeneralRe: Cstring/Atlstr.h Pin
DuFF17-May-03 8:57
DuFF17-May-03 8:57 
GeneralRe: Cstring/Atlstr.h Pin
Michael Dunn17-May-03 13:38
sitebuilderMichael Dunn17-May-03 13:38 
GeneralATL DLL Newbie Question Pin
James Spibey16-May-03 10:07
James Spibey16-May-03 10:07 
GeneralRe: ATL DLL Newbie Question Pin
Charles Spirz16-May-03 11:14
Charles Spirz16-May-03 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.