Erich Hoover ehoover@mines.edu writes:
I'm sorry it's taken me so long to get back on this issue, I've been attempting to come up with, and test, an alternative solution. The original patch was approached with a mind toward keeping the code as similar as possible to what is currently done. I have attached a redesign of this patch that instead approaches the problem by storing and retrieving cursors/icons as ICONINFO structures. This mechanism allows the storage of all the necessary bitmap data (bpp, planes, width, etc.) in addition to the hotspot information without relying on a custom structure.
My goal here is to have something simple that can be passed to the driver and can later be extended to animated cursors. In this case the extension would be to pass to pSetCursor() an array of ICONINFO pointers, the total number of frames, and the time between frames. A bonus with this method is that each frame of the cursor could then have a different hotspot (I'm not sure if anyone has actually ever used this in an animated cursor, but it is possible from what I've seen of the format). Anyway, I am hoping that the attached patch is more palatable and I am interested in any and all comments or suggestions.
That's clearly better, it's going in the right direction. I think the first step should be to write more test cases, in particular for cursor bitmaps that don't match the screen depth, I suspect that still doesn't work right when going through DDBs. Also we'd need to know exactly how GetIconInfo() behaves for animated cursors.