入戏代码的程序:
#include <Windows.h>
int WINAPI WinMain (HINSTANCE hInstanceExe, HINSTANCE ,PTSTR pszCmdLine, int nCmdShow)
{
BOOL theGetCursorPosReturn;
POINT theMousePosLast, theMousePosNext;
SHORT Return_GetAsyncKeyState = 0 ;
theGetCursorPosReturn = GetCursorPos (&theMousePosLast);
for ( int i=0x01; i<=0xFE; i++ )
{
Return_GetAsyncKeyState = GetAsyncKeyState ( i );
}
while ( 1 )
{
Sleep ( 100 );
theGetCursorPosReturn = GetCursorPos (&theMousePosNext);
if ( theMousePosLast.x != theMousePosNext.x || theMousePosLast.y != theMousePosNext.y )
{
return 0;
}
for ( int i=0x01; i<=0xFE; i++ )
{
Return_GetAsyncKeyState = GetAsyncKeyState ( i );
if ( Return_GetAsyncKeyState != 0 )
{
return 0;
}
}
}
}
当做屏幕保护程序运行后,桌面只显示壁纸,并且ctrl+alt+del才能退出到欢迎屏幕(设置的退出屏保时返回欢迎屏幕)。
------解决方案--------------------
for里面应该用 与 吧!