Click here to Skip to main content
15,924,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Program crash Pin
Chris Losinger27-Jan-03 19:21
professionalChris Losinger27-Jan-03 19:21 
GeneralRe: Program crash Pin
Mike Nordell27-Jan-03 21:17
Mike Nordell27-Jan-03 21:17 
GeneralRe: Program crash Pin
Neville Franks28-Jan-03 0:17
Neville Franks28-Jan-03 0:17 
QuestionInverse Hyperbolic Sine? Pin
kbmuri27-Jan-03 18:05
kbmuri27-Jan-03 18:05 
AnswerRe: Inverse Hyperbolic Sine? Pin
Chris Losinger27-Jan-03 19:20
professionalChris Losinger27-Jan-03 19:20 
GeneralRe: Inverse Hyperbolic Sine? Pin
kbmuri27-Jan-03 19:51
kbmuri27-Jan-03 19:51 
GeneralSetting Mouse cursor Pin
Mahesh Varma27-Jan-03 17:47
Mahesh Varma27-Jan-03 17:47 
GeneralRe: Setting Mouse cursor Pin
Rage27-Jan-03 20:52
professionalRage27-Jan-03 20:52 
There is no OnMouseOver function in MFC like the wellknown one used in another language Poke tongue | ;-P . Basically, you'll have to create it yourself. Let's go.

Create a class derived from CButton, for example CMyButton (use the class wizard).
Get a control asociated to your button( use again the class wizard - Add Value, do not forget to switch the combo to "Control"), f.e. m_MyButton.

Change the line CButton m_MyButton to CMyButton m_MyButton.

Now, right click on CMyButton in your class browser, and chose Windows Messages. DoubleClick on WM_SETCURSOR so as to create the OnSetCursor function.Then, in CMyButton::OnSetCursor([some stuff i can't rememeber]), load your new cursor, and comment out the line where the base class function is called (i.e. do not return what is originally returned), otherwise your own cursor won'T appear.

To sum up, what you did is :

Create your own CButton derived class named CMyButton.
Create a control, replace the original CButton using your class CMyButton.
In this class, handle the WM_SETCURSOR message with the overriding CMyButton::OnSetCursor() function.
DO not forget to comment the last line out.

Hope this helps.




~RaGE();
GeneralRe: Setting Mouse cursor Pin
Mahesh Varma29-Jan-03 16:14
Mahesh Varma29-Jan-03 16:14 
GeneralSetting cursor for CRectTracker Pin
Quek Khoo Boon27-Jan-03 16:37
Quek Khoo Boon27-Jan-03 16:37 
GeneralRe: Setting cursor for CRectTracker Pin
Rage27-Jan-03 20:53
professionalRage27-Jan-03 20:53 
Generalpointer to CDocument Pin
raner27-Jan-03 15:32
raner27-Jan-03 15:32 
GeneralRe: pointer to CDocument Pin
Chris Losinger27-Jan-03 15:58
professionalChris Losinger27-Jan-03 15:58 
GeneralRe: pointer to CDocument Pin
raner27-Jan-03 16:37
raner27-Jan-03 16:37 
GeneralRe: pointer to CDocument Pin
Chris Losinger27-Jan-03 17:23
professionalChris Losinger27-Jan-03 17:23 
GeneralRe: pointer to CDocument Pin
raner27-Jan-03 18:36
raner27-Jan-03 18:36 
GeneralRe: pointer to CDocument Pin
Chris Losinger27-Jan-03 19:30
professionalChris Losinger27-Jan-03 19:30 
GeneralRe: pointer to CDocument Pin
raner29-Jan-03 6:27
raner29-Jan-03 6:27 
GeneralRe: pointer to CDocument Pin
Chris Losinger29-Jan-03 12:22
professionalChris Losinger29-Jan-03 12:22 
Generalquestion about video files... Pin
joshfl27-Jan-03 14:17
joshfl27-Jan-03 14:17 
GeneralRe: question about video files... Pin
Mike Nordell27-Jan-03 14:36
Mike Nordell27-Jan-03 14:36 
GeneralMaking EXE hidden and still capturing screen to bm file. Pin
mkashifkkj27-Jan-03 13:39
mkashifkkj27-Jan-03 13:39 
GeneralRe: Making EXE hidden and still capturing screen to bm file. Pin
Mike Nordell27-Jan-03 16:25
Mike Nordell27-Jan-03 16:25 
GeneralRe: Making EXE hidden and still capturing screen to bm file. Pin
Rage27-Jan-03 20:56
professionalRage27-Jan-03 20:56 
GeneralRe: Making EXE hidden and still capturing screen to bm file. Pin
Mike Nordell27-Jan-03 21:25
Mike Nordell27-Jan-03 21:25 

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.