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

📄 icegdiapp.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 *	Contains an ICE GDI application skeleton.
 *	\file		IceGDIApp.h
 *	\author		Pierre Terdiman
 *	\date		June, 28, 2002
 */
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Guard
#ifndef __ICEGDIAPP_H__
#define __ICEGDIAPP_H__

	struct ICECORE_API ICEGDIAPPCREATE : ICEAPPCREATE
	{
		udword			BitPlanes;
		udword			x,y;
		const char*		Name;
	};

	class ICECORE_API GDIApplication : public IceApp
	{
		public:
		// Constructor/Destructor
										GDIApplication();
		virtual							~GDIApplication();

		override(IceApp)	bool		Init(const ICEAPPCREATE* create);
		override(IceApp)	bool		Run(const ICEAPPCREATE* create);
		override(IceApp)	bool		Close();

		inline_				ubyte*		GetLogicScreen()					{ return mLogic;				}
		inline_				void		ClearScreen()						{ ZeroMemory(mLogic, mNbBytes);	}
		inline_				void		CopyBufferToPhysic(ubyte* buffer)
										{
											IceCore::SetDIBitsToDevice(mScreenDC, 0, 0, mScreenWidth, mScreenHeight, 0, 0, 0, mScreenHeight, buffer, &mBitmapInfos, DIB_RGB_COLORS);
										}
		inline_				void		CopyLogicToPhysic()					{ CopyBufferToPhysic(mLogic);	}

							bool		InitGDI(const char* name, sdword pos_x, sdword pos_y);
							bool		OpenScreen(sdword width, sdword height, sdword bit_planes, sdword pos_x, sdword pos_y, const char* name);
							void		GetEvent(ICE_EVENT& event);
		private:
							BITMAPINFO	mBitmapInfos;
							HDC			mScreenDC;

							sdword		mScreenWidth;
							sdword		mScreenHeight;
							udword		mBitPlanes;
							udword		mNbBytes;
							ubyte*		mLogic;

							HWND		mWinID;
	};

#endif // __ICEGDIAPP_H__

⌨️ 快捷键说明

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