SOL9 2.0 Class: MemoryDC

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * MemoryDC.h 
 * Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL++2000
// 2000.06.15 Added new constructors.
#pragma once

#include <sol\DC.h>


namespace SOL {

class MemoryDC :public DC {
  public:
    //<added date="2000.06.15">
    MemoryDC()
        :DC(){
    }

    MemoryDC(DC& dc)
        :DC(CreateCompatibleDC(dc.get()) ) {
        // 
    }
    //</added>

    MemoryDC(HDC hdc) 
        :DC(CreateCompatibleDC(hdc)) {
        //
    }

    ~MemoryDC() {
        if (get()) {
            DeleteDC(get());
            set(NULL);
        }
    }
};

}


Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.