A
Arsen V.
Hi Igor,
I asked you this before and you suggested that I use SetWindowsHookEx to
change the cursor for the IE window from within my toolbar control.
Currently I am doing the following:
In my ChangeCursor() function
....
myHook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)CallWndProc, NULL,
GetCurrentThreadId());
....
In my CallWndProc() function
LRESULT WINAPI CallWndProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (((CWPSTRUCT*)lParam)->message = WM_SETCURSOR)
{
// Change cursor
HCURSOR hCurs = LoadCursorFromFile("c:\\b.cur");
HCURSOR hPrevCurs = SetCursor(hCurs);
}
return CallNextHookEx(myHook, nCode, wParam, lParam);
}
When I test this, the cursor does not get changed.
When I debug and set a breakpoint in the //Change cursor section, I see that
program execution gets to this point. I also see that hCurs and hPrevCurs
get assigned not NULL values.
What am I doing wrong?
Thanks,
Arsen
I asked you this before and you suggested that I use SetWindowsHookEx to
change the cursor for the IE window from within my toolbar control.
Currently I am doing the following:
In my ChangeCursor() function
....
myHook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)CallWndProc, NULL,
GetCurrentThreadId());
....
In my CallWndProc() function
LRESULT WINAPI CallWndProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (((CWPSTRUCT*)lParam)->message = WM_SETCURSOR)
{
// Change cursor
HCURSOR hCurs = LoadCursorFromFile("c:\\b.cur");
HCURSOR hPrevCurs = SetCursor(hCurs);
}
return CallNextHookEx(myHook, nCode, wParam, lParam);
}
When I test this, the cursor does not get changed.
When I debug and set a breakpoint in the //Change cursor section, I see that
program execution gets to this point. I also see that hCurs and hPrevCurs
get assigned not NULL values.
What am I doing wrong?
Thanks,
Arsen