当前位置: 首页>>代码示例>>C++>>正文


C++ CImage::EnumImageOperation方法代码示例

本文整理汇总了C++中CImage::EnumImageOperation方法的典型用法代码示例。如果您正苦于以下问题:C++ CImage::EnumImageOperation方法的具体用法?C++ CImage::EnumImageOperation怎么用?C++ CImage::EnumImageOperation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CImage的用法示例。


在下文中一共展示了CImage::EnumImageOperation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: EnableMenu

/*
	EnableMenu()
*/
void CWallBrowserStretchView::EnableMenu(void)
{
	CWnd* pWnd = AfxGetMainWnd();

	CImage* pImage = GetDocument()->GetImage();

	LPIMAGEOPERATION pImageOperation;
	while((pImageOperation = pImage->EnumImageOperation())!=(LPIMAGEOPERATION)NULL)
	{
		if(strcmp(pImageOperation->name,"MirrorHorizontal")==0)
			pWnd->SendMessage(WM_IMAGE_MIRROR_H,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"MirrorVertical")==0)
			pWnd->SendMessage(WM_IMAGE_MIRROR_V,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Rotate90Left")==0)
			pWnd->SendMessage(WM_IMAGE_ROTATE_90_LEFT,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Rotate90Right")==0)
			pWnd->SendMessage(WM_IMAGE_ROTATE_90_RIGHT,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Rotate180")==0)
			pWnd->SendMessage(WM_IMAGE_ROTATE_180,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Deskew")==0)
			pWnd->SendMessage(WM_IMAGE_DESKEW,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Size")==0)
			pWnd->SendMessage(WM_IMAGE_SIZE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Posterize")==0)
			pWnd->SendMessage(WM_IMAGE_POSTERIZE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Mosaic")==0)
			pWnd->SendMessage(WM_IMAGE_MOSAIC,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Blur")==0)
			pWnd->SendMessage(WM_IMAGE_BLUR,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Median")==0)
			pWnd->SendMessage(WM_IMAGE_MEDIAN,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Sharpen")==0)
			pWnd->SendMessage(WM_IMAGE_SHARPEN,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Despeckle")==0)
			pWnd->SendMessage(WM_IMAGE_DESPECKLE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Noise")==0) 
			pWnd->SendMessage(WM_IMAGE_NOISE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Emboss")==0)
			pWnd->SendMessage(WM_IMAGE_EMBOSS,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"EdgeEnhance")==0)
			pWnd->SendMessage(WM_IMAGE_EDGEENHANCE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"FindEdge")==0)
			pWnd->SendMessage(WM_IMAGE_FINDEDGE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Erosion")==0)
			pWnd->SendMessage(WM_IMAGE_EROSION,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Dilate")==0)
			pWnd->SendMessage(WM_IMAGE_DILATE,pImageOperation->flag,0L);

		else if(strcmp(pImageOperation->name,"Halftone")==0)
			pWnd->SendMessage(WM_COLOR_HALFTONE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Grayscale")==0)
			pWnd->SendMessage(WM_COLOR_GRAYSCALE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Invert")==0)
			pWnd->SendMessage(WM_COLOR_INVERT,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Brightness")==0)
			pWnd->SendMessage(WM_COLOR_BRIGHTNESS,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Contrast")==0)
			pWnd->SendMessage(WM_COLOR_CONTRAST,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"HistoContrast")==0) 
			pWnd->SendMessage(WM_COLOR_HISTOGRAM_CONTRAST,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Hue")==0)
			pWnd->SendMessage(WM_COLOR_HUE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"SaturationHorizontal")==0)
			pWnd->SendMessage(WM_COLOR_SATURATION_H,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"SaturationVertical")==0)
			pWnd->SendMessage(WM_COLOR_SATURATION_V,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Equalize")==0)
			pWnd->SendMessage(WM_COLOR_EQUALIZE,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"Intensity")==0)
			pWnd->SendMessage(WM_COLOR_INTENSITY,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"IntensityDetect")==0)
			pWnd->SendMessage(WM_COLOR_INTENSITY_DETECT,pImageOperation->flag,0L);
		else if(strcmp(pImageOperation->name,"GammaCorrection")==0)
			pWnd->SendMessage(WM_COLOR_GAMMA_CORRECTION,pImageOperation->flag,0L);
	}
}
开发者ID:code4bones,项目名称:crawlpaper,代码行数:79,代码来源:WallBrowserStretchView.cpp


注:本文中的CImage::EnumImageOperation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。