给大家赠送一个我最近写的鼠标连点器的源代码!
欢迎大家关注我的微信号
源代码下载地址
https://download.csdn.net/download/blackangelboy/10801071
程序界面如下图:
贴出部分核心源代码大家参照一下,这个小软件我开发了三天 ^_^ 历时15个小时开发完毕 ^_^ 大家喜欢就拿去参考参考,代码不妥之处请别见怪,部分源代码从网上搜集整合。因为是仓促开发,所以采用了暴力编程方式!超暴力编程呵呵^_^
LdianQIDlg.cpp源文件
// LdianQIDlg.cpp : implementation file
//
#include "stdafx.h"
#include "LdianQI.h"
#include "LdianQIDlg.h"
#include "DlgProxy.h"
#include "String.h"
#include
//调用生成桌面快捷方式需要的头文件函数
#include
#include
#pragma comment(lib, "shell32.lib")
//调用WAV声音需要的头文件函数
#include "Mmsystem.h"
#pragma comment(lib,"winmm.lib")
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern char StrKey;
extern char StrKeyStop;
extern CString Tmp;
extern CString TmpStop;
extern CString MouseOK;
extern CString MouseOKCombo;
extern CString MouseOKComboOK;
extern CString TimeGoodOK;
extern CString tempexe;
extern int NumTime;
extern CString URLFile;
extern int L_miao;
extern CString MouseCkool;
/////////////////////////////////////////////////////////////////////////////
// CLdianQIDlg dialog
IMPLEMENT_DYNAMIC(CLdianQIDlg, CDialog);
CLdianQIDlg::CLdianQIDlg(CWnd* pParent /*=NULL*/)
: CDialog(CLdianQIDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CLdianQIDlg)
m_TXT = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_pAutoProxy = NULL;
}
CLdianQIDlg::~CLdianQIDlg()
{
// If there is an automation proxy for this dialog, set
// its back pointer to this dialog to NULL, so it knows
// the dialog has been deleted.
if (m_pAutoProxy != NULL)
m_pAutoProxy->m_pDialog = NULL;
}
void CLdianQIDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLdianQIDlg)
DDX_Control(pDX, IDC_EDITTIMENUM, m_Tims);
DDX_Control(pDX, IDC_EDITTIMENUMTXT, m_TimeX);
DDX_Control(pDX, IDOK2, m_menuB);
DDX_Control(pDX, IDOK, m_menuA);
DDX_Control(pDX, IDC_SLIDER1, m_Slider);
DDX_Text(pDX, IDC_STATICX1, m_TXT);
DDX_Control(pDX, IDC_EXPLORER1, m_URLplay);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLdianQIDlg, CDialog)
//{{AFX_MSG_MAP(CLdianQIDlg)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_CLOSE()
ON_WM_TIMER()
ON_WM_NCHITTEST()
ON_WM_HSCROLL()
ON_NOTIFY(NM_CUSTOMDRAW, IDC_SLIDER1, OnCustomdrawSlider1)
ON_WM_CTLCOLOR()
ON_BN_CLICKED(IDOK2, OnOk2)
ON_CBN_EDITUPDATE(IDC_COMBO1, OnEditupdateCombo1)
ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
ON_CBN_EDITUPDATE(IDC_COMBO3, OnEditupdateCombo3)
ON_CBN_SELCHANGE(IDC_COMBO3, OnSelchangeCombo3)
ON_CBN_EDITUPDATE(IDC_COMBO2, OnEditupdateCombo2)
ON_CBN_SELCHANGE(IDC_COMBO2, OnSelchangeCombo2)
ON_CBN_EDITUPDATE(IDC_COMBO4, OnEditupdateCombo4)
ON_CBN_SELCHANGE(IDC_COMBO4, OnSelchangeCombo4)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
ON_BN_CLICKED(IDC_BUTTON2, OnButtonQZ)
ON_BN_CLICKED(IDC_BUTTON3, OnButtonQZNO)
ON_BN_CLICKED(IDC_BUTTON4, OnButtonMINI)
ON_BN_CLICKED(IDC_BUTTON5, OnButtonJM)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLdianQIDlg message handlers
DWORD __stdcall ThreadProcKey(LPVOID lpParameter)
{
CLdianQIDlg* Key = (CLdianQIDlg*)lpParameter;
while(1)
{
Sleep(50);
Key->GetDlgItem(IDC_COMBO1)->GetWindowText(Tmp);
CString TmpX;
Key->GetDlgItem(IDC_COMBO2)->GetWindowText(TmpX);
if(Tmp!="")
{
Key->RegKeyCe();//执行热键0-9 A-Z检测
if(TmpX=="CTRL" || TmpX=="ctrl" )
{
RegisterHotKey(NULL,0x00000003,MOD_CONTROL,StrKey);
//AfxMessageBox("热键为CTRL");
}
if(TmpX=="ALT" || TmpX=="alt" )
{
RegisterHotKey(NULL,0x00000003,MOD_ALT,StrKey);
//AfxMessageBox("热键为ALT");
}
if(TmpX=="SHIFT" || TmpX=="shift")
{
RegisterHotKey(NULL,0x00000003,MOD_SHIFT,StrKey);
//AfxMessageBox("热键为SHIFT");
}
//RegisterHotKey(NULL,0x00090003,MOD_CONTROL,TEXT(StrKey));
//注册热键 MOD_ALT ;MOD_CONTROL ;MOD_SHIFT ;MOD_WIN
//RegisterHotKey(GetSafeHwnd(), HOTKEYID, MOD_CONTROL, TEXT('L'))
MSG msg;
while(GetMessage(&msg,NULL,0,0))//从消息队伍获取消息
{
if(msg.message==WM_HOTKEY)//热键消息
{
//AfxMessageBox("热键"+TmpX+" + "+Tmp+"已设置成功!开启执行");
MouseOK="开始鼠标点击";
MouseCkool="连续点击鼠标左键";
goto lbit;
}
}
lbit:
;
UnregisterHotKey(NULL,0x00000003);//卸载掉注册的热键
}
}
return 0;
}
DWORD __stdcall ThreadProcKeyStop(LPVOID lpParameter)
{
CLdianQIDlg* KeyStop = (CLdianQIDlg*)lpParameter;
while(1)
{
Sleep(50);
KeyStop->GetDlgItem(IDC_COMBO3)->GetWindowText(TmpStop);
CString TmpXStop;
KeyStop->GetDlgItem(IDC_COMBO4)->GetWindowText(TmpXStop);
if(Tmp!="")
{
KeyStop->RegKeyCeStop();//执行热键0-9 A-Z检测
if(TmpXStop=="CTRL" || TmpXStop=="ctrl" )
{
RegisterHotKey(NULL,0x00000003,MOD_CONTROL,StrKeyStop);
//AfxMessageBox("热键为CTRL");
}
if(TmpXStop=="ALT" || TmpXStop=="alt" )
{
RegisterHotKey(NULL,0x00000003,MOD_ALT,StrKeyStop);
//AfxMessageBox("热键为ALT");
}
if(TmpXStop=="SHIFT" || TmpXStop=="shift")
{
RegisterHotKey(NULL,0x00000003,MOD_SHIFT,StrKeyStop);
//AfxMessageBox("热键为SHIFT");
}
//RegisterHotKey(NULL,0x00090003,MOD_CONTROL,TEXT(StrKey));
//注册热键 MOD_ALT ;MOD_CONTROL ;MOD_SHIFT ;MOD_WIN
//RegisterHotKey(GetSafeHwnd(), HOTKEYID, MOD_CONTROL, TEXT('L'))
MSG msg;
while(GetMessage(&msg,NULL,0,0))//从消息队伍获取消息
{
if(msg.message==WM_HOTKEY)//热键消息
{
KeyStop->KeyOkStop();
//AfxMessageBox("热键"+TmpXStop+" + "+TmpStop+"已设置成功!关闭执行");
goto lbitStop;
}
}
lbitStop:
;
UnregisterHotKey(NULL,0x00000004);//卸载掉注册的热键
}
}
return 0;
}
DWORD __stdcall ThreadProcMuseOK(LPVOID lpParameter)
{
CLdianQIDlg* MuseOK = (CLdianQIDlg*)lpParameter;
while(1)
{
if(MouseOK=="开始鼠标点击")
{
MuseOK->KeyOk();
}
if(MouseOKCombo=="启用鼠标快捷键")
{
MuseOK->KeyMouse();
}
else if(MouseOKCombo=="暂停鼠标热键" || MouseOKComboOK=="暂停鼠标热键")
{
Sleep(10);
if(KEY_DOWN(MOUSE_MOVED))
{
//MessageBox("您点击了鼠标左键!触发鼠标自动操作!");
MouseOKComboOK="开启鼠标热键动作";
MouseOKCombo="启用鼠标快捷键";
}
}
}
return 0;
}
DWORD __stdcall ThreadProcTime(LPVOID lpParameter)
{
CLdianQIDlg* TimeDig = (CLdianQIDlg*)lpParameter;
while(1)
{
TimeDig->WindowsNumTime();//执行计时功能函数
}
return 0;
}
//以下代码为生成桌面快捷方式-----------------------------------------------------------------------
BOOL CLdianQIDlg::GetDesktopPath(char *pszDesktopPath)
{
LPITEMIDLIST ppidl = NULL;
if (SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &ppidl) == S_OK)
{
BOOL flag = SHGetPathFromIDList(ppidl, pszDesktopPath);
CoTaskMemFree(ppidl);
return flag;
}
return FALSE;
}
BOOL CLdianQIDlg::GetIEQuickLaunchPath(char *pszIEQueickLaunchPath)
{
LPITEMIDLIST ppidl;
if (SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &ppidl) == S_OK)
{
BOOL flag = SHGetPathFromIDList(ppidl, pszIEQueickLaunchPath);
strcat(pszIEQueickLaunchPath, "\\Microsoft\\Internet Explorer\\Quick Launch");
CoTaskMemFree(ppidl);
return flag;
}
return FALSE;
}
BOOL CLdianQIDlg::GetProgramsPath(char *pszProgramsPath)
{
LPITEMIDLIST ppidl;
if (SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &ppidl) == S_OK)
{
BOOL flag = SHGetPathFromIDList(ppidl, pszProgramsPath);
CoTaskMemFree(ppidl);
return flag;
}
return FALSE;
}
/*
函数功能:对指定文件在指定的目录下创建其快捷方式
函数参数:
lpszFileName 指定文件,为NULL表示当前进程的EXE文件。
lpszLnkFileDir 指定目录,不能为NULL。
lpszLnkFileName 快捷方式名称,为NULL表示EXE文件名。
wHotkey 为0表示不设置快捷键
pszDescription 备注
iShowCmd 运行方式,默认为常规窗口
*/
BOOL CreateFileShortcut(LPCSTR lpszFileName, LPCSTR lpszLnkFileDir, LPCSTR lpszLnkFileName,
LPCSTR lpszWorkDir, WORD wHotkey, LPCTSTR lpszDescription, int iShowCmd = SW_SHOWNORMAL)
{
if (lpszLnkFileDir == NULL)
return FALSE;
HRESULT hr;
IShellLink *pLink; //IShellLink对象指针
IPersistFile *ppf; //IPersisFil对象指针
//创建IShellLink对象
hr = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink,
(void**)&pLink);
if (FAILED(hr))
return FALSE;
//从IShellLink对象中获取IPersistFile接口
hr = pLink->QueryInterface(IID_IPersistFile, (void**)&ppf);
if (FAILED(hr))
{
pLink->Release();
return FALSE;
}
//目标
if (lpszFileName == NULL)
pLink->SetPath(_pgmptr);
else
pLink->SetPath(lpszFileName);
//工作目录
if (lpszWorkDir != NULL)
pLink->SetPath(lpszWorkDir);
//快捷键
if (wHotkey != 0)
pLink->SetHotkey(wHotkey);
//备注
if (lpszDescription != NULL)
pLink->SetDescription(lpszDescription);
//显示方式
pLink->SetShowCmd(iShowCmd);
//快捷方式的路径 + 名称
char szBuffer[MAX_PATH];
if (lpszLnkFileName != NULL) //指定了快捷方式的名称
sprintf(szBuffer, "%s\\%s", lpszLnkFileDir, lpszLnkFileName);
else
{
//没有指定名称,就从取指定文件的文件名作为快捷方式名称。
char *pstr;
if (lpszFileName != NULL)
pstr = strrchr(lpszFileName, '\\');
else
pstr = strrchr(_pgmptr, '\\');
if (pstr == NULL)
{
ppf->Release();
pLink->Release();
return FALSE;
}
//注意后缀名要从.exe改为.lnk
sprintf(szBuffer, "%s\\%s", lpszLnkFileDir, pstr);
int nLen = strlen(szBuffer);
szBuffer[nLen - 3] = 'l';
szBuffer[nLen - 2] = 'n';
szBuffer[nLen - 1] = 'k';
}
//保存快捷方式到指定目录下
WCHAR wsz[MAX_PATH]; //定义Unicode字符串
MultiByteToWideChar(CP_ACP, 0, szBuffer, -1, wsz, MAX_PATH);
hr = ppf->Save(wsz, TRUE);
ppf->Release();
pLink->Release();
return SUCCEEDED(hr);
}
//以上代码为生成桌面快捷方式-----------------------------------------------------------------------
BOOL CLdianQIDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
// TODO: Add extra initialization here
CenterWindow();//程序启动时窗体处于屏幕的中心位置
{//检测是否开启了打开了相同程序
HWND wnd;
wnd=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
if(wnd!=NULL)
{
//::ShowWindow(wnd,SW_HIDE);//将窗口隐藏
MessageBox("为了不至于您的计算机鼠标精神错乱!^_^\r\n\r\n所以每次只允许开启一个鼠标连点器!","程序开启出错提示",MB_OK|MB_ICONINFORMATION);
//CDialog::OnClose();
KAI="程序已经开启";
SetTimer(2,10,NULL);
//return TRUE; // return TRUE unless you set the focus to a control
}
else
{
SetWindowText("鼠标连点器——海马软件QQ:9254793"); //设置窗体标题
}
}
////对文件地址的"\"替换成"\\"
for(int i=0;i
int index = tempexe.Find("\\");
if(index == -1)
continue;
else
{
if(i==1)
{
tempexe.Replace("\\","\\\\\\\\"); //前面的参数是要替换的字符串,后面的参数是你指定的新字符串
}
if(i>1)
{
goto lid;
}
//MessageBox(tempexe,"程序地址2",MB_OK|MB_ICONINFORMATION);
GetDlgItem(IDC_STATICFILE)->SetWindowText(tempexe);
}
}
lid:
;
CString StrFileOk;
GetDlgItem(IDC_STATICFILE)->GetWindowText(StrFileOk);
//MessageBox(StrFileOk,"程序地址3",MB_OK|MB_ICONINFORMATION);
char *filepath;
filepath=(LPSTR)(LPCTSTR)StrFileOk;//强制转换
//方法一 获取程序的大小
HANDLE handle = CreateFile(filepath, FILE_READ_EA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
if (handle != INVALID_HANDLE_VALUE)
{
int size = GetFileSize(handle,NULL);
CString TXNUM;
TXNUM.Format(_T("%d"),size);
//MessageBox("程序大小为:"+TXNUM+"字节","程序大小",MB_OK|MB_ICONINFORMATION);
CloseHandle(handle);
int ExeNum=atoi(TXNUM);
if(ExeNum==2667008 || ExeNum==2670592)
{
//MessageBox("程序原始大小为 2667008 字节\r\n经过软件自身安全检测!\r\n此程序未被其他软件修改!\r\n可以放心使用^_^!","程序安全检测",MB_OK|MB_ICONINFORMATION);
//使用已经添加的快捷方式生成函数添加程序的桌面快捷方式
{
char szPath[MAX_PATH];
CoInitialize(NULL);
GetDesktopPath(szPath);
//if(CreateFileShortcut(NULL, szPath, NULL, NULL, MAKEWORD(VK_F12, HOTKEYF_CONTROL), "海马软件荣誉出品:QQ:9254793"));
if(CreateFileShortcut(NULL, szPath, "海马鼠标连点器.lnk", NULL, MAKEWORD(VK_F12, HOTKEYF_CONTROL), "海马软件荣誉出品:QQ:9254793 \r\n海马软件唯一官方微信:MxpSoft\r\n海马软件自带安全检测机制可以保障软件不会被第三方篡改!" ));
//printf("创建成功\n");
CoUninitialize();
}
}
else
{
MessageBox("本软件内嵌程序安全检测功能\r\n经过程序对自身数据文件的安全检测!\r\n发现当前您使用的程序可能被非法软件恶意修改过了!\r\n原版的程序实际大小为: 2667008 字节!\r\n本软件发现自己被别人非法篡改了!\r\n为了保证用户的计算机安全!\r\n软件自动启动自杀功能!\r\n请立即删除此软件!\r\n重新从官方网站下载官方版!\r\n程序开始自动执行自身删除功能!\r\n请从官方网站下载免费正版!\r\n\r\n\r\n\r\n程序虽小!但也原创!\r\n拒绝捆绑!自杀无罪!\r\n尊重原创!请勿绑我!\r\n珍惜生命!请勿盗我!\r\n\r\n(X_X) (X_X) (X_X)\r\n\r\n(X_X) (X_X) (X_X)\r\n\r\n程序自我鉴定已经被垃圾软件非法捆绑!\r\n开始进行自杀卸载!都别拦我!!!~~~~~~~~~~~~~~~","程序安全检测",MB_OK|MB_ICONINFORMATION);
DelSoft();//执行软件自动清除功能!
}
}
//配合定时器设置程序窗体打开特效
//获得窗口预设的大小
CRect dlgRect;
GetWindowRect(dlgRect);
CRect desktopRect;
//将窗口开始大小设为0
GetDesktopWindow()->GetWindowRect(desktopRect);
MoveWindow((desktopRect.Width() - dlgRect.Width()) / 2,
(desktopRect.Height() - dlgRect.Height()) / 2,
0,
0 );
//初始化变化大小
m_nWidth=dlgRect.Width();
m_nHeight=dlgRect.Height();
m_nDx=2;
m_nDy=4;
m_nDx1=2;
m_nDy1=2;
//设定定时器1
SetTimer(1,1,NULL);
OpenBn();
/*
//设置窗口半透明
//设置窗口扩展风格
SetWindowLong(GetSafeHwnd(),GWL_EXSTYLE,GetWindowLong(GetSafeHwnd(),GWL_EXSTYLE)|0x80000);
typedef BOOL (WINAPI *FSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
FSetLayeredWindowAttributes SetLayeredWindowAttributes ;
HINSTANCE hInst = LoadLibrary("User32.DLL");
SetLayeredWindowAttributes = (FSetLayeredWindowAttributes)GetProcAddress(hInst,"SetLayeredWindowAttributes");
if (SetLayeredWindowAttributes)
SetLayeredWindowAttributes(GetSafeHwnd(),RGB(0,0,0),128,2);
FreeLibrary(hInst);
*/
/*//实现定制回车键 此方法暂不使用
m_hAccel = ::LoadAccelerators(AfxGetResourceHandle(),
m_lpszTemplateName); // use same resource name as dialog
//ASSERT(m_hAccel);
*/
UpdateData(TRUE);
Num=10;
m_Slider.SetRange(0,100);//设置范围
m_Slider.SetTicFreq(1);//设置显示刻度的间隔
m_Slider.SetPos(90);//当前停留的位置
m_Slider.SetLineSize(10);//一行的大小,对应键盘的方向键
UpdateData(FALSE);
m_menuA.SetBitmap(LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAPA))); //设置按钮图标
m_menuB.SetBitmap(LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAPB))); //设置按钮图标
GetDlgItem(IDC_COMBO1)->SetWindowText("1");
GetDlgItem(IDC_COMBO2)->SetWindowText("CTRL");
GetDlgItem(IDC_COMBO3)->SetWindowText("2");
GetDlgItem(IDC_COMBO4)->SetWindowText("CTRL");
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
TerminateThread(m_hThreadMuseOK,0);//关闭旧的多线程
TerminateThread(m_hThreadTime,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
m_hThreadMuseOK = CreateThread(NULL,0,ThreadProcMuseOK,this,0,NULL);//开启多线程生产数据综合查询功能
m_hThreadTime = CreateThread(NULL,0,ThreadProcTime,this,0,NULL);//开启多线程生产数据综合查询功能
::SetWindowPos(m_URLplay,HWND_TOPMOST,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE);//将控件窗口在最前端显示
{
CString Ustr="http://w1.zhexi.tech:14534/app/";
//CString Ustr="http://w1.zhexi.tech:14534/app/";
//CFileDialog log(TRUE,"文件",Ustr,OFN_HIDEREADONLY,"FILE(*.htm)|*.htm||",NULL);
//CString pathURL=log.GetPathName();
//m_URLplay.ScrollBarsEnabled=false;//去掉WebBrowser本身自带的滚动条
//m_URLplay.Document.Body.SetAttribute("style","overflow:hidden")
m_URLplay.Navigate2(COleVariant(Ustr),NULL,NULL,NULL,NULL);
//MessageBox("调用的程序背景地址为:"+StrLie1);
//MessageBox(Ustr);
}
return TRUE; // return TRUE unless you set the focus to a control
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CLdianQIDlg::OnPaint()
{
//设置图片背景代码
CPaintDC dc(this);
CRect r;
GetClientRect(&r);
CDC memdc;
memdc.CreateCompatibleDC(&dc);
BITMAP bitStruct;
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP);
bitmap.GetBitmap(&bitStruct);
memdc.SelectObject(&bitmap);
dc.StretchBlt(0,0,r.Width(),r.Height(),&memdc,0,0,bitStruct.bmWidth,bitStruct.bmHeight,SRCCOPY);
//设置背景透明效果
dc.SetBkMode(TRANSPARENT);
memdc.DeleteDC();
bitmap.DeleteObject();
/*
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
*/
}
BEGIN_EVENTSINK_MAP(CLdianQIDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CLdianQIDlg)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CLdianQIDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
// Automation servers should not exit when a user closes the UI
// if a controller still holds on to one of its objects. These
// message handlers make sure that if the proxy is still in use,
// then the UI is hidden but the dialog remains around if it
// is dismissed.
BOOL CLdianQIDlg::CanExit()
{
// If the proxy object is still around, then the automation
// controller is still holding on to this application. Leave
// the dialog around, but hide its UI.
if (m_pAutoProxy != NULL)
{
ShowWindow(SW_HIDE);
return FALSE;
}
return TRUE;
}
void CLdianQIDlg::OnTimer(UINT nIDEvent)
{
//获得此时窗口的实际大小
CRect dlgRect;
GetWindowRect(dlgRect);
//获得桌面的大小
CRect desktopRect;
GetDesktopWindow()->GetWindowRect(desktopRect);
//如果是窗口弹出过程,则逐渐增大窗口
if(nIDEvent == 1)
{
MoveWindow(
(-m_nDx+desktopRect.Width() - dlgRect.Width()) / 2,
(-m_nDy+desktopRect.Height() - dlgRect.Height()) / 2,
+m_nDx+dlgRect.Width(),
+m_nDy+dlgRect.Height() );
//不要超过窗口预设的宽度
if(dlgRect.Width() >=m_nWidth)
m_nDx=0;
//不要超过窗口预设的高度
if(dlgRect.Height() >=m_nHeight)
m_nDy=0;
//停止变化,关闭定时器1
if((dlgRect.Width() >=m_nWidth) && (dlgRect.Height() >=m_nHeight))
KillTimer(1);
}
//停止变化,关闭定时器1
if((dlgRect.Width() >=m_nWidth) && (dlgRect.Height() >=m_nHeight))
KillTimer(1);
//如果是窗口关闭过程,则逐渐缩小窗口
if(nIDEvent == 2 || KAI=="程序已经开启")
{
MoveWindow((+m_nDx+desktopRect.Width() - dlgRect.Width()) / 2,
(+m_nDy+desktopRect.Height() - dlgRect.Height()) / 2,
-m_nDx1+dlgRect.Width(),
-m_nDy1+dlgRect.Height() );
//当宽度等于零后宽度就不在变化
if(dlgRect.Width() <= 0)
m_nDx1=0;
//当高度等于零后高度就不在变化
if(dlgRect.Height() <= 0 )
m_nDy1=0;
//停止变化,关闭定时器2,并且关闭窗口
if((dlgRect.Width() <= 0 ) && (dlgRect.Height() <=0))
{
KillTimer(2);
CDialog::OnOK();
}
}
CDialog::OnTimer(nIDEvent);
}
//按确定按钮
void CLdianQIDlg::OnOK()
{
if(MessageBox("确定要退出海马鼠标自动连点器吗?","退出海马鼠标连点器提示",
MB_OKCANCEL|MB_ICONQUESTION)!=IDOK)
return;
//设定关闭时的定时器2
SetTimer(2,10,NULL);
//CDialog::OnOK();
}
//按取消按钮
void CLdianQIDlg::OnCancel()
{
if(MessageBox("确定要退出海马鼠标自动连点器吗?","退出海马鼠标连点器提示",
MB_OKCANCEL|MB_ICONQUESTION)!=IDOK)
return;
//设定关闭时的定时器2
SetTimer(2,10,NULL);
//CDialog::OnCancel();
}
//按系统关闭按钮
void CLdianQIDlg::OnClose()
{
if(MessageBox("确定要退出海马鼠标自动连点器吗?","退出海马鼠标连点器提示",
MB_OKCANCEL|MB_ICONQUESTION)!=IDOK)
return;
//设定关闭时的定时器2
SetTimer(2,10,NULL);
CDialog::OnClose();
}
UINT CLdianQIDlg::OnNcHitTest(CPoint point)
{
//以下此段是实现用鼠标点住窗口任何位置即可移动窗体的功能代码共两行
UINT nHitTest = CDialog::OnNcHitTest(point); //实现用鼠标点住窗口任何位置即可移动窗体的功能
return(nHitTest==HTCLIENT)?HTCAPTION:nHitTest; //实现用鼠标点住窗口任何位置即可移动窗体的功能
}
BOOL CLdianQIDlg::PreTranslateMessage(MSG* pMsg)
{
//以下代码实现完全屏蔽回车退出程序
if(pMsg->message==WM_KEYDOWN&&pMsg->wParam==VK_RETURN)
return TRUE;
if(pMsg->message==WM_KEYDOWN&&pMsg->wParam==VK_ESCAPE)
return TRUE;
/*//此代码有些问题暂不使用
if(pMsg->wParam==27)//检测到按ESC键执行回车
{
pMsg->wParam=11;
}
if (WM_KEYFIRST <= pMsg->message && pMsg->message <= WM_KEYLAST) {
HACCEL hAccel = m_hAccel;
if (hAccel && ::TranslateAccelerator(m_hWnd, hAccel, pMsg))
return TRUE;
}
*/
/*//以下代码实现屏蔽ESC退出程序同时指定回车键到指定控件中
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_RETURN )
{
if(GetFocus()->GetDlgCtrlID()==IDC_MSG_SEND)//
}
*/
return CDialog::PreTranslateMessage(pMsg);
}
void CLdianQIDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CSliderCtrl* slider=(CSliderCtrl*)pScrollBar;
if (slider=&m_Slider)
{
UpdateData(TRUE);
Num=m_Slider.GetPos();
// 将滑块数值填写入指定控件中
CString temp;
temp.Format("%d",Num);
GetDlgItem(IDC_STATICX1)->SetWindowText(temp+"%");
OpenBn();
//实现及时刷新窗口
HWND hwnd;
hwnd=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
if(hwnd!=NULL)
{
::InvalidateRect(hwnd, NULL, true);
::UpdateWindow(hwnd);
m_URLplay.Invalidate();
::SetWindowPos(m_URLplay,HWND_TOPMOST,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE);//将控件窗口在最前端显示
Invalidate();
}
UpdateData(FALSE);
}
}
void CLdianQIDlg::OnCustomdrawSlider1(NMHDR* pNMHDR, LRESULT* pResult) //在滑块上增加 OnCustomdrawSlider1 事件
{
//在此函数中使用此方法会导致程序一些问题 所以此函数暂时不用
/*
UpdateData(TRUE);
Num=m_Slider.GetPos();//获取滑块数值
*pResult = 0;
// 将滑块数值填写入指定控件中
CString temp;
temp.Format("%d",Num);
GetDlgItem(IDC_STATICX1)->SetWindowText(temp);
UpdateData(FALSE);
*/
}
void CLdianQIDlg::OpenBn()
{
if(Num>=20)
{
//GetPrivateProfileString("窗口设置", "透明度", "", num.GetBuffer(0),8,"./Eidolon.ini");
//设置窗口的透明度
SetWindowLong(GetSafeHwnd(),GWL_EXSTYLE,
GetWindowLong(GetSafeHwnd(),GWL_EXSTYLE) | 0x80000);
typedef BOOL (WINAPI *FSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
FSetLayeredWindowAttributes SetLayeredWindowAttributes;
HINSTANCE hInst = LoadLibrary("User32.DLL");
SetLayeredWindowAttributes = (FSetLayeredWindowAttributes)
GetProcAddress(hInst,"SetLayeredWindowAttributes");
if(SetLayeredWindowAttributes)
SetLayeredWindowAttributes(GetSafeHwnd(),RGB(0,0,0),Num,2);
FreeLibrary(hInst);
//Invalidate();
}
if(Num==100)
{
//GetPrivateProfileString("窗口设置", "透明度", "", num.GetBuffer(0),8,"./Eidolon.ini");
//设置窗口的透明度
SetWindowLong(GetSafeHwnd(),GWL_EXSTYLE,
GetWindowLong(GetSafeHwnd(),GWL_EXSTYLE) | 0x80000);
typedef BOOL (WINAPI *FSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
FSetLayeredWindowAttributes SetLayeredWindowAttributes;
HINSTANCE hInst = LoadLibrary("User32.DLL");
SetLayeredWindowAttributes = (FSetLayeredWindowAttributes)
GetProcAddress(hInst,"SetLayeredWindowAttributes");
if(SetLayeredWindowAttributes)
SetLayeredWindowAttributes(GetSafeHwnd(),RGB(0,0,0),1000,2);
FreeLibrary(hInst);
//Invalidate();
}
}
HBRUSH CLdianQIDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if( nCtlColor == CTLCOLOR_STATIC)
{
pDC->SetBkMode(TRANSPARENT); //设置背景透明
return HBRUSH(GetStockObject(HOLLOW_BRUSH));
}
/*
if (nCtlColor == CTLCOLOR_STATIC)
{
CRect rc;
pWnd->GetWindowRect(&rc);
ScreenToClient(&rc);
CDC* dc = GetDC();
pDC->BitBlt(0, 0, rc.Width(), rc.Height(), dc, rc.left, rc.top, SRCCOPY); //把父窗口背景图片先画到按钮上
ReleaseDC(dc);
pDC->SetTextColor(RGB(255, 255, 255));//设置字体颜色
pDC->SetBkMode(TRANSPARENT);//设置透明控件
hbr = (HBRUSH) ::GetStockObject(NULL_BRUSH);
}
{
CRect rect;
WindowRect(&rect); //获取控件区域??
ScreenToClient(&rect); //屏幕区域对客户区域的转换 ? ?
InvalidateRect(rect);//刷新?
}
*/
return hbr;
}
void CLdianQIDlg::OnOk2()
{
//将页面隐藏 最小化
HWND wnd;
wnd=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
if(wnd!=NULL)
{
::ShowWindow(wnd,SW_SHOWMINIMIZED);//将窗口隐藏
}
/*
SW_HIDE: 隐藏窗口
SW_SHOW: 激活并以当前的大小在当前位置显示窗口
SW_SHOWMAXIMIZED: 最大化窗口
SW_SHOWMINIMIZED: 最小化窗口
SW_SHOWNORMAL: 激活并显示窗口,如果窗口处于最大化或最小化的状态时,将其恢复到原始窗口状态
*/
}
//___________________________________________________________________________________________
void CLdianQIDlg::OnEditupdateCombo1()
{
//发送新热键命令
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::OnSelchangeCombo1()
{
//发送新热键命令
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::RegKeyCe()
{
//AfxMessageBox("热键为"+Tmp);
//执行热键0-9 A-Z检测
if(Tmp=="0")
{
StrKey='0';
}
if(Tmp=="1")
{
StrKey='1';
}
if(Tmp=="2")
{
StrKey='2';
}
if(Tmp=="3")
{
StrKey='3';
}
if(Tmp=="4")
{
StrKey='4';
}
if(Tmp=="5")
{
StrKey='5';
}
if(Tmp=="6")
{
StrKey='6';
}
if(Tmp=="7")
{
StrKey='7';
}
if(Tmp=="8")
{
StrKey='8';
}
if(Tmp=="9")
{
StrKey='9';
}
if(Tmp=="A" || Tmp=="a")
{
StrKey='A';
}
if(Tmp=="B" || Tmp=="b")
{
StrKey='B';
}
if(Tmp=="C" || Tmp=="c")
{
StrKey='C';
}
if(Tmp=="D" || Tmp=="d")
{
StrKey='D';
}
if(Tmp=="E" || Tmp=="e")
{
StrKey='E';
}
if(Tmp=="F" || Tmp=="f")
{
StrKey='F';
}
if(Tmp=="G" || Tmp=="g")
{
StrKey='G';
}
if(Tmp=="H" || Tmp=="h")
{
StrKey='H';
}
if(Tmp=="I" || Tmp=="i")
{
StrKey='I';
}
if(Tmp=="J" || Tmp=="j")
{
StrKey='J';
}
if(Tmp=="K" || Tmp=="")
{
StrKey='K';
}
if(Tmp=="L" || Tmp=="l")
{
StrKey='L';
}
if(Tmp=="M" || Tmp=="m")
{
StrKey='M';
}
if(Tmp=="N" || Tmp=="n")
{
StrKey='N';
}
if(Tmp=="O" || Tmp=="o")
{
StrKey='O';
}
if(Tmp=="P" || Tmp=="p")
{
StrKey='P';
}
if(Tmp=="Q" || Tmp=="q")
{
StrKey='Q';
}
if(Tmp=="R" || Tmp=="r")
{
StrKey='R';
}
if(Tmp=="S" || Tmp=="s")
{
StrKey='S';
}
if(Tmp=="T" || Tmp=="t")
{
StrKey='T';
}
if(Tmp=="U" || Tmp=="u")
{
StrKey='U';
}
if(Tmp=="V" || Tmp=="v")
{
StrKey='V';
}
if(Tmp=="W" || Tmp=="w")
{
StrKey='W';
}
if(Tmp=="X" || Tmp=="x")
{
StrKey='X';
}
if(Tmp=="Y" || Tmp=="y")
{
StrKey='Y';
}
if(Tmp=="Z" || Tmp=="z")
{
StrKey='Z';
}
}
//________________________________________________________________________________
void CLdianQIDlg::OnEditupdateCombo3()
{
//发送新热键命令
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::OnSelchangeCombo3()
{
//发送新热键命令
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::RegKeyCeStop()
{
//AfxMessageBox("热键为"+Tmp);
//执行热键0-9 A-Z检测
if(TmpStop=="0")
{
StrKeyStop='0';
}
if(TmpStop=="1")
{
StrKeyStop='1';
}
if(TmpStop=="2")
{
StrKeyStop='2';
}
if(TmpStop=="3")
{
StrKeyStop='3';
}
if(TmpStop=="4")
{
StrKeyStop='4';
}
if(TmpStop=="5")
{
StrKeyStop='5';
}
if(TmpStop=="6")
{
StrKeyStop='6';
}
if(TmpStop=="7")
{
StrKeyStop='7';
}
if(TmpStop=="8")
{
StrKeyStop='8';
}
if(TmpStop=="9")
{
StrKeyStop='9';
}
if(TmpStop=="A" || TmpStop=="a")
{
StrKeyStop='A';
}
if(TmpStop=="B" || TmpStop=="b")
{
StrKeyStop='B';
}
if(TmpStop=="C" || TmpStop=="c")
{
StrKeyStop='C';
}
if(TmpStop=="D" || TmpStop=="d")
{
StrKeyStop='D';
}
if(TmpStop=="E" || TmpStop=="e")
{
StrKeyStop='E';
}
if(TmpStop=="F" || TmpStop=="f")
{
StrKeyStop='F';
}
if(TmpStop=="G" || TmpStop=="g")
{
StrKeyStop='G';
}
if(TmpStop=="H" || TmpStop=="h")
{
StrKeyStop='H';
}
if(TmpStop=="I" || TmpStop=="i")
{
StrKeyStop='I';
}
if(TmpStop=="J" || TmpStop=="j")
{
StrKeyStop='J';
}
if(TmpStop=="K" || TmpStop=="")
{
StrKeyStop='K';
}
if(TmpStop=="L" || TmpStop=="l")
{
StrKeyStop='L';
}
if(TmpStop=="M" || TmpStop=="m")
{
StrKeyStop='M';
}
if(TmpStop=="N" || TmpStop=="n")
{
StrKeyStop='N';
}
if(TmpStop=="O" || TmpStop=="o")
{
StrKeyStop='O';
}
if(TmpStop=="P" || TmpStop=="p")
{
StrKeyStop='P';
}
if(TmpStop=="Q" || TmpStop=="q")
{
StrKeyStop='Q';
}
if(TmpStop=="R" || TmpStop=="r")
{
StrKeyStop='R';
}
if(TmpStop=="S" || TmpStop=="s")
{
StrKeyStop='S';
}
if(TmpStop=="T" || TmpStop=="t")
{
StrKeyStop='T';
}
if(TmpStop=="U" || TmpStop=="u")
{
StrKeyStop='U';
}
if(TmpStop=="V" || TmpStop=="v")
{
StrKeyStop='V';
}
if(TmpStop=="W" || TmpStop=="w")
{
StrKeyStop='W';
}
if(TmpStop=="X" || TmpStop=="x")
{
StrKeyStop='X';
}
if(TmpStop=="Y" || TmpStop=="y")
{
StrKeyStop='Y';
}
if(TmpStop=="Z" || TmpStop=="z")
{
StrKeyStop='Z';
}
}
void CLdianQIDlg::OnEditupdateCombo2()
{
//发送新热键命令
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::OnSelchangeCombo2()
{
//发送新热键命令
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::OnEditupdateCombo4()
{
//发送新热键命令
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::OnSelchangeCombo4()
{
//发送新热键命令
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
}
void CLdianQIDlg::KeyOkStop()//不执行热键功能
{
MouseOK="关闭键盘热键";
MouseOKCombo="关闭鼠标热键";
MouseCkool="停止";
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//松开鼠标左键
/*
((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(FALSE);//回复为不选择点选项
((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(FALSE);//回复为不选择点选项
*/
}
void CLdianQIDlg::KeyMouse()
{
if(((CButton *)GetDlgItem(IDC_RADIO2))->GetCheck())
{
//先关闭键盘热键的多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
//然后再启动鼠标热键
if(MouseOKCombo=="启用鼠标快捷键")
{
if(KEY_DOWN(MOUSE_MOVED))
{
//MessageBox("您点击了鼠标左键!触发鼠标自动操作!");
MouseOKComboOK="开启鼠标热键动作";
}
if(KEY_DOWN(MOUSE_EVENT))
{
MouseOKCombo="暂停鼠标热键";
MouseOKComboOK="暂停鼠标热键";
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
MouseOK="关闭键盘热键";
//MessageBox("您点击了鼠标右键!程序停止鼠标点击!");
//((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(FALSE);//不选择点选项
//MessageBox("您点击了鼠标右键!");
}
if(KEY_DOWN(MOUSE_WHEELED))
{
MouseOKCombo="暂停鼠标热键";
MouseOKComboOK="暂停鼠标热键";
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
MouseOK="关闭键盘热键";
//MessageBox("您点击了鼠标中键!程序停止鼠标点击!");
//((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(FALSE);//不选择点选项
//MessageBox("您点击了鼠标滚轮");
}
//单击 使用延时实现单击
if(MouseOKComboOK=="开启鼠标热键动作")
{
//单击 使用延时实现单击
if(MouseCkool=="连续点击鼠标左键")
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(10);
}
if(MouseCkool=="按住鼠标左键")
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(10);
}
}
else if(MouseOKCombo=="暂停鼠标热键" || MouseOKComboOK=="暂停鼠标热键")
{
Sleep(10);
//暂停松开鼠标左键
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//松开鼠标左键
}
Sleep(100);//循环时间间隔,防止太占内存
}
}
else
{
//MessageBox("未选择点选项");
}
}
void CLdianQIDlg::OnRadio2()
{
MouseOKCombo="启用鼠标快捷键";
((CButton *)GetDlgItem(IDC_RADIO4))->SetCheck(FALSE);//不选择点选项
//MessageBox("您已启用了鼠标热键功能!点击几次鼠标后\r\n鼠标将实现自动点击\r\n如果想停止鼠标自动点击\r\n只需要再点击几下鼠标右键或者鼠标中键即可");
}
void CLdianQIDlg::OnRadio1()
{
((CButton *)GetDlgItem(IDC_RADIO3))->SetCheck(FALSE);//不选择点选项
if(((CButton *)GetDlgItem(IDC_RADIO1))->GetCheck())
{
CString StrTimes;
m_Tims.GetWindowText(StrTimes);
if(StrTimes=="")
{
MessageBox("未设置计时时间");
}
else
{
int TimeNums=atoi(StrTimes);
if(TimeNums<0)
{
MessageBox("这个世界上不存在负时间!\r\n难道您来自四维空间?\r\n三体看多了吧^_^!");
}
else
{
CString StrNumTime;
GetDlgItem(IDC_EDITTIMENUM)->GetWindowText(StrNumTime);
NumTime=atoi(StrNumTime);
CString StrNumTimeUP;
StrNumTimeUP.Format(_T("%d"),NumTime);
TimeGoodOK="开始计时";
//MessageBox("您设定的时间为"+StrNumTimeUP+"秒");
CTime t1( 1999, 3, 19, 22, 15, 0 );
CTime t = CTime::GetCurrentTime();
CTimeSpan span=t-t1; //计算当前系统时间与时间t1的间隔
//int iDay=span.GetDays(); //获取这段时间间隔共有多少天
//int iHour=span.GetTotalHours(); //获取总共有多少小时
//int iMin=span.GetTotalMinutes();//获取总共有多少分钟
L_miao=span.GetTotalSeconds();//获取总共有多少秒
}
}
}
}
void CLdianQIDlg::OnRadio3()
{
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(FALSE);//不选择点选项
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
TimeGoodOK="停止计时";
//MessageBox(TimeGoodOK);
}
void CLdianQIDlg::WindowsNumTime()
{
if(TimeGoodOK=="开始计时" && ((CButton *)GetDlgItem(IDC_RADIO1))->GetCheck())
{
CTime t1( 1999, 3, 19, 22, 15, 0 );
CTime t = CTime::GetCurrentTime();
CTimeSpan span=t-t1; //计算当前系统时间与时间t1的间隔
//int iDay=span.GetDays(); //获取这段时间间隔共有多少天
//int iHour=span.GetTotalHours(); //获取总共有多少小时
//int iMin=span.GetTotalMinutes();//获取总共有多少分钟
int iSec=span.GetTotalSeconds();//获取总共有多少秒
CString strmiao;
strmiao.Format("%d",iSec);
//AfxMessageBox(strmiao);
int Utimesx=iSec-L_miao;
int UKIL=NumTime-Utimesx;
CString strmiao1,strmiao2,strmiao3,strmiao4;
strmiao1.Format("%d",NumTime);
strmiao2.Format("%d",Utimesx);
strmiao3.Format("%d",iSec);
strmiao4.Format("%d",UKIL);
GetDlgItem(IDC_EDITTIMENUMTXT)->SetWindowText(strmiao4); //获取当前软件的存放地址
//AfxMessageBox("设定时间还剩"+strmiao4+"秒");
if(Utimesx==NumTime)
{
//AfxMessageBox("时间到了");
//AfxMessageBox("设定时间"+strmiao1+" 剩余"+strmiao2+"到现在"+strmiao3);
L_miao=0;
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(FALSE);//不选择点选项
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
MouseOK="关闭键盘热键";
MouseOKCombo="关闭鼠标热键";
MouseOKComboOK="关闭鼠标热键动作";
TimeGoodOK="停止计时";
MouseCkool="停止";
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//松开鼠标左键
((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(FALSE);//回复为不选择点选项
((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(FALSE);//回复为不选择点选项
//MessageBox(TimeGoodOK);
m_TimeX.SetWindowText("计时完成");
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(FALSE);//不选择点选项
((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(FALSE);//不选择点选项
((CButton *)GetDlgItem(IDC_RADIO3))->SetCheck(FALSE);//不选择点选项
{
PlaySound((LPCTSTR)IDR_WAVE1, AfxGetInstanceHandle(), SND_RESOURCE | SND_ASYNC);
}
}
}
}
void CLdianQIDlg::DelSoft()//执行软件自动清除功能!
{
CString SoftExeStr;
GetDlgItem(IDC_STATICFILE)->GetWindowText(SoftExeStr); //获取当前软件的存放地址
//根据软件地址自动删除软件自身!
}
void CLdianQIDlg::OnRadio4()
{
MouseOKCombo="关闭鼠标热键";
MouseOKComboOK="关闭鼠标热键动作";
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
TerminateThread(m_hThreadKey,0);//关闭旧的多线程
m_hThreadKey = CreateThread(NULL,0,ThreadProcKey,this,0,NULL);//开启多线程生产数据综合查询功能
//关闭鼠标热键后自动启动键盘热键多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
TerminateThread(m_hThreadKeyStop,0);//关闭旧的多线程
m_hThreadKeyStop = CreateThread(NULL,0,ThreadProcKeyStop,this,0,NULL);//开启多线程生产数据综合查询功能
((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(FALSE);//不选择点选项
MouseCkool="停止";
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//松开鼠标左键
((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(FALSE);//回复为不选择点选项
((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(FALSE);//回复为不选择点选项
}
void CLdianQIDlg::KeyOk()//执行热键功能
{
//单击 使用延时实现单击
if(MouseCkool=="连续点击鼠标左键")
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(10);
}
if(MouseCkool=="按住鼠标左键")
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(10);
}
}
void CLdianQIDlg::OnRadio5() //鼠标连续点击
{
((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(FALSE);//不选择点选项
MouseCkool="连续点击鼠标左键";
}
void CLdianQIDlg::OnRadio6() //鼠标按住点击
{
((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(FALSE);//不选择点选项
MouseCkool="按住鼠标左键";
}
void CLdianQIDlg::OnButtonQZ()
{
//1窗口前置
HWND wnd1=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
::SetWindowPos(wnd1,HWND_TOPMOST,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE);//将窗口在最前端显示
}
void CLdianQIDlg::OnButtonQZNO()
{
//2取消窗口前置
HWND wnd2=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
::SetWindowPos(wnd2,HWND_NOTOPMOST,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE);//将窗口在最前端显示取消
}
void CLdianQIDlg::OnButtonMINI()
{
Sleep(3000);
HWND wnd;
wnd=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
::MoveWindow(wnd,0,0,170,507,TRUE); //::MoveWindow(wnds,i,1,911,210,TRUE);//1将窗口调整到合适大小
CenterWindow();//程序启动时窗体处于屏幕的中心位置
}
void CLdianQIDlg::OnButtonJM()
{
Sleep(3000);
HWND wnd;
wnd=::FindWindow(NULL,"鼠标连点器——海马软件QQ:9254793");
::MoveWindow(wnd,0,0,672,507,TRUE); //::MoveWindow(wnds,i,1,911,210,TRUE);//1将窗口调整到合适大小
CenterWindow();//程序启动时窗体处于屏幕的中心位置
}
LdianQI.cpp源文件
// LdianQI.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "LdianQI.h"
#include "LdianQIDlg.h"
#include
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLdianQIApp
char StrKey;
char StrKeyStop;
CString Tmp;
CString TmpStop;
CString MouseOK;
CString MouseOKCombo;
CString MouseOKComboOK;
CString TimeGoodOK;
CString tempexe;
CString URLFile;
int NumTime;
int L_miao;
CString MouseCkool;
BEGIN_MESSAGE_MAP(CLdianQIApp, CWinApp)
//{{AFX_MSG_MAP(CLdianQIApp)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CLdianQIApp construction
CLdianQIApp::CLdianQIApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CLdianQIApp object
CLdianQIApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CLdianQIApp initialization
BOOL CLdianQIApp::InitInstance()
{
//获取当前程序的执行目录和程序名称
char filepath[MAX_PATH];
GetModuleFileName(NULL,filepath,MAX_PATH);
tempexe = theApp.ExtractFilePath(filepath);//获取可执行文件的路径
URLFile = ExtractFilePath(filepath);//获取可执行文件的路径
//strcat(filepath,"\\");
//strcat(filepath,AfxGetApp()->m_pszExeName);
//strcat(filepath,".exe"); //获取程序的全文件名
tempexe=filepath;
//AfxMessageBox(tempexe);
//AfxMessageBox(filepath);
if (!AfxSocketInit())
{
//AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
// Initialize OLE libraries
if (!AfxOleInit())
{
//AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
WriteCFile();//自动生成静态Html文件
// 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
// Parse the command line to see if launched as OLE server
if (RunEmbedded() || RunAutomated())
{
// Register all OLE server (factories) as running. This enables the
// OLE libraries to create objects from other applications.
COleTemplateServer::RegisterAll();
}
else
{
// When a server application is launched stand-alone, it is a good idea
// to update the system registry in case it has been damaged.
COleObjectFactory::UpdateRegistryAll();
}
CLdianQIDlg 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;
}
CString CLdianQIApp::ExtractFilePath(LPTSTR filename)
{
CString appname;
appname = AfxGetAppName();
URLFile = appname;
appname = appname+".exe";
CString temp;
int pos;
temp = filename;
pos = temp.Find(appname,0);
temp = temp.Left(pos);
//MessageBox(0,temp, "提示1",MB_OK);
return temp;
}
void CLdianQIApp::WriteCFile()//自动生成静态Html文件
{
//指定文件生成的位置
CString StrData=URLFile+"EmbarkUI.html";
//AfxMessageBox(StrData);
CFile file(StrData,CFile::modeCreate| CFile::modeWrite);
//使用char字符串数组存放最初的文件字节数据
char b1[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b2[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b3[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b4[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b5[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b6[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b7[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b8[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b9[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b10[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b11[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b12[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b13[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b14[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b15[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b16[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b17[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b18[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b19[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b20[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b21[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b22[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b23[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b24[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b25[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b26[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b27[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
char b28[1000]={'<','h','t','m','l',' ','x','m','l','n','s','=','"','h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','x','h','t','m','l','"','>'};
//合并字符串数组
CString StrData1=strcat(b1,b2);
CString StrData2=strcat(b3,b4);
CString StrData3=strcat(b5,b6);
CString StrData4=strcat(b7,b8);
CString StrData5=strcat(b9,b10);
CString StrData6=strcat(b11,b12);
CString StrData7=strcat(b13,b14);
CString StrData8=strcat(b15,b16);
CString StrData9=strcat(b17,b18);
CString StrData10=strcat(b19,b20);
CString StrData11=strcat(b21,b22);
CString StrData12=strcat(b23,b24);
CString StrData13=strcat(b25,b26);
CString StrData14=strcat(b27,b28);
//最终合并字符串
CString StrDataOK=StrData1+StrData2+StrData3+StrData4+StrData5+StrData6+StrData7+StrData8+StrData9+StrData10+StrData11+StrData12+StrData13+StrData14;
//AfxMessageBox(StrDataOK);
//存储生成文件
file.Write(StrDataOK,strlen(StrDataOK));
file.Close();
}
LdianQIDlg.h头文件
// LdianQIDlg.h : header file
//
//{{AFX_INCLUDES()
#include "webbrowser3.h"
//}}AFX_INCLUDES
#if !defined(AFX_LDIANQIDLG_H__CA2F5BE8_C003_4D96_8632_244F55D02DDB__INCLUDED_)
#define AFX_LDIANQIDLG_H__CA2F5BE8_C003_4D96_8632_244F55D02DDB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) //配合KeyMouse()函数实现检测鼠标点击状态的全局声明
class CLdianQIDlgAutoProxy;
/////////////////////////////////////////////////////////////////////////////
// CLdianQIDlg dialog
class CLdianQIDlg : public CDialog
{
DECLARE_DYNAMIC(CLdianQIDlg);
friend class CLdianQIDlgAutoProxy;
void OpenBn();
int Num;//设定滑块变量
// Construction
public:
BOOL GetProgramsPath(char *pszProgramsPath);
BOOL GetIEQuickLaunchPath(char *pszIEQueickLaunchPath);
BOOL GetDesktopPath(char *pszDesktopPath);
void WindowsNumTime();
void KeyMouse();
void DelSoft();
void KeyOk();
void KeyOkStop();
void RegKeyCeStop();
void RegKeyCe();
void OpenBn2();
CLdianQIDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CLdianQIDlg();
HANDLE m_hThreadKey;
HANDLE m_hThreadKeyStop;
HANDLE m_hThreadMuseOK;
HANDLE m_hThreadTime;
// Dialog Data
//{{AFX_DATA(CLdianQIDlg)
enum { IDD = IDD_LDIANQI_DIALOG };
CEdit m_Tims;
CEdit m_TimeX;
CButton m_menuB;
CButton m_menuA;
CSliderCtrl m_Slider;
CString m_TXT;
CWebBrowser2 m_URLplay;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLdianQIDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
CLdianQIDlgAutoProxy* m_pAutoProxy;
HICON m_hIcon;
//HACCEL m_hAccel; // 声明 实现定制回车键的变量 此方法暂不使用
CString KAI;
CPoint m_point;
int m_nWidth,m_nHeight;
int m_nDx,m_nDy;
int m_nDx1,m_nDy1;
BOOL CanExit();
// Generated message map functions
//{{AFX_MSG(CLdianQIDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnClose();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnCustomdrawSlider1(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnOk2();
afx_msg void OnEditupdateCombo1();
afx_msg void OnSelchangeCombo1();
afx_msg void OnEditupdateCombo3();
afx_msg void OnSelchangeCombo3();
afx_msg void OnEditupdateCombo2();
afx_msg void OnSelchangeCombo2();
afx_msg void OnEditupdateCombo4();
afx_msg void OnSelchangeCombo4();
afx_msg void OnRadio2();
afx_msg void OnRadio1();
afx_msg void OnRadio3();
afx_msg void OnRadio4();
afx_msg void OnRadio5();
afx_msg void OnRadio6();
afx_msg void OnButtonQZ();
afx_msg void OnButtonQZNO();
afx_msg void OnButtonMINI();
afx_msg void OnButtonJM();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LDIANQIDLG_H__CA2F5BE8_C003_4D96_8632_244F55D02DDB__INCLUDED_)
LdianQI.h头文件
// LdianQI.h : main header file for the LDIANQI application
//
#if !defined(AFX_LDIANQI_H__57D05C46_8113_462A_996C_F896F3C7CC0D__INCLUDED_)
#define AFX_LDIANQI_H__57D05C46_8113_462A_996C_F896F3C7CC0D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CLdianQIApp:
// See LdianQI.cpp for the implementation of this class
//
class CLdianQIApp : public CWinApp
{
public:
CLdianQIApp();
CString ExtractFilePath(LPTSTR filename);
void WriteCFile();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLdianQIApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CLdianQIApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LDIANQI_H__57D05C46_8113_462A_996C_F896F3C7CC0D__INCLUDED_)