Click here to Skip to main content
13,006,319 members (59,722 online)
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads


23 bookmarked
Posted 22 Nov 1999

A Win32 class support OpenGL printing

, 22 Nov 1999
// GLMemDC.h: interface for the CGLMemDC class.

#if !defined(AFX_GLMEMDC_H__C73818C2_5732_11D3_955D_8422F5C00000__INCLUDED_)
#define AFX_GLMEMDC_H__C73818C2_5732_11D3_955D_8422F5C00000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CGLMemoryDC  
	virtual ~CGLMemoryDC();

//data of DIB
    HBITMAP      m_hBitmap;       //handle of bitmap
	BITMAPINFO   m_DIBInfo;       //infomation about the DIB
    BYTE*        m_hImage;        //DIB color data
	DWORD        m_dwDataSize;    //DIB data size 

    int          GetColorNumber(int nBitCount);

	void         ClearMemory(void);
	BOOL         SetMemorySize(int width, int height);
	void         GetMemorySize(int* width, int* height);
	void         CopyDataFromDC(CDC* pDC, CRect& rect);
	void         CopyDataToDC(CDC* pDC, CRect& rect);
	void         WriteDataToDC(CDC* pDC, int startx, int starty);
	void         WriteDataToDIBfile(CFile* DIBFile);

#endif // !defined(AFX_GLMEMDC_H__C73818C2_5732_11D3_955D_8422F5C00000__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Zhaohui Xing
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170628.1 | Last Updated 23 Nov 1999
Article Copyright 1999 by Zhaohui Xing
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid