Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resize Dialog Box via Code :: MFC Pin
monrobot1325-Oct-02 9:29
monrobot1325-Oct-02 9:29 
GeneralRe: Resize Dialog Box via Code :: MFC Pin
valikac25-Oct-02 9:32
valikac25-Oct-02 9:32 
Generalspeed: loading bitmap Pin
Anonymous25-Oct-02 8:21
Anonymous25-Oct-02 8:21 
GeneralRe: speed: loading bitmap Pin
devvvy25-Oct-02 8:23
devvvy25-Oct-02 8:23 
GeneralRe: speed: loading bitmap Pin
Paul M Watt25-Oct-02 8:44
mentorPaul M Watt25-Oct-02 8:44 
GeneralRe: speed: loading bitmap Pin
Anonymous25-Oct-02 12:55
Anonymous25-Oct-02 12:55 
GeneralRe: speed: loading bitmap Pin
Paul M Watt25-Oct-02 21:19
mentorPaul M Watt25-Oct-02 21:19 
GeneralTemplate confusion Pin
Todd Smith25-Oct-02 8:09
Todd Smith25-Oct-02 8:09 
Browsing through the zlib code I'm confused by the template code shown below. How or when would you make use of it? Can you give an example?

class ozstream
{
    public:
        ozstream() : m_fp(0), m_os(0) {
        }

// snip...

        ostream& os() {
            if (m_os == 0) m_os = new ostrstream;
            return *m_os;
        }

        void os_flush() {
            if (m_os && m_os->pcount()>0) {
                ostrstream* oss = new ostrstream;
                oss->fill(m_os->fill());
                oss->flags(m_os->flags());
                oss->precision(m_os->precision());
                oss->width(m_os->width());
                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
                delete[] m_os->str(); delete m_os; m_os = oss;
            }
        }

};

/*
 * Ascii write with the << operator;
 */
template <class T>
inline ostream& operator<<(ozstream& zs, const T& x) {
    zs.os_flush();
    return zs.os() << x;
}


Todd Smith
GeneralRe: Template confusion Pin
Navin25-Oct-02 10:30
Navin25-Oct-02 10:30 
Generalmapping and unmapping a resource Pin
Tom Wright25-Oct-02 7:36
Tom Wright25-Oct-02 7:36 
Generalflexgrid Pin
Anthony988725-Oct-02 7:05
Anthony988725-Oct-02 7:05 
QuestionDon't show all resource icons in explorer? Pin
Anonymous25-Oct-02 6:00
Anonymous25-Oct-02 6:00 
AnswerRe: Don't show all resource icons in explorer? Pin
Anonymous25-Oct-02 22:08
Anonymous25-Oct-02 22:08 
Generalhtmlhelp question Pin
ns25-Oct-02 5:59
ns25-Oct-02 5:59 
GeneralRe: htmlhelp question Pin
Ravi Bhavnani25-Oct-02 7:02
professionalRavi Bhavnani25-Oct-02 7:02 
GeneralRe: htmlhelp question Pin
Atlantys25-Oct-02 7:06
Atlantys25-Oct-02 7:06 
GeneralRe: htmlhelp question Pin
Ravi Bhavnani25-Oct-02 7:13
professionalRavi Bhavnani25-Oct-02 7:13 
GeneralRe: htmlhelp question Pin
Atlantys25-Oct-02 8:20
Atlantys25-Oct-02 8:20 
GeneralRe: htmlhelp question Pin
Ravi Bhavnani25-Oct-02 9:32
professionalRavi Bhavnani25-Oct-02 9:32 
GeneralBad topic id? Pin
Ravi Bhavnani25-Oct-02 7:05
professionalRavi Bhavnani25-Oct-02 7:05 
GeneralRe: Bad topic id? Pin
ns25-Oct-02 7:26
ns25-Oct-02 7:26 
GeneralRe: Bad topic id? Pin
Ravi Bhavnani25-Oct-02 9:33
professionalRavi Bhavnani25-Oct-02 9:33 
GeneralWindow resizing using mouse Pin
Zakarya Shah25-Oct-02 5:58
sussZakarya Shah25-Oct-02 5:58 
GeneralRe: Window resizing using mouse Pin
Maximilien25-Oct-02 6:09
Maximilien25-Oct-02 6:09 
GeneralRe: Window resizing using mouse Pin
Paul M Watt25-Oct-02 8:09
mentorPaul M Watt25-Oct-02 8:09 

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.