How to change the cursor for a Text Control
-
Hi i am using a Text Control having caption as "SHOW" . i want to change to cursor when the user makes a mouse move over it . I am unable to do that .. Please provide the comments so that i can change the mouse from standard arrow to hand cursor.
I like CPallini's reply - it's a good hacky one! But if you're using MFC, it's also worth reading the following article: http://www.codeproject.com/KB/miscctrl/hyperlink.aspx[^] You can just remove the painting stuff from his article, and it will still show a cursor of your choice. And it should be a good learning exercise for the future. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
You possibly need
SetClassLong(hTextWnd, GCL_HCURSOR, (LONG) LoadCursor(NULL,IDC_HAND));
see [^]. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]modified on Tuesday, March 10, 2009 7:10 AM
Wouldn't that replace all STATIC's cursors, rather than just one particular one? Cattivo Carlo, cattivo. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
Is API
SetCursor
helpful ? Regards, Paresh. -
Wouldn't that replace all STATIC's cursors, rather than just one particular one? Cattivo Carlo, cattivo. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
Iain Clarke wrote:
Wouldn't that replace all STATIC's cursors, rather than just one particular one?
Yessir, that's done deliberately, of course, to maintain GUI consistency :rolleyes:
Iain Clarke wrote:
Cattivo Carlo, cattivo.
Carlo brutto e cattivo. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Wouldn't that replace all STATIC's cursors, rather than just one particular one? Cattivo Carlo, cattivo. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
Iain Clarke wrote:
Wouldn't that replace all STATIC's cursors, rather than just one particular one?
Yessir, that's done deliberately, of course, to maintain GUI consistency :rolleyes:
Iain Clarke wrote:
Cattivo Carlo, cattivo.
Carlo brutto e cattivo. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]If you're the Cattivo e Brutto, can I be the Bene[+]? We'll have our own spaghetti[*] western! Signor Iain. [+] No google help required for that one! [*] insert chorus of groaning here.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
If you're the Cattivo e Brutto, can I be the Bene[+]? We'll have our own spaghetti[*] western! Signor Iain. [+] No google help required for that one! [*] insert chorus of groaning here.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
Well I'll be
'il brutto e il cattivo'
, you'll be'il buono'
(aka Iain-Clint) and theTHHB
's action is completed, today. :) BTW [^] :-DIf the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Well I'll be
'il brutto e il cattivo'
, you'll be'il buono'
(aka Iain-Clint) and theTHHB
's action is completed, today. :) BTW [^] :-DIf the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Bene would have been fine if you hadn't gone and changed your mind about how to speak over the last 2000 years. Sheesh, some people are so short term... Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
Bene would have been fine if you hadn't gone and changed your mind about how to speak over the last 2000 years. Sheesh, some people are so short term... Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
If you, crazy English people, didn't change your mind, we would share the same language, laws, etc... :rolleyes: --Carlo Augusto the Emperor. BTW would still be 'bonus', not 'bene'.__ ;P BTW2 what county of England are you from?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
If you, crazy English people, didn't change your mind, we would share the same language, laws, etc... :rolleyes: --Carlo Augusto the Emperor. BTW would still be 'bonus', not 'bene'.__ ;P BTW2 what county of England are you from?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles];P to you too! As for BTW2... Born: Kent. Grew up: Middle east Educated: Scotland / US. Living: Herefordshire - but off to Sweden in a few weeks! ps, Any Swedes want to give me a job!?
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
;P to you too! As for BTW2... Born: Kent. Grew up: Middle east Educated: Scotland / US. Living: Herefordshire - but off to Sweden in a few weeks! ps, Any Swedes want to give me a job!?
Codeproject MVP for C++, I can't believe it's for my lounge posts...
Iain Clarke wrote:
Living: Herefordshire - but off to Sweden in a few weeks! ps, Any Swedes want to give me a job!?
WOW, are you going to live in Sweden? Good luck & best wishes! [edit] now we're awarded in the THHB's page [/edit]. [edit2] since I'm going to move in Herefordshire, could I apply for your current job (since you're leaving)?[/edit2] :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Iain Clarke wrote:
Living: Herefordshire - but off to Sweden in a few weeks! ps, Any Swedes want to give me a job!?
WOW, are you going to live in Sweden? Good luck & best wishes! [edit] now we're awarded in the THHB's page [/edit]. [edit2] since I'm going to move in Herefordshire, could I apply for your current job (since you're leaving)?[/edit2] :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I'd reply to you more directly if I thought the [email] button worked... Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
Iain Clarke wrote:
Living: Herefordshire - but off to Sweden in a few weeks! ps, Any Swedes want to give me a job!?
WOW, are you going to live in Sweden? Good luck & best wishes! [edit] now we're awarded in the THHB's page [/edit]. [edit2] since I'm going to move in Herefordshire, could I apply for your current job (since you're leaving)?[/edit2] :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Can you email me on: mm603008@spamcorptastic.com It's a self destructing email address, so you'll need to be a little speedy! If you'd rather stay private, I'll respect that too. Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...