13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Positioning thecursor The SetCursorPos and GetCursorPos functions set and retrievethe current screen coordinates of the cursor. Although the cursorcan be set at a location other than the current mouse location, ifthe system has a mouse, the next mouse movement will redrawthe cursor at the mouse location. The SetCursorPos andGetCursorPos functions are most often used in applications thatuse the keyboard and specified key strokes to move the cursor.Notice that screen coordinates are not affected by the mappingmode in a window's client area.The cursorhotspot andconfining thecursorCreating acustom cursorA cursor has a hotspot. When Windows draws the cursor, italways places the hotspot over the point on the display screenthat represents the current position of the mouse or keyboardDIRECTION key. For example, the hotspot on the pointer is thepoint at the tip of the arrow.The ClipCursor function confines the cursor to a given rectangleon the display screen. The cursor can move to the edge of therectangle but cannot move out of it. ClipCursor is typically usedto restrict the cursor to a given window such as a dialog box thatcontains a warning about a serious error. The rectangle is alwaysgiven in screen coordinates and does not have to be within thewindow of the currently running application.The SetCursor function sets the cursor shape and draws thecursor. When a system has a mouse, Windows automaticallychanges the shape of the cursor when it crosses a window borderor enters a different part of a window, such as a title or menu bar.It uses standard cursor shapes for the different parts of the screen,such as a pointer in a title bar. The SetCursor function lets anapplication delete the standard cursor and draw its own customcursor. The cursor keeps its new shape until the mouse moves or asystem command is carried out.78Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!