Hi,
I have a Dialog app that has WM_ONMOUSEMOVE message map function created from which I catch a certain area of the window. When the cursor is over this area I wish to change to default arrow cursor with one of my own.
The problem that I have is that the code below compiles and runs, but when over my chosen area the cursor dissapears. Within the WM_ONMOUSEMOVE function I have the following code :-
I have tried all permatations using this function and the now redundant LoadCursor(), CopyCursor(), ShowCursor()plus other functions.
Any help appreciated.
If it is not broke, don't fix it!!!
I have a Dialog app that has WM_ONMOUSEMOVE message map function created from which I catch a certain area of the window. When the cursor is over this area I wish to change to default arrow cursor with one of my own.
The problem that I have is that the code below compiles and runs, but when over my chosen area the cursor dissapears. Within the WM_ONMOUSEMOVE function I have the following code :-
Code:
LPCTSTR myCursor = "IDC_CURSOR1" [COLOR=green]// my cursor created in the editor and listed in the resource.h file[/color]
HINSTANCE hInstance;
hInstance = AfxGetInstanceHandle(); [COLOR=green]// catch a handle to the window[/color]
HCURSOR hCursor;
hCursor = (HCURSOR) LoadImage
(hInstance,
myCursor,
IMAGE_CURSOR,
32,
32,
NULL
);
::SetCursor(hCursor);
I have tried all permatations using this function and the now redundant LoadCursor(), CopyCursor(), ShowCursor()plus other functions.
Any help appreciated.
If it is not broke, don't fix it!!!