⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cegraphics.h

📁 This software which draw graph on the windows ce.
💻 H
字号:
/* ---------------------------------------------------------------------------------------------------
 *  
 *                          Windows CE Graphics Libary v1.00.0000
 *  
 *        
 *    Written by James.
 *    Bug report : jiet@msn.com
 *                                                             Copyright 2001
 */
// File: CEGraphics.h
// Base class for Graphics Library.
//-----------------------------------------------------------------------------------------------------
//										Update Information.
//-----------------------------------------------------------------------------------------------------

/*
 * Created by James D. 2001 NormaTek Inc.
 * Date: 01/11/2001
 */

#ifndef _CEGRAPHICS_  // To Rrevent cycle including.
#define _CEGRAPHICS_

#include "CEGDefine.h"

class CEGL_API CCEGraphics
{

public:
	CCEGraphics();
	~CCEGraphics();

public:
	/*
	 * Create the CEGraphics Object, And Open the Display for use.
	 */
	HRESULT Create( HWND hWnd ); 

	/*
	 * Release the CEGraphics Object.
	 */ 
	HRESULT Release( void );

	/*
	 * Prepares the display for writing
	 * Lock the video memory and return the buffer pointer to the variary m_pVB.
	 */
	HRESULT BeginDraw( void );

	/*
	 * Finished drawing.
     */
	HRESULT EndDraw( void );

    /*
	 * Take the Page Flip
	 */
	HRESULT	Flip( void );

	/*
	 * Suspend and Resume the operations.
	 */
	HRESULT Suspend( void );
	HRESULT Resume ( void );

    /*
	 * Return the buffer pointer...
	 */
	unsigned char* GetBuffer( VOID ) { return m_pVB; }

	/*
	 * Return the Display Properties.
	 */
	GXDisplayProperties& GetDisplayProperties ( void ) { return m_gxdp; }

	/*
	 * Return the Key Properties.
	 */
	GXKeyList& GetKeyList ( void ) { return m_gxkl; }

	/*
	 * GetSuspend state
	 */
	BOOL IsSuspend( VOID ) { return m_bSuspend; }

	HWND GetWindowHandle( void ) { return m_hWnd; }

	/*
	 * Get last error code.
	 */
	DWORD GetLastError( VOID ){ return m_dwLastError; }

	/*
	 * Do NOT Use Page flip, direct draw screen only!!!
	 * NOTE : Must careful use this function!!!!!!!!!!!
	 */
	HRESULT SetDrawMode( DWORD dwMode );

public:
	LONG                 m_cbxPitch;       // X Step
	LONG                 m_cbyPitch;       // Y Step

protected:
	unsigned char *      m_pVB;            // Pointer to the Back Video Buffer
	unsigned char *      m_pDoubleBuffer;  // Pointer to the head position of back buffer
	unsigned char *      m_pDisplayMemory; // Pointer to the display memory
	GXDisplayProperties  m_gxdp;	       // GX struct
	GXKeyList            m_gxkl;	       // GX struct

	LONG                 m_lMemorySize;
	BOOL                 m_bSuspend;       // Suspend ???
	BOOL                 m_bDirectDraw;    // DirectDraw to the video buffer?
	DWORD                m_dwDrawState;    // Drawing ?? 1  else 0

	HWND                 m_hWnd;           // The windows handel

	DWORD                m_dwLastError;    // Last error code

};

#endif // _CEGRAPHICS_ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -