DirectDraw.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:2k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1998-1999 DXGuide. All Rights Reserved.
- // File: DirectDraw.h
- #ifndef _DIRECTDRAW__H
- #define _DIRECTDRAW__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include <ddraw.h>
- #include <afxtempl.h>
- #include "DDDevice.h"
- class CDDModeInfoObject;
- class CD3DDeviceInfoObject;
- class CDirectDraw
- {
- friend class CDirectXApp;
- public:
- enum DIRECTDRAW_TYPE
- {
- DIRECTDRAW_DD,
- DIRECTDRAW_D3DIM,
- };
- protected:
- CDirectDraw(DIRECTDRAW_TYPE DirectDrawType = DIRECTDRAW_DD);
- ~CDirectDraw();
- protected:
- bool Create(HWND hWnd, DWORD dwDDInitFlags);
- public:
- bool SelectDDDevice(int nMonitorNo, int nDeviceNo);
- bool SelectDDDevice(int nDevicePos);
- bool SelectDDDevice(const LPGUID lpGuid);
- public:
- int GetDDDeviceNumber(void) const;
- int GetMointorNumber(void) const;
- public:
- HRESULT Flip(void);
- HRESULT TestCooperativeLevel(void);
- protected:
- static BOOL WINAPI DDEnumCallbackEx(
- GUID FAR* lpGUID, LPSTR lpDriverDescription,
- LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm);
- static BOOL WINAPI DDEnumCallback(
- GUID FAR* lpGUID, LPSTR lpDriverDescription,
- LPSTR lpDriverName, LPVOID lpContext);
- protected:
- CTypedPtrArray<CObArray, CDDDevice*> m_ddDeviceInfoArray;
- int m_nCurrDevice;
- protected:
- bool LoadDDDeviceInfoArray(void);
- protected:
- int m_nMonitors;
- protected:
- static const CString m_strDisplayDriverName;
- public:
- int GetEnableDeviceNum(void) const;
- CDDDevice* GetFirstEnableDevice(void);
- CDDDevice* GetNextEnableDevice(void);
- protected:
- DIRECTDRAW_TYPE m_DirectDrawType;
- };
- #include "DirectDraw.inl"
- #endif // _DIRECTDRAW__H