一个用IE控件浏览文档的程序,我需要禁止用户通过IE控件进入资源管理器,就需要屏蔽鼠标右键.现在对于用鼠标右键产生的消息已经屏蔽了,由于键盘上的菜单键也有这个功能,请问是否可以通过注册表进行屏蔽,让该键无效.如果不行还有其他什么方法吗?操作系统采用WIN2K.因为曾经有一篇文章报道说有恶意网站屏蔽了作者的鼠标右键和键盘菜单键.情况很紧急,请给予帮助,谢谢.
解决方案 »
- VC2008调试下,怎么样才能看到变量地址
- 请叫一个Invoke参数的问题
- AUTOCAD2008 将.dwg文件输出为.wmf文件后。怎么没有找到wmf文件呢?搜索硬盘文件就只有wmf文件的快捷方式。
- debug版本的程序使用release版本的静态lib库,报错,链接错误信息是:class type_info already define in MSVCRT.LIB
- 如何设置Date Time Picker控件初始值
- 关于clistctrl控件中item自动向上滚动的问题
- 把DirectX Sdk 7里的所有*.h放到C:\Program Files\Microsoft Visual Studio\VC98\Include中还是无法编译DirectX的工程
- 如何将String串转变为char串?
- MFC的几个小问题,希望高人指点, 不甚感激!
- MFC扩展DLL在模块释放的时候断言出错 dllmodul.cpp #230
- 请问一个关于从editbox输入数学表达式计算的问题
- ODBC怎样连接SQL server数据库?
{
BOOL fEatKeystroke = TRUE ;
BOOL ppFlag ; if ( retestflag == 0 )
{
EnableMenuItem (hMenu, IDM_APP_RETEST, MF_ENABLED) ;
retestflag ++;
}
if ( nCode == HC_ACTION )
{
switch (wParam)
{
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
pp = (PKBDLLHOOKSTRUCT)lParam ;
if ( pp->scanCode == current->scanCode )
{
ppFlag = TRUE ; if ( pp->scanCode == 0x1D ) // Discriminate left Ctrl and right Ctrl
{
if( (pp->flags & LLKHF_EXTENDED) == 0 && lCtr.status == Active && rCtr.status == Ready
|| (pp->flags & LLKHF_EXTENDED) == 1 && lCtr.status == Hide && rCtr.status == Active )
{
ppFlag = TRUE ;
}
else ppFlag = FALSE ;
} if ( pp->scanCode == 0x38 ) // Discriminate left Alt and right Alt
{
if( (pp->flags & LLKHF_EXTENDED) == 0 && lAlt.status == Active && rAlt.status == Ready
|| (pp->flags & LLKHF_EXTENDED) == 1 && lAlt.status == Hide && rAlt.status == Active )
{
ppFlag = TRUE ;
}
else ppFlag = FALSE ;
} if ( pp->scanCode == 0x52 ) // Discriminate Ins and Fn+M
{
if( (pp->flags & LLKHF_EXTENDED) == 1 && Ins.status == Active && Fn.status == Ready
|| (pp->flags & LLKHF_EXTENDED) == 0 && Ins.status == Hide && Fn.status == Active )
{
ppFlag = TRUE ;
}
else ppFlag = FALSE ;
} if ( pp->scanCode == 0x4D ) // Display Fn+M
{
hdc = GetDC (hwnd) ;
MM.status = Active ;
ShowKey (hwnd, MM.xLeft, MM.yTop, MM.xRight,
MM.yBottom, MM.status, MM.name) ; ReleaseDC (hwnd, hdc) ;
} if( ppFlag == TRUE )
{
hdc = GetDC (hwnd) ; current -> status = Hide ;
ShowKey (hwnd, current->xLeft, current->yTop, current->xRight,
current->yBottom, current->status, current->name) ; current = current->next ;
current -> status = Active ; ShowKey (hwnd, current->xLeft, current->yTop, current->xRight,
current->yBottom, current->status, current->name) ;
ReleaseDC (hwnd, hdc) ;
}
}
if ( current->next == NULL )
{
result = 0; // if all pass , return 0
PaintTheBlock(hwnd, result );
Sleep(1000);
QUIT();
}
break; case WM_KEYUP:
case WM_CHAR:
case WM_DEADCHAR:
case WM_SYSKEYUP:
case WM_SYSCHAR:
case WM_SYSDEADCHAR: break ; }
} return(fEatKeystroke ? 1 : CallNextHookEx(NULL,nCode,wParam,lParam));
}