/*
* ClientDC.h
* Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL++2000
// 2000.02.18
#pragma once
//#include <sol\View.h>
#include <sol\Window.h>
#include <sol\DC.h>
namespace SOL {
class ClientDC :public DC {
private:
HWND hwnd;
public:
ClientDC(Window* view)
:hwnd(NULL)
{
if(view) {
hwnd = view -> getWindow();
set(::GetDC(hwnd));
}
}
public:
ClientDC(Window* view, HRGN clipRgn, DWORD flags)
:hwnd(NULL)
{
if(view) {
hwnd = view -> getWindow();
set(::GetDCEx(hwnd, clipRgn, flags));
}
}
public:
~ClientDC() {
::ReleaseDC(hwnd, get());
}
};
}
|