在客户端可以直接
BOOL CPaneSideBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
if (m_bHit)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_SIZEWE));
}
else if(m_bHit == FALSE)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_ARROW));
}
return CPane::OnSetCursor(pWnd, nHitTest, message);
}
在html网页中使用防止鼠标改变
BOOL CPaneSideBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
if (m_bHit)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_SIZEWE));
return TRUE;//return
}
else if(m_bHit == FALSE)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_ARROW));
return CPane::OnSetCursor(pWnd, nHitTest, message);//这个函数最终会把光标设置为系统默认光标
}
}
BOOL CPaneSideBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
if (m_bHit)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_SIZEWE));
}
else if(m_bHit == FALSE)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_ARROW));
}
return CPane::OnSetCursor(pWnd, nHitTest, message);
}
在html网页中使用防止鼠标改变
BOOL CPaneSideBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
if (m_bHit)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_SIZEWE));
return TRUE;//return
}
else if(m_bHit == FALSE)
{
::SetClassLongPtr(m_hWnd, GCL_HCURSOR, (long)NULL);
::SetCursor(LoadCursor(NULL, IDC_ARROW));
return CPane::OnSetCursor(pWnd, nHitTest, message);//这个函数最终会把光标设置为系统默认光标
}
}