Thread: Loading a cursor

  1. #1
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343

    Angry Loading a cursor

    how the hell do you do it? i made my own custom cursor, and it wont load when i put the function in

    WndClass.hCursor = LoadCursor(NULL, IDC_MAINCUR1);

    or whatevere now see this is jut me, but is till dont know how to do it just yet, and i would like some com[plete help, like do i need to input some special stuyfff in a header file and what do i put in the main cpp file to load the cursor i need, so lets just pretend that the cursors file name is maincur1.cur. i know you need to put something that defines it in a header file, but i dont know how to do tha.

    and would the same thing be needed to load a custom icon?
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Not sure, but you might have to specify a HINSTANCE argument instead of just NULL. Pass the first argument that is passed to WinMain.

    Second, add the cursor to your resources, give it an ID, then use:
    Code:
    LoadCursor(hInstance, MAKEINTRESOURCE(MyCursorID));
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cargo loading system
    By kyle rull in forum C Programming
    Replies: 1
    Last Post: 04-20-2009, 12:16 PM
  2. loading cursor in allegro
    By GaPe in forum Game Programming
    Replies: 4
    Last Post: 05-03-2003, 05:50 AM
  3. Cursor Loading and changing in Win32
    By Josh Kasten in forum C++ Programming
    Replies: 3
    Last Post: 01-19-2003, 01:23 PM
  4. cursor remains in openGL fullscreen
    By Ken Fitlike in forum Game Programming
    Replies: 5
    Last Post: 03-14-2002, 08:52 PM
  5. Mouse in 800x600 24Bit Mode?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 11-11-2001, 01:38 AM