

Wc.lpfnWndProc = (WNDPROC) MainWndProc // window procedure

Fill the window class structure with parameters that The following example illustrates this by assigning a cursor handle to the hCursor member of the WNDCLASS structure identified by the wc parameter. You can assign a class cursor while registering a window class. The system automatically displays the class cursor (the cursor associated with the window to which the cursor is pointing). It is not necessary to destroy cursors created by other functions. AND maskīefore closing, you must use the Destro圜ursor function to destroy any cursors you created with CreateCursor. To create the cursor, CreateCursor applies the following truth table to the AND and XOR masks. HINSTANCE hinst // handle to current instance The example is included here to illustrate how the system interprets cursor masks. The following example uses the CreateCursor function to create a custom cursor at run time. Rather than create the cursors at run time, use the LoadCursor, LoadCursorFromFile, or LoadImage function to avoid device dependence, to simplify localization, and to enable applications to share cursor designs. You should implement custom cursors as resources. HCurs2 = LoadCursor(hinst, MAKEINTRESOURCE(240)) Create a custom cursor based on a resource. The following example creates two cursor handles: one for the standard hourglass cursor and one for a custom cursor included as a resource in the application's resource-definition file. Using Cursor Functions to Create a Mousetrap.This section discusses the following topics.
