TTN_NEEDTEXT never called
-
I have a CDialog. I'm trying to implement tooltips for the edit controls of the dialog. I adde the code : ON_NOTIFY_EX_RANGE(TTN_NEEDTEXT,0,0xFFFF,OnToolTipNotify) in the message map and my function is : BOOL CPageCurrentLoop::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult ) The problem is the OnToolTipNotify never gets called. Even if the mouse pointer is over CEdit controls of the dialog. Thanks. avivhal
-
I have a CDialog. I'm trying to implement tooltips for the edit controls of the dialog. I adde the code : ON_NOTIFY_EX_RANGE(TTN_NEEDTEXT,0,0xFFFF,OnToolTipNotify) in the message map and my function is : BOOL CPageCurrentLoop::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult ) The problem is the OnToolTipNotify never gets called. Even if the mouse pointer is over CEdit controls of the dialog. Thanks. avivhal
Has
EnableToolTips()
been called? You might need to use:ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)Also make sure that no other control (e.g., group box) is obscuring the
CEdit
controls.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
I have a CDialog. I'm trying to implement tooltips for the edit controls of the dialog. I adde the code : ON_NOTIFY_EX_RANGE(TTN_NEEDTEXT,0,0xFFFF,OnToolTipNotify) in the message map and my function is : BOOL CPageCurrentLoop::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult ) The problem is the OnToolTipNotify never gets called. Even if the mouse pointer is over CEdit controls of the dialog. Thanks. avivhal
Did you call
EnableToolTips
from within your dialog window?
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
-
Has
EnableToolTips()
been called? You might need to use:ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)Also make sure that no other control (e.g., group box) is obscuring the
CEdit
controls.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
I tried this and it does not help. I noticed that I dont get any wm_notify messages. I guess they are "kidnapped" somewhere along the way.. but where? avivhal
-
I tried this and it does not help. I noticed that I dont get any wm_notify messages. I guess they are "kidnapped" somewhere along the way.. but where? avivhal
Aviv Halperin wrote: I tried this and it does not help. Meaning that
EnableToolTips()
has been called and both entries are in the dialog's message map? How are you verifying thatOnToolTipNotify()
is not getting called?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
Aviv Halperin wrote: I tried this and it does not help. Meaning that
EnableToolTips()
has been called and both entries are in the dialog's message map? How are you verifying thatOnToolTipNotify()
is not getting called?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
Yes, EnableToolTips() has been called and both entries are in the dialog's message map. I tried putting a break point in the message handler in debug mode and never got to the break point. Then I tried with the spy++ to find out if any notify message is sent and non are sent. I have complex structure here that might be the reason: I have a dialog box with a tab control. The tab control has a few pages which are all implemented as child dialogs of the tab control. I'm trying to add tool tips to some of the controls of the tab pages dialogs. Thanks. avivhal