Question About CToolTipCtrl
-
Hi I have some question about the class. I would like to use it on My CRichEditctrl where the source code is for my debugger. There are CWnd members in a number of the methods in the class would that in my case be the CrichEditCtrl in Addition the HiTest api which has a CPoint member is that point relative to (in my case) the CRichEditCtrl Thanks
-
Hi I have some question about the class. I would like to use it on My CRichEditctrl where the source code is for my debugger. There are CWnd members in a number of the methods in the class would that in my case be the CrichEditCtrl in Addition the HiTest api which has a CPoint member is that point relative to (in my case) the CRichEditCtrl Thanks
Umm, could you formulate your question(s) a bit more clear?
-
Umm, could you formulate your question(s) a bit more clear?
-
I’ll ask a more specific question the create api of the CtooltipCtrl class has 2 parameters CWnd and dwstyle I would like to use it in my derived CrichEditctrl class whose parent is a CDialog should the Cwnd be the CRichEditrl or The CDialog Thanks
It depends upon what and how are you going to display tooltips for your control. If it would be some text for the whole control then pass the CDialog CWnd* (in this case you will handle the TTN_NEEDTEXT notification in the dialog class). If the tooltip text would depend on some position or some content within the controls then it could be better passing the control CWnd* (then you will handle the TTN_NEEDTEXT notification in the control's class).
-
It depends upon what and how are you going to display tooltips for your control. If it would be some text for the whole control then pass the CDialog CWnd* (in this case you will handle the TTN_NEEDTEXT notification in the dialog class). If the tooltip text would depend on some position or some content within the controls then it could be better passing the control CWnd* (then you will handle the TTN_NEEDTEXT notification in the control's class).
Maybe its best if I used as an example if I have the following text in my CrichEditctrl D203 B11A 801C 0011A 0001C MVC FIELDA,FILEDB and I however the mouse over FIELDB which has a value of X'00000003' I would like the tool tip control to display it much like the visual studio debugger Hope this makes sense thanks
-
Maybe its best if I used as an example if I have the following text in my CrichEditctrl D203 B11A 801C 0011A 0001C MVC FIELDA,FILEDB and I however the mouse over FIELDB which has a value of X'00000003' I would like the tool tip control to display it much like the visual studio debugger Hope this makes sense thanks
Then you should create the tooltip control within your CrichEditctrl class passing the CrichEditctrl CWnd* as the parent. Then you would have to implement some handling (the mouse move - ?) procedure to determine what text is to be displayed in tooltip. If the will be some (new!) text then use the following CToolTipCtrlmethods: UpdateTipText TrackPosition TrackActivate
-
Maybe its best if I used as an example if I have the following text in my CrichEditctrl D203 B11A 801C 0011A 0001C MVC FIELDA,FILEDB and I however the mouse over FIELDB which has a value of X'00000003' I would like the tool tip control to display it much like the visual studio debugger Hope this makes sense thanks
This article with a code and example would be a good start: [XTipComboBox - Display tooltips for combobox](https://www.codeproject.com/Articles/4438/XTipComboBox-Display-tooltips-for-combobox)
-
This article with a code and example would be a good start: [XTipComboBox - Display tooltips for combobox](https://www.codeproject.com/Articles/4438/XTipComboBox-Display-tooltips-for-combobox)