You can try this code - it may work as expected under XP:
Code:
#define OEMRESOURCE
#include <windows.h>
#include <iostream>
#include <cassert>
using namespace std;
HANDLE LoadNoShareCursor(UINT ocr_id)
{
HANDLE tmp = LoadImage(0, MAKEINTRESOURCE(ocr_id), IMAGE_CURSOR,
0, 0, LR_SHARED);
if (!tmp)
return 0;
return CopyImage(tmp, IMAGE_CURSOR, 0, 0, 0);
}//LoadNoShareCursor
int main()
{
HANDLE hWait = LoadNoShareCursor(OCR_WAIT);
assert(hWait);
HANDLE hArrow = LoadNoShareCursor(OCR_NORMAL);
assert(hArrow);
cout << "Changing normal cursor to wait cursor" << endl;
BOOL ret = SetSystemCursor((HCURSOR)hWait, OCR_NORMAL);
assert(ret);
// sleep for a while so the user can play with the cursor
cout << "Sleeping for 15 seconds" << endl;
Sleep(15 * 1000);
// restore the arrow cursor
ret = SetSystemCursor((HCURSOR)hArrow, OCR_NORMAL);
assert(ret);
cout << "Cursors restored, sleeping for 10 seconds" << endl;
Sleep(10 * 1000);
cout << "Done" << endl;
return 0;
}//main
gg