zgraphsection.h
来自「Symbian手机智能操作系统下的源码,图像查看软件,支持十几种图形格式.」· C头文件 代码 · 共 42 行
H
42 行
#ifndef ZGRAPHSECTION_H_HEADER_INCLUDED_C0051BFE
#define ZGRAPHSECTION_H_HEADER_INCLUDED_C0051BFE
#include "zGraphDDB.h"
#include "zGraphDib.h"
/* 使用方法:create
HDC sdc = ::GetDC(NULL);
zGraphDib::zGraphDibInfo bmi;
int colordepth = GetDeviceCaps(sdc,BITSPIXEL);
bmi.SetFormat(width,height,colordepth,BI_RGB);
section.CreateDIBSection(NULL,bmi.GetBMI(),DIB_RGB_COLORS,NULL,NULL);
tbm=section.m_hBitmap;
if (tbm==NULL)
{
graph_config->err_log.log("建立兼容位图失败\n");
::OutputDebugString("建立兼容位图失败\n");
}
otbm = (HBITMAP)::SelectObject(tdc, tbm);
::ReleaseDC(NULL, sdc);
draw:
::BitBlt(tdc, x, y, rect->right - rect->left, rect->bottom - rect->top,
graph_dc, rect->left - x, rect->top - y, SRCCOPY);
*/
class zGraphSection : public zGraphDDB, public zGraphDib
{
public:
zGraphSection();
virtual ~zGraphSection();
bool CreateDIBSection(HDC hDC, const BITMAPINFO *pBMI, UINT iUsage, HANDLE hSection, DWORD dwOffset);
UINT GetColorTable();
UINT SetColorTable();
};
#endif /* ZGRAPHSECTION_H_HEADER_INCLUDED_C0051BFE */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?