1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error loading custom cursor

Discussion in 'Win32' started by bijan311, Aug 31, 2010.

  1. bijan311

    bijan311 New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    When I try to load a custom cursor into my program using this code

    Code:
     	  wndclass.hCursor        = LoadCursor(NULL, IDC_CROSSHAIR); 
    and it gives me this error

    Code:
     	error: invalid conversion from 'int' to 'const CHAR*' 
    if it helps any, here is my resource.h file

    Code:
    //incon range: 1000 - 1999
    #define IDI_DUCKHUNT 1000
    #define IDI_DUCKHUNT_SM 1001
    
    //Bitmap range: 2000 - 2999
    #define IDB_DUCK 2000
    
    //Cursor range: 4000 - 4999
    #define IDC_CROSSHAIR 4000 
    
    and here is my DuckHunt.rc file (I'm making a bad Duck Hunt clone)
    Code:
    #include "Resource.h"
    
    //Icon
    IDI_DUCKHUNT ICON "Res\\DuckHunt.ico"
    IDI_DUCKHUNT_SM ICON "Res\\DuckHunt_sm.ico"
    
    //Bitmap
    IDB_DUCK BITMAP "Res\\Duck.bmp"
    
    //Curspr
    IDC_CROSSHAIR CURSOR "Res\\CrossHair.cur"
     

Share This Page