-
Use LoadCursor to load the Hand Cursor (in WM_INITDIALOG, and store in global HCURSOR variable):
i.e.
hHandCursor = LoadCursor(NULL, IDC_HAND);
Use SetCursor in the WM_MOUSEMOVE handler to change the cursor to the hand cursor.
i.e.
SetCursor(hHandCursor);
-
Thanks for the hand cursor.
Regarding the Mouseover, I notice one thing.
If I minimize my application, the bmpHilight will change back to bmpNormal, while the Dialog is still open.
I open my application, click on one bitmap button, to open a dialog, the mouse over procedure is fine. So, now the bitmap button is in Highlighted state. Then I minimized my application, then maximize again. I will see the bitmap button is in Normal State, and the dialog is still opened.
Are you aware of this ? Any reason why ?
-
No, I have not seen that. I tested for that with the sample app, and the bitmap did not change upon minimize/restore.
I am not sure what would be causing that. Do you have any resizing code that may be affecting the handle of the bitmap? Make sure all your case statements are seperated with break statements (or returns), so that one case statement does not fall through to another (unless it is intended to be that way), etc. Try setting breakpoints on any lines that change the bitmap back to normal, and see if one of them fires after minimize/restore. Try adding a watch in the debugger on the handle for the bitmap and see if the value changes after you minimize/restore.
Without being able to see your code, it is hard to say what might be causing it, but I think you should be able to track down the problem using the debugger, etc.