|
Sorry, my fault:
I am now titled.
Thanks again,
Simon
|
|
|
|
|
|
This is the situation:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify )
EnableToolTips(TRUE); is the first statement in OnInitDialog
<br />
BOOL DlgFlexListFormatColumns::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult){<br />
CString tooltiptext2display;<br />
tooltiptext2display = "";<br />
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; <br />
UINT nID = pNMHDR->idFrom;<br />
if (pTTT->uFlags & TTF_IDISHWND) {<br />
nID = ::GetDlgCtrlID((HWND)nID);<br />
switch(nID){<br />
case IDC_STATIC_LINESPERROW: tooltiptext2display.Format(IDS_LINESPERROW);<br />
break;<br />
case IDC_EDIT_NROFLINES: tooltiptext2display.Format(IDS_LINESPERROW);<br />
break;<br />
default:<br />
break;<br />
}
strcpy(pTTT->szText, tooltiptext2display);<br />
return(TRUE);<br />
}
else{ return FALSE; }
}
and in the header:
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult);<br />
QUESTION:
There is only 1 control in my dialog which catches (and thus shows) a tooltip. All the rest does nothing.
What did I do wrong?
tnx for your help...
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify )
Change this to:
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify) V. wrote:
There is only 1 control in my dialog which catches (and thus shows) a tooltip.
Does that imply that OnToolTipNotify() is called only for that one control? Are the other controls obscured by anything, including a group box?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Well now you mention it: yes, they are all surrounded by a groupbox.
(that one control isn't surrounded)
I didn't know that that would be problem?
Why's that?
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
The group box control needs to be behind the other controls. Even though it appears as a skinny line surrounding the controls, it is actually obscuring them as far as tooltips are concerned. In the resource editor, change the tab order of the controls such that all the controls within the group come first.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
tnx for your reply, but I'm afraid the changes didn't make any difference...
Oh well if it doesn't work, the boss must be happy without.;P
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
Oh well if it doesn't work, the boss must be happy without
If you can trim the code down to something very small and still be able to reproduce it, feel free to send the project to me and I can take a look.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I see your point. If I make the Group box invisible, the tooltips appear.
However the three groupboxes in my dialog have the three last numbers of tabstop and the tooltips do not appear. (enabling or disabling the tabstop propetie does not help)
(why don't things ever go the easy way )
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
If I make the Group box invisible, the tooltips appear.
There's no need to make it "invisible." Just ensure that it is behind all the other controls.
V. wrote:
However the three groupboxes in my dialog have the three last numbers of tabstop...
I don't quite understand this.
V. wrote:
(enabling or disabling the tabstop propetie does not help)
Again, not necessary.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hail everyone,
Let's say I have two classes, A and B, as well as two interface (abstract) classes for them, iA and iB. Class B derived from class A and interface iB, interface iB derived from iA, so we have,
class iA {
vitrual method AA
}
class A: public iA {
method AA
}
class iB: public iA {
vitrual method BB
}
class B: public A, public iB {
method BB
}
By doing this I want to be able to access methods of class B (and A in it) through interface iB, but, I can't do so. Compiler justly says "pure vitual function AA was not defined in B"
So, couls you please explain to me how this hierarchy should look like?
Thanks in advance, any suggestion would be helpful.
|
|
|
|
|
Because class B inherits from both class A and class iB , it has to deal with two different vtables. Therefore you need to provide method AA of class iA in both vtables and that is the source of the error message: the implementation for class iB is missing.
Just write a wrapper method AA in the class B , calling A ::AA ; this will redirect iB ::AA to A ::AA .
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
We are trying to capture ctrl + char keys from keyboard for the list control. We are not able to get good help. We even tried with lvn_keydown but not working. Is there a way to find the solution.
Thanks & Regards,
RK (HYD)
azghar
Live and Let live
|
|
|
|
|
Processing the LVN_KEYDOWN notification will work, I've tested it. You just need to check if ((LPNMLVKEYDOWN)lParam)->wVKey=='F' and then check the state of the control key, it is pressed when the test (GetKeyState(VK_CONTROL) >> (sizeof(SHORT)-1)) returns non-zero.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Override PreTranslateMessage
if(pMsg->hwnd == m_List.GetSafeHwnd())<br />
{<br />
SHORT nCtrlState = GetKeyState(VK_CONTROL);<br />
if(nCtrlState && pMsg->message == WM_CHAR)<br />
{<br />
}<br />
}
|
|
|
|
|
how can i know the NIC number of network card using winsock or any other method
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
http://www.mastishk.com
|
|
|
|
|
When you say NIC number are you looking for the MAC address? If so you may want to check out this.[^]
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi all,
i like to deactivate my Dialog Button IDC_STOP_ROBOT.
Seems like no big deal, but when useing the syntax below nothing happens?
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(FALSE);
.. or enable again:
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(TRUE);
happy coding,
-mark
|
|
|
|
|
CWnd* pWnd;<br />
pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT);<br />
pWnd->EnableWindow(FALSE);
AND
CWnd* pWnd;<br />
pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT);<br />
pWnd->EnableWindow(FALSETRUE);
if it doesn't work try rebuilding all.
(now I noticed it's actually the same... )
Hope it helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
macmac38 wrote:
...nothing happens?
At what point(s) are you calling EnableWindow() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi All,
Using VSFlexGrid.
I want a combobox in 1 cell to be only readonly.
In the Beforeedit event,I set the cancel to "true".
In the OnClick event,I have this.
std::string test("|Hello|Text|test1");
m_flexGrid.SetComboList(test.c_str());
But I couldn't see the combobox dropdown list.
Would be nice if u could help me...
Thanks...
|
|
|
|
|
I'm using CHtmlView in my application to display html's store on the local machine. But when i navigate to some locla page sometimes the images there are not displayed. The image path is correct. It's something like "c:\images\image.jpg". Where is the problem. In caching, in backward slashes?
|
|
|
|
|
Hmm... interesting.
I once wrote a program that stored the HTML sources inside the rc-file, worked fine for HTML, didn't worked at all for jpg's. So I put the jpg's in a relative adress to the program -> wokred fine.
In other words, the problem you are describing here worked fine back then when I tryed it (VS6 a few years ago), so I guess the problem lies in the HTML-Source.
Can you please post the HTML-Source around the problem? (right click, view source when the program is running.)
|
|
|
|
|
Thanks for the quick answer.
I can't put the HTML in res-file because it's dynamicly created and also i can't use relative paths but abosolute bacause the paths are also dynamic. The HTML for the images is:
It works but when i right click and refresh the page sometimes some of the images doesn't appear. This is inexplicable for me.
|
|
|
|
|
How should the assignment operator be written for the following class?
<br />
class CTest<br />
{<br />
private:<br />
const int m_test;<br />
<br />
public:<br />
CTest(int i) : m_test(i)<br />
{<br />
}<br />
<br />
CTest(const CTest& rhs) : m_test(rhs.m_test)<br />
{<br />
}<br />
<br />
~CTest()<br />
{<br />
}<br />
<br />
CTest& operator=(const CTest& rhs)<br />
{<br />
}<br />
};<br />
Systems AXIS Ltd - Software for Business ...
|
|
|
|