when I change my mouse cursor,cursor always flash,why?
Printable View
when I change my mouse cursor,cursor always flash,why?
If you're using a CView derived class you can do like this to prevent flickering!
1: Set the cursor
::SetCursor(m_Cursor);
2: Tell the system not to change back the cursor
CYourView::OnSetCursor(....)
{
return TRUE;
}
This prevent the system to set the normal cursor!
If you don't have a view, you can set the cursor by theese few lines
::SetClassLong(this->GetSafeHwnd(),GCL_HCURSOR,cursor);
::SetCursor(cursor);
/Markus