Cursor does not show up?

Resource File

RedXCursor CURSOR "redxico1.cur"


Header File

#ifndef REDXWIN_H_INCLUDED
#define REDXWIN_H_INCLUDED

#define REDX_WINDOW 1002
#define REDX_MENU 1007
#define Seth_Dialog 1000007
#define Men2Button1 101
#define Men2Button2 102
#define Men2Button3 103
#define Men2Button4 104
#define Men3Button1 1008
#define Men3Button2 1009
#define Men3Button3 1010
#define Men3Button4 1011
#define Men3Button5 1012
#define Men1Button1 1001
#define Men1Button2 1003
#define Men1Button3 1004
#define Men1Button4 1005
#define Men1Button5 1006
#define RedXCursor 2003


The part of the code that is not working
Take in mine there are no errors.

wc.hCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(RedXCursor));
bump
bump
write all the code so I can understand
Last edited on
bump
Do you need the ful cpp file? I have given you the full header, and full resource file.
give me the full one so I can see...
go to pastebin.com and give me your link
http://pastebin.com/UDGdtWjh




I stoped my whole load function for it, cause it was irrelevent to use it when it did not work, but there is my code.
MSDN documentation states the following:
Your application can change the design of the cursor by using the SetCursor function and specifying a different cursor handle. However, when the cursor moves, the system redraws the class cursor at the new location. To prevent the class cursor from being redrawn, you must process the WM_SETCURSOR message. Each time the cursor moves and mouse input is not captured, the system sends this message to the window in which the cursor is moving.

You can specify different cursors for different conditions while processing WM_SETCURSOR. For example, the following example shows how to display the cursor whenever the cursor moves over the icon of a minimized application.


1
2
3
4
5
6
7
8
9
10
11
case WM_SETCURSOR: 
 
    // If the window is minimized, draw the hCurs3 cursor. 
    // If the window is not minimized, draw the default 
    // cursor (class cursor). 
 
    if (IsIconic(hwnd)) 
    { 
        SetCursor(hCurs3); 
        break; 
    } 


http://msdn.microsoft.com/en-us/library/windows/desktop/ms648380%28v=vs.85%29.aspx#_win32_Creating_a_Cursor
THIS MAY BE THE PROBLEM


1
2
3
4
 
// Register the window class. 
 
return RegisterClass(&wc); 


I dont see you having registered the class
What is IsIconic?
A while back I did not newed the SetCursor, it worked entirely on its own :o
Topic archived. No new replies allowed.