Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs there any smart people? Pin
5-Jul-01 21:39
suss5-Jul-01 21:39 
AnswerRe: Is there any smart people? Pin
6-Jul-01 3:34
suss6-Jul-01 3:34 
GeneralRe: Is there any smart people? Pin
6-Jul-01 4:15
suss6-Jul-01 4:15 
AnswerRe: Is there any smart people? Pin
#realJSOP6-Jul-01 4:45
professional#realJSOP6-Jul-01 4:45 
GeneralRe: Is there any smart people? Pin
6-Jul-01 12:34
suss6-Jul-01 12:34 
GeneralRe: Is there any smart people? Pin
Sunitha L25-Sep-02 11:22
Sunitha L25-Sep-02 11:22 
GeneralRe: pointer to a function Pin
@deel@bbas5-Jul-01 20:11
@deel@bbas5-Jul-01 20:11 
Generalchanging the cursor Pin
Alex Griffing5-Jul-01 18:09
Alex Griffing5-Jul-01 18:09 
Hi!
I'm trying to set the mouse to a custom cursor while it's in the client window.
I made a cursor with myhcur = CreateCursor(...)
I tried SetCursor(myhcur), but it got immediately changed back to the normal arrow cursor.
So then I tried changing the system cursor from arrow to my custom cursor, which I did with SetSystemCursor(myhcur, 32512). I used 32512 instead of OCR_NORMAL because the compiler thought it was an undefined symbol even when I'd included winuser.h. So now I have my own custom cursor instead of the arrow and everything works great.

The problem is that I can't switch back. I've tried each of
hnormal = (HCURSOR) LoadImage(0, (char *) 32512/*OCR_NORMAL*/, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE);
and
hnormal = LoadCursor(0, IDC_ARROW);

But when I try to set these back when my program ends, SetSystemCursor(hnormal, 32512) returns no error but doesn't change the cursor back. Smile | :) ...Confused | :confused: ...Cry | :(( ...Mad | :mad:

GeneralRe: changing the cursor Pin
5-Jul-01 18:12
suss5-Jul-01 18:12 
GeneralRe: changing the cursor Pin
Alex Griffing5-Jul-01 18:20
Alex Griffing5-Jul-01 18:20 
GeneralDebuggung question Pin
Michael Martin5-Jul-01 17:30
professionalMichael Martin5-Jul-01 17:30 
Questionwhere is the mouse? Pin
Alex Griffing5-Jul-01 15:04
Alex Griffing5-Jul-01 15:04 
AnswerRe: where is the mouse? Pin
Tomasz Sowinski5-Jul-01 23:52
Tomasz Sowinski5-Jul-01 23:52 
GeneralHTTP Post Question Pin
Cabadam5-Jul-01 14:27
Cabadam5-Jul-01 14:27 
Generalifstream question Pin
5-Jul-01 13:10
suss5-Jul-01 13:10 
GeneralRe: ifstream question Pin
Christian Graus5-Jul-01 13:22
protectorChristian Graus5-Jul-01 13:22 
GeneralRe: ifstream question Pin
5-Jul-01 13:25
suss5-Jul-01 13:25 
Generalbasic c/c++ question (const related) Pin
Alex Griffing5-Jul-01 12:12
Alex Griffing5-Jul-01 12:12 
GeneralRe: basic c/c++ question (const related) Pin
5-Jul-01 18:20
suss5-Jul-01 18:20 
GeneralRe: basic c/c++ question (const related) Pin
Malcolm McMahon5-Jul-01 22:35
Malcolm McMahon5-Jul-01 22:35 
GeneralProcess Directory Pin
John Uhlenbrock5-Jul-01 11:26
John Uhlenbrock5-Jul-01 11:26 
GeneralRe: Process Directory Pin
Christian Graus5-Jul-01 12:15
protectorChristian Graus5-Jul-01 12:15 
GeneralRe: Process Directory Pin
John Uhlenbrock5-Jul-01 12:18
John Uhlenbrock5-Jul-01 12:18 
GeneralRe: Process Directory Pin
Christian Graus5-Jul-01 12:28
protectorChristian Graus5-Jul-01 12:28 
GeneralRe: Process Directory Pin
John Uhlenbrock5-Jul-01 12:32
John Uhlenbrock5-Jul-01 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.