如何屏蔽CListCtrl控件的右键选上记录的功能?
解决方案 »
- 关于WINDOWS程序设计一书中鼠标那章的一点怀疑,发现了书上说的是错的!!!
- ComboBox下拉框如何隐藏
- 请问VC有没有能实现自动添加空格的插件?
- 为什么我用了SetTimer函数,却没有任何效果?
- 请问哪有清华大学出版社的《基于C++ CORBA高级编程》下?
- 关于CString的奇怪问题?(帮帮我.......)
- 咨询!!!有个人主页的朋友看过来,散分!!
- 下面这段delphi代码的VC版本怎么改?谢谢!100分
- vc++收发广播包问题
- MFC类向导(ClassWizard)的底层是怎么实现的?
- 哪位大哥有好点的报表控件,我急需!
- +++搞分求救,关于wince中的半透明问题的实现+++++
BOOL CuseflashDlg::PreTranslateMessage(MSG* pMsg)
{
// change right button message to left button message by masterz
POINT pt;
pt.x = LOWORD(pMsg->lParam);
pt.y= HIWORD(pMsg->lParam);
CString msg;
CRect rc;
m_flash.GetWindowRect(&rc);
ScreenToClient(&rc);
msg.Format("mouse (%d,%d),flash (%d,%d,%d,%d)",pt.x,pt.y,rc.left,rc.top,rc.right,rc.bottom);
if(pMsg->message==WM_RBUTTONDOWN||pMsg->message==WM_RBUTTONUP||pMsg->message==WM_RBUTTONDBLCLK)
OutputDebugString(msg);
if(rc.PtInRect(pt)||::GetFocus()==m_flash.m_hWnd||pMsg->hwnd==m_flash.m_hWnd)
//if(::GetFocus()==m_flash.m_hWnd)
{
if(pMsg->message==WM_RBUTTONDOWN)
pMsg->message=WM_LBUTTONDOWN;
if(WM_RBUTTONUP==pMsg->message)
pMsg->message = WM_LBUTTONUP;
if(WM_RBUTTONDBLCLK==pMsg->message)
pMsg->message=WM_LBUTTONDBLCLK;
if(pMsg->message==WM_RBUTTONDOWN||pMsg->message==WM_RBUTTONUP||pMsg->message==WM_RBUTTONDBLCLK) OutputDebugString("point in rect");
}
return CDialog::PreTranslateMessage(pMsg);
}