Search found 4 matches

by z64555
Mon Nov 19, 2012 5:51 pm
Forum: The Code Dump
Topic: (Another) method to extract strings from wxDataInputStream's
Replies: 1
Views: 3481

Re: (Another) method to extract strings from wxDataInputStre

With the help of this article , I figured out how the iniatialization list really works as well as better understand how classes are constructed. The net result is a better version of my previous snippet, this time with a lot less copy pasta from wxWidget's source code: Header file: #ifndef _WX_DATS...
by z64555
Sun Oct 28, 2012 4:33 pm
Forum: The Code Dump
Topic: (Another) method to extract strings from wxDataInputStream's
Replies: 1
Views: 3481

(Another) method to extract strings from wxDataInputStream's

Just a quick, rather unimaginative function that allows one to extract a string of specified length from a wxDataInputStream: wxString wxDataInputStream::ReadString( const wxUint32 len ) { wxString ret; if ( len > 0 ) { #if wxUSE_UNICODE wxCharBuffer tmp(len + 1); if ( tmp ) { m_input->Read(tmp.data...
by z64555
Fri Oct 26, 2012 12:34 pm
Forum: C++ Development
Topic: Reading mixed wxData and wxText from files
Replies: 2
Views: 1062

Re: Reading mixed wxData and wxText from files

Thanks, I figured it out this morning. #-o I first tried to make a wxString and pass that as an argument to wxDataInputStream::Read8() like so: wxDataInputStream in_data( in_file ); // in_file is a wxFileInputStream wxString string_buffer; in_data.Read8( string_buffer, 4 ); // Read the first 4 bytes...
by z64555
Fri Oct 26, 2012 1:19 am
Forum: C++ Development
Topic: Reading mixed wxData and wxText from files
Replies: 2
Views: 1062

Reading mixed wxData and wxText from files

Hi all, I recently dove into wxWidgets 2.9.4 for a file extraction project. I need to create a new file extractor, since the old one is outdated and in VB6 code. I've so far managed to flesh out some of the file search and access code, but I'm having trouble with the data streams. The file type in q...