BlockInput屏蔽鼠标键盘消息

typedef BOOL (__stdcall *PFNBlockInput)(BOOL fBlockIt);

HMODULE hModule = GetModuleHandle ( "user32.dll" ) ;
if ( hModule == NULL )
{
hModule = LoadLibrary("user32.dll");
}
if(hModule)
{
PFNBlockInput BlockInput;
BlockInput = (PFNBlockInput)GetProcAddress(hModule,"BlockInput");
if(BlockInput)
{
BlockInput(TRUE);
Sleep(30000);
BlockInput(FALSE);
}
FreeLibrary(hModule);
}


 

你可能感兴趣的:(BlockInput屏蔽鼠标键盘消息)