HCURSOR CopyCursor(hinst, hcur) | |||||
HINSTANCE hinst; | /* handle of application instance | */ | |||
HCURSOR hcur; | /* handle of cursor to copy | */ |
The CopyCursor function copies a cursor.
hinst
Identifies the instance of the module that will copy the cursor.
hcur
Identifies the cursor to be copied.
The return value is the handle of the duplicate cursor if the function is successful. Otherwise, it is NULL.
When it no longer requires a cursor, an application must destroy the cursor, using the DestroyCursor function.
The CopyCursor function allows an application or dynamic-link library to accept a cursor from another module. Because all resources are owned by the module in which they originate, a resource cannot be shared after the module is freed. CopyCursor allows an application to create a copy that the application then owns.