cximage第一讲demo.cpp
使用流程可参考:
https://blog.csdn.net/wxc237786026/article/details/41171079
BOOL CDemoApp::InitInstance() { // 多文档描述 int m_nDocCount; //number of documents CMultiDocTemplate *demoTemplate; CMultiDocTemplate* pDocTemplate; pDocTemplate = new CMultiDocTemplate( IDR_DEMOTYPE, RUNTIME_CLASS(CDemoDoc), RUNTIME_CLASS(CChildFrame), // custom MDI child frame RUNTIME_CLASS(CDemoView)); demoTemplate = pDocTemplate; AddDocTemplate(pDocTemplate); CxImage *ima = new CxImage; ima->InitTextInfo( &m_text ); delete ima; // m_optJpegQuality,m_optJpegOptions BCMenu::SetMenuDrawMode(GetProfileInt(_T("General"),_T("MenuStyle"),1)); FiltersParams m_Filters; RGBQUAD m_FloodColor; BYTE m_FloodTolerance; BYTE m_FloodOpacity; BYTE m_FloodSelect; }
解析 demo.cpp
CMAX_IMAGE_FORMATS 这个表示可以支持图像格式多少种
// 当前图像格式
DocType doctypes[CMAX_IMAGE_FORMATS]
struct DocType
{
public:
int nID;
BOOL bRead; // 系统支持读取图像
BOOL bWrite; // 系统支持写入图像
const TCHAR* description;
const TCHAR* ext;
};