OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Accessing TCursor

You can access TCursor through an HCURSOR.

To get an HCURSOR from a TCursor object, use the HCURSOR() operator with the TCursor object as the parameter. The HCURSOR() operator, listed below, is almost never explicitly invoked:

TMyCursor::GetHCursor()
{
return *this;
}

This code automatically invokes the HCURSOR() conversion operator to cast the TCursor object to the correct type.

The other access function in TCursor, called TCursor::GetIconInfo, is available for 32-bit applications only. GetIconInfo takes as its only parameter a pointer to a ICONINFO structure. The function fills out the ICONINFO structure and returns true if the operation was successful. For example, suppose you create an cursor object, then want to extract the cursor data into an ICONINFO structure. The code would look something like this:

// Load stock cursor - slashed circle
TCursor cursor(NULL, IDC_NO);
cursor.GetIconInfo(&cursorInfo);

See Also