i have a listview and i need to display a differnt cursor than the resizing arrows cursor thats diplayed when the mouse hovers over the seperation lines that divide up the header. how would i go about this? thanks smurf
Posted on 2001-05-30 19:34:00 by smurf
You could put the cursor in the resource file and use LoadImage to get a handle to the cursor and when the mouse is above the appropriate spot use SetCursor(don't forget to reset the cursor back to its previous image)
Posted on 2001-06-05 17:10:00 by brewmanchu
smurf, I've had a think about this, and I have a couple of thoughts.... 1. Why? 2. You're going to have to subclass the control, and find out what happens when you pass the cursor over the separation header, I know from using MFC that it's a separate window, perhaps you just need to subclass that one. Do you have Spy++ - that really helps in this sort of situation, I can have a fiddle with it today if you want and find a bit more about this out. Let me know if that will help. umbongo
Posted on 2001-06-06 04:01:00 by umbongo
umbongo that would be great if you could look into it for me. ive finally figured out how to prevent the resizing of my header control in my listview. now i just need to get rid of the sizing handles when the mouse moves over the dividers. thanks smurf
Posted on 2001-06-06 05:03:00 by smurf
Smurf, After a little checking in SPY++ I've found that, indeed it's a different window, it's called "SysHeader32" and it is a child window of the list view control. when the mouse moves over it you see all the normal messages, but what it does is call WM_SETCURSOR over the edges of the titles. I think the best way to do this is to subclass this window, and wait until it gets a WM_SETCURSOR, then 'eat' the mssage, that should prevent the cursor changing.... There is a setting you can use when you create the ListView that will make it 'read-only' so it won't resize, be clickable, or anything like that - why aren't you using that? umbongo This message was edited by umbongo, on 6/6/2001 5:58:30 AM
Posted on 2001-06-06 05:57:00 by umbongo
i didnt realize there is a setting to prevent resizing but if it also prevents the user from clicking on the listview then that setting wouldnt work out for me. what setting are you refering to? smurf
Posted on 2001-06-06 19:40:00 by smurf
Hmmm... Sorry I seem to have made a mistake, I can't find it either, there is a setting for making the header 'unsortable', but it doesn't prevent the resizing taking place. Sorry if I mis-led you :P umbongo
Posted on 2001-06-07 03:48:00 by umbongo