Data Access Worldwide Knowledge Base

Article ID 2059
Article Title PROBLEM: Cursor disappears when set to IDC_ICON or IDC_SIZE
Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2059
KBase Category VDF (GENERAL)
Date Created 11/12/2004
Last Edit Date 11/19/2004


Article Text
PROBLEM:
According to the documentation of the Cursor property (CursorShape class), using the constant IDC_SIZE should change the cursor to "a rectangle with a smaller rectangle in the lower right corner".
If that value is used, however, the cursor disappears.


SOLUTION:
The current cursor types listed in the Cursor.pkg are:

IDC_APPSTARTING
Standard arrow and small hourglass

IDC_ARROW
Standard arrow

IDC_CROSS
Crosshair

IDC_IBEAM
I-beam

IDC_ICON
Obsolete for applications marked version 4.0 or later. Use IDC_ARROW.

IDC_NO
Slashed circle

IDC_SIZE
Obsolete for applications marked version 4.0 or later. Use IDC_SIZEALL.

IDC_SIZEALL
Four-pointed arrow pointing north, south, east, and west

IDC_SIZENESW
Double-pointed arrow pointing northeast and southwest

IDC_SIZENS
Double-pointed arrow pointing north and south

IDC_SIZENWSE
Double-pointed arrow pointing northwest and southeast

IDC_SIZEWE
Double-pointed arrow pointing west and east

IDC_UPARROW
Vertical arrow

IDC_WAIT
Hourglass


Since Microsoft(*) changed IDC_ICON and IDC_SIZE to obsolete, nothing will be displayed, i.e. the cursor will disappear. You should replace those values with the recommended replacements: IDC_ARROW and IDC_SIZEALL. Any invalid value will change the cursor to NULL, i.e. the cursor will not be displayed.


(*) See MSDN information at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/cursors/cursorreference/cursorfunctions/loadcursor.asp?frame=true


Contributed By:
Marcia Booth
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com

Web Links Related to this Article
MSDN - LoadCursor Function
URL=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/cursors/cursorreference/cursorfunctions/loadcursor.asp?frame=true


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.