Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore default cursor
Message
De
10/08/1997 19:18:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00043737
Message ID:
00043929
Vues:
44
I didn't find any API function to do that (it doesn't mean there's not). You can find the current scheme in the registry: HKEY_CURRENT_USER\Control Panel\Cursors. I don't know how to restore the scheme. Maybe if you change the key for a mouse cursor in the registry?

Sorry, I don't have time to test/study it know.

Vlad

>I could be wrong, but I guess Bruce is looking for something like restoring the current scheme of mouse pointers (See ControlPanel-Mouse-Pointers). I just know it's accesible through control panel, unfortunately I do not master the knowledgde of winapi. Would there be such a function in winapi, similar to Fox's SET COLOR SET TO SomethingSavedPreviously, to Save/Restore the entire scheme of 14 mouse pointers ?
>Thanks,
>Sorin
>
>
>>I'm not sure I understand what you mean by "Win95 cursor/object relationships". BTW, I don't have a Reset button in the Control Panel's mouse settings.
>>
>>But I think I understood what you want. You change a system cursor and after that you want to reset it to whatever it was previously, isn't it? (BTW, this doesn't depend on VFP's objects.) One way to do it is to call SetSystemCursor, first param the default value for the system cursor specified as the second param. Ex: SetSystemCursor( 5374, 32512) to reset the normal arrow cursor. The problem is that if the sytem cursor was something else than the Windows' default one, it will be reset to the default.
>>
>>To get the default value for a system cursor, use the GetCursor() win32API (declare integer GetCursor in Win32API). (I couldn't find any other API function for this goal.) The mouse cursor must be the one you want to retrieve in the moment when GetCursor is executed. You can use the following function assigned to a functional key:
>>
>>declare integer GetCursor in Win32API
>>? GetCursor()
>>
>>Assign this code to a functional key, position the mouse over something so it will take the shape you want, press the functional key. I hope it will also work for the hourglass if you run something long.
>>
>>Also, did you tried Vladimir Shevchenko's SysInfo class? I haven't tried it, but he says it does what you want. If it doesn't, tell him and maybe he can enhance it.
>>
>>Vlad
>>
>>>Hi Vlad -- what we're looking for is a function to reset to user's settings all Win95 cursor/object relationships simultaneously, so that it's independent of any individual object or cursor. Exactly what you get when you click on the Reset button in the Control Panel Mouse Icon. You wouldn't happen to know of a programmatic way to do this? Or is this possible?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform