Hardy
May 3rd, 1999, 01:31 AM
Hi,
I'm totally stucked and cannot find any solution to the following question:
I use CRectTracker objects in my application. I added the code for changing the mousecursor depending on the position of the mouse over the object. Unfortunately the mouse pointer disappears now every time I enter the client area of the CRectTracker. During debugging I found that in the Construct()-function of CRectTracker the ::LoadCursor()-function only retruns NULL-pointers. So the HCURSOR array _afxCursors[] is not setup properly.
I think that the reason for that is, that already the call of AfxFindresourceHandle(...) returns with a wrong value - but anyway, has anybody a idea what's going on? I tried so many things, but I only get NULL-pointers.
CRectTracker::Construct()
{ ...
HINSTANCE hInst = AfxFindResourceHandle(
MAKEINTRESOURCE(AFX_IDC_TRACK4WAY),RT_GROUP_CURSOR);
// initialize the cursor array
_afxCursors[0] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNWSE));
_afxCursors[1] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNESW));
_afxCursors[2] = _afxCursors[0];
_afxCursors[3] = _afxCursors[1];
_afxCursors[4] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNS));
_afxCursors[5] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKWE));
_afxCursors[6] = _afxCursors[4];
_afxCursors[7] = _afxCursors[5];
_afxCursors[8] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACK4WAY));
_afxCursors[9] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_MOVE4WAY));
...
}
\/// *have a lot of fun*
(o -) %2
I'm totally stucked and cannot find any solution to the following question:
I use CRectTracker objects in my application. I added the code for changing the mousecursor depending on the position of the mouse over the object. Unfortunately the mouse pointer disappears now every time I enter the client area of the CRectTracker. During debugging I found that in the Construct()-function of CRectTracker the ::LoadCursor()-function only retruns NULL-pointers. So the HCURSOR array _afxCursors[] is not setup properly.
I think that the reason for that is, that already the call of AfxFindresourceHandle(...) returns with a wrong value - but anyway, has anybody a idea what's going on? I tried so many things, but I only get NULL-pointers.
CRectTracker::Construct()
{ ...
HINSTANCE hInst = AfxFindResourceHandle(
MAKEINTRESOURCE(AFX_IDC_TRACK4WAY),RT_GROUP_CURSOR);
// initialize the cursor array
_afxCursors[0] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNWSE));
_afxCursors[1] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNESW));
_afxCursors[2] = _afxCursors[0];
_afxCursors[3] = _afxCursors[1];
_afxCursors[4] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKNS));
_afxCursors[5] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACKWE));
_afxCursors[6] = _afxCursors[4];
_afxCursors[7] = _afxCursors[5];
_afxCursors[8] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_TRACK4WAY));
_afxCursors[9] = ::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_MOVE4WAY));
...
}
\/// *have a lot of fun*
(o -) %2