The following code sets the mouse cursor to the waiting state and back to its default before:

	HCURSOR hCursorWait;
	HCURSOR hCursorDefault;
	hCursorWait = LoadCursor(NULL,IDC_WAIT);
	hCursorDefault = ::SetCursor(hCursorWait);
 
	::SetCursor(hCursorDefault);