Sets the window's cursor, returning the previous cursor. A null instead of a cursor value removes the window's cursor or indicates that it has no cursor.
If a window does not have a cursor, it uses the cursor of its parent. Frames and dialog boxes start with the standard arrow cursor, and text controls start with an I-beam cursor. All other windows are created without a cursor.