资源简介
VC6.0做的仿按键精灵找图找色功能 。生成的findpicture.dll可以被调用来找图片。
代码片段和文件信息
// FindPicture.cpp : Defines the initialization routines for the DLL.
//
#include “stdafx.h“
#include “FindPicture.h“
#include
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs any functions exported from this DLL which
// call into MFC must have the AFX_MANAGE_STATE macro
// added at the very beginning of the function.
//
// For example:
//
// extern “C“ BOOL PASCAL EXPORT ExportedFunction()
// {
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
// // normal function body here
// }
//
// It is very important that this macro appear in each
// function prior to any calls into MFC. This means that
// it must appear as the first statement within the
// function even before any object variable declarations
// as their constructors may generate calls into the MFC
// DLL.
//
// Please see MFC Technical Notes 33 and 58 for additional
// details.
//
/////////////////////////////////////////////////////////////////////////////
// CFindPictureApp
BEGIN_MESSAGE_MAP(CFindPictureApp CWinApp)
//{{AFX_MSG_MAP(CFindPictureApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFindPictureApp construction
CFindPictureApp::CFindPictureApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CFindPictureApp object
CFindPictureApp theApp;
CPoint FindPicture(int x0int y0int x1int y1int EndurationValueCString Bmpfilename)
{ //************************************************************************
CDC SourceCDC;
HBITMAP SourcehBtmp;
BITMAP Sourcebm;
CBitmap SourceCbtmp;
SourcehBtmp = (HBITMAP)::LoadImage(NULLBmpfilenameIMAGE_BITMAP00LR_LOADFROMFILE);
SourceCbtmp.Deleteobject();
SourceCbtmp.Attach( SourcehBtmp);//HBITMAP->Cbitmap
SourceCbtmp.GetBitmap(&Sourcebm);//c bitmap->BITMAP
CDC *pDCDilog ;
HDC pDCDiloghdc;
pDCDiloghdc=GetDC(NULL);//对话框DC///////////////
pDCDilog=::CDC::FromHandle(pDCDiloghdc);
SourceCDC.CreateCompatibleDC(pDCDilog); //这建立的就是与桌面窗口兼容的DC。
SourceCDC.Selectobject(&SourceCbtmp);//medc赋值
//************************************************************************Get LocalMap Info
HDC hDCscreen = ::GetDC(HWND_DESKTOP); //屏幕DC
HDC hTmpDC = CreateCompatibleDC(hDCscreen);
int ScreenWidth=0;
int ScreenHeight=0;
ScreenWidth=::GetSystemMetrics(SM_CXSCREEN);
ScreenHeight=::GetSystemMetrics(SM_CYSCREEN);
CString HAndW;
HAndW.Format(“屏幕分辨率是 %d%d“ScreenWidthScreenHeight);
//::MessageBox(NULLHAnd
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-09-08 12:18 FindPicture\
文件 4270 2012-03-10 01:51 FindPicture\1.bmp
文件 17976 2014-09-08 12:07 FindPicture\FindPicture.aps
文件 352 2012-04-11 11:19 FindPicture\FindPicture.clw
文件 8984 2012-05-12 10:20 FindPicture\FindPicture.cpp
文件 213 2012-04-11 13:39 FindPicture\FindPicture.def
文件 4231 2012-04-11 11:19 FindPicture\FindPicture.dsp
文件 547 2012-04-11 11:19 FindPicture\FindPicture.dsw
文件 1308 2012-04-11 11:19 FindPicture\FindPicture.h
文件 58368 2014-09-08 12:18 FindPicture\FindPicture.ncb
文件 186880 2014-09-08 12:18 FindPicture\FindPicture.opt
文件 258 2014-09-08 12:14 FindPicture\FindPicture.plg
文件 3095 2012-04-11 11:19 FindPicture\FindPicture.rc
文件 2629 2012-04-11 11:19 FindPicture\ReadMe.txt
目录 0 2014-09-06 10:31 FindPicture\res\
文件 383 2012-04-11 11:19 FindPicture\Resource.h
文件 403 2012-04-11 11:19 FindPicture\res\FindPicture.rc2
文件 213 2012-04-11 11:19 FindPicture\StdAfx.cpp
文件 1447 2012-04-11 11:19 FindPicture\StdAfx.h
- 上一篇:Win32——创建美观的按钮控件
- 下一篇:C++实现最小二乘法一元回归和多项式拟合
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- MFC数字钟(基于VC6.0)
- 安科瑞智能电能表MODBUS通讯程序 VC6
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC6LineNumberAddin.dll
- 用VC6.0实现多边形扫描线填充算法
- VC++实现CMD命令执行与获得返回信息
- VC助手 VC6.0助手
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- VC6 USB开发源码
- VC操作SQLSERVER数据库
- aes加解密(vc源程序)
- vc_串口通讯
- 吕鑫vc6c++数据结构视频源码
- 派克变换VC++源码(附文档)
- 基于opencv漫水填充算法综合
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- MFC的异步网络通讯应用程序
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- VC编程助手2010破解版(原名VA_X_10.6.
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
评论
共有 条评论