解决方案 »
- 请问关于runtime error
- 求助:在类中多定义了几个数组,程序报错!?
- 急急!关于CoCreateInstance()问题。
- 跪求。初学VC++所遇到的可能是安装的问题。
- 本公司招图形设计方面的程序员
- SQL Sever2000如何实现不同数据库间的数据查询插入?急丙
- 关于灵活运用控件的问题
- 求助:SendARP()返回的结果显示返回的字节数为0,错误代码用FormatMessage()显示为“连接到系统上的设备没有发挥作用”。可是我的网络明
- 如何设置RichEdit的行距
- MFC中使用直接使用API会不会有损OO的特性??
- error:failed to (or don't know how to) build ---APPMODUL.CPP怎么办呢?
- CPU占用问题!
双开双待~
HANDLE Wnd,CurrWnd;
HDC DDC;
COLORREF Col;
BYTE R,B,G;
CRect rrect;
CPoint point1;
{
Wnd=FindWindow("CnBox",NULL);
if(Wnd!=0)
{
DDC==GetDC(Wnd);
Col==GetPixel(DDC,732,504);
R==GetRValue(Col);
B==GetBValue(Col);
G==GetGValue(Col);
if ((R<=255)&& (R>250) && (G>233) && (G<240)&&(B>125)&&(B<130)
{
Col=GetPixel(DDC,726,507);
R=GetRValue(Col);
B=GetBValue(Col);
G=GetGValue(Col);
if ((R==0) and (B==0) and (G==0)
{
Col=GetPixel(DDC,727,514);
R=GetRValue(Col);
B=GetBValue(Col);
G=GetGValue(Col);
if ((R<=255)&& (R>=253)&& (G>200)&&(G<210)&&(B>10)&&(B<=15))
{
CurrWnd=GetForegroundWindow;
if (CurrWnd==Wnd)
{
GetWindowRect(CurrWnd,&rrect);
GetCursorPos(&point1);
SetCursorPos(rrect.Right-70,rrect.Bottom-80);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(100);
SetCursorPos(point1.X,point1.Y);
//mouse_event(MOUSEEVENTF_MOVE,rrect.Right-70,rrect.Bottom-80,0,0);
}
}
}}
}
}
HDC DDC;
COLORREF Col;
BYTE R,B,G;
CRect rrect;
CPoint point1;
{
Wnd=FindWindow("CnBox",NULL);
if(Wnd!=0)
{
DDC==GetDC(Wnd);
Col==GetPixel(DDC,732,504);
R==GetRValue(Col);
B==GetBValue(Col);
G==GetGValue(Col);
if ((R<=255)&& (R>250) && (G>233) && (G<240)&&(B>125)&&(B<130)
{
Col=GetPixel(DDC,726,507);
R=GetRValue(Col);
B=GetBValue(Col);
G=GetGValue(Col);
if ((R==0) and (B==0) and (G==0)
{
Col=GetPixel(DDC,727,514);
R=GetRValue(Col);
B=GetBValue(Col);
G=GetGValue(Col);
if ((R<=255)&& (R>=253)&& (G>200)&&(G<210)&&(B>10)&&(B<=15))
{
CurrWnd=GetForegroundWindow;
if (CurrWnd==Wnd)
{
GetWindowRect(CurrWnd,&rrect);
GetCursorPos(&point1);
SetCursorPos(rrect.Right-70,rrect.Bottom-80);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(100);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(100);
SetCursorPos(point1.X,point1.Y);
//mouse_event(MOUSEEVENTF_MOVE,rrect.Right-70,rrect.Bottom-80,0,0);
}
}
}}
}
}