Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

63 lines
1.7 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: LgMemoryDC.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of LgMemoryDC.h
//----------------------------------------------------------------------------
#ifndef __LG__MEMORY__DC__H__INCLUDED__
#define __LG__MEMORY__DC__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "..\LgLib\LgImageDIB.h"
class CLgMemoryDC
{
public:
CLgMemoryDC();
virtual ~CLgMemoryDC();
public:
BOOL Create( int cx, int cy, COLORREF color = RGB(0,0,0) );
BOOL Create( HBITMAP hBitmap, BOOL bCopy = TRUE );
BOOL DeleteDC();
public:
BOOL Ellipse( int nLeftRect, int nTopRect, int nRightRect, int nBottomRect );
BOOL LineTo( int x, int y );
BOOL MoveTo( int x, int y );
int DrawText( LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat );
BOOL FillSolidRect( LPCRECT lpRect, COLORREF clr );
BOOL DrawIcon( int X, int Y, HICON hIcon );
public:
enum { ORIGINAL_BIT_COUNT = -1 };
BOOL SaveDIB( LPCTSTR pFileName, INT nBitCount = ORIGINAL_BIT_COUNT );
BOOL SaveJPEG( LPCTSTR pFileName, INT nQuality = 0x42 );
BOOL GetDIB( CLgImageDIB *pDIB );
HBITMAP CopyImage();
public:
static BOOL SaveDIB( LPBITMAPINFO pBitmapInfo, LPBYTE pByte, LPCTSTR pFileName );
public:
const SIZE& GetSize() const { return m_Size; }
const HDC& GetSafeHdc() const { return m_hDC; }
private:
SIZE m_Size;
HDC m_hDC;
HBITMAP m_hBitmap;
HBITMAP m_hOldBitmap;
};
#endif