DirectDraw.h
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // DDraw.h: interface for the CDirectDraw class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DDRAW_H__32A5477E_B6C0_4D99_ACBE_887BF9247475__INCLUDED_)
- #define AFX_DDRAW_H__32A5477E_B6C0_4D99_ACBE_887BF9247475__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <ddraw.h>
- #include "c_color_space.h"
- class CDirectDraw
- {
- public:
- CDirectDraw();
- virtual ~CDirectDraw();
- //是否初始化
- BOOL IsInitDDraw(void){ return this->lpDDSPrimary != NULL; }
- //初始化函数
- BOOL InitDirectDraw(HWND hwnd,int width,int height,int depth);
- //释放资源
- void ReleaseDirectDraw(void);
- //画图
- BOOL DrawDirectDraw(void *buffer,BOOL m_bCaption , int time );
- //取宽度
- int GetWidth(void) {return bitmap_width;}
- //取高度
- int GetHeight(void){return bitmap_height;}
- //取深度
- int GetDepth(void) {return bitmap_depth;}
- protected:
- void * ConvertImageToDDraw(void *buffer);
- //把图像拷贝到DirectX表面
- void CopyToDDraw(void* destination_buffer,void* source_buffer);
- private:
- //窗口句柄
- HWND m_hWnd;
- //窗口标题
- CString wndText;
- //DirectX
- DDSURFACEDESC2 ddsd;
- LPDIRECTDRAW7 lpDD;
- LPDIRECTDRAWSURFACE7 lpDDSPrimary;
- LPDIRECTDRAWSURFACE7 lpDDSOffscreen;
- LPDIRECTDRAWCLIPPER lpClipper;
- //图像大小
- int bitmap_width;
- int bitmap_height;
- int bitmap_depth;
- int bitmap_size;
- //屏幕尺寸
- int screen_width;
- int screen_height;
- int screen_depth;
- //DirectX缓冲区
- void * ddraw_buffer;
- };
- #endif // !defined(AFX_DDRAW_H__32A5477E_B6C0_4D99_ACBE_887BF9247475__INCLUDED_)