View Single Post
  #13 (permalink)  
Old 03-28-2007, 04:05 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 299
Karpagarajan is on a distinguished road
Default Re: VC++ Tips & Tricks

hi, Do you know How to change the cursor in a form?

Here is the simple tips for changing the cursor.

Add the WM_SETCURSOR message handler .
LRESULT OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{

//HICON hIconBang = LoadCursor(0,MAKEINTRESOURCE(IDC_LEFTC)); // pApp->LoadCursor( IDC_BANG );
HCURSOR h=::AfxGetApp()->LoadCursor(IDC_LEFTC);
::SetCursor( h );
return 0;
}
thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Reply With Quote