资源简介
VC屏幕找图源代码,实现了快速找图,速度和按键精灵不相上下。按键精灵里有个FINDPIC()函数,你指定位图文件,然后在屏幕上查找和这张图片相同的图片,返回找到图形的坐标。实现方法主要是用GetDIBits获取屏幕的位图数据,然后读出要找的bmp图片,再比较它们的位图数据……程序在某些特殊的状态下可能会找不到图,但那出现的几率很小了。(当然,要改进的话也非常容易
注:找图动态链接库FindPic.dll在压缩包的Release目录下
代码片段和文件信息
// CallDll.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “CallDll.h“
#include “CallDllDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCallDllApp
BEGIN_MESSAGE_MAP(CCallDllApp CWinApp)
//{{AFX_MSG_MAP(CCallDllApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCallDllApp construction
CCallDllApp::CCallDllApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CCallDllApp object
CCallDllApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CCallDllApp initialization
BOOL CCallDllApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CCallDllDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 822 2010-05-28 23:00 Release\a.bmp
文件 20480 2010-06-09 22:28 Release\CallDll.exe
文件 5632 2010-06-09 22:24 Release\FindPic.dll
文件 1078 2010-06-08 20:12 res\CallDll.ico
文件 399 2010-06-08 20:12 res\CallDll.rc2
文件 35620 2010-06-09 22:28 CallDll.aps
文件 1062 2010-06-09 22:28 CallDll.clw
文件 2077 2010-06-08 20:12 CallDll.cpp
文件 4177 2010-06-08 20:12 CallDll.dsp
文件 522 2010-06-08 20:14 CallDll.dsw
文件 1335 2010-06-08 20:12 CallDll.h
文件 58368 2010-06-09 22:28 CallDll.ncb
文件 48640 2010-06-09 22:28 CallDll.opt
文件 702 2010-06-09 22:28 CallDll.plg
文件 5303 2010-06-09 22:28 CallDll.rc
文件 4832 2010-06-09 22:26 CallDllDlg.cpp
文件 1373 2010-06-09 21:36 CallDllDlg.h
文件 24576 2010-06-08 21:54 mydll.dll
文件 3597 2010-06-08 20:12 ReadMe.txt
文件 536 2010-06-08 20:12 Resource.h
文件 209 2010-06-08 20:12 StdAfx.cpp
文件 1054 2010-06-08 20:12 StdAfx.h
目录 0 2010-06-09 22:29 Debug
目录 0 2010-06-09 22:30 Release
目录 0 2010-06-08 20:12 res
----------- --------- ---------- ----- ----
222394 25
评论
共有 条评论