|
VC6
I can't use the MFC-supplied tooltip handling (on a CFormView) because it doesn't return tooltips for a static control (with an ID) or for CDateTimeCtrl, so I've come up with my own code.
I've got my tooltips showing up, but they appear to not be "on top". By that, I mean the tool tip shows up, but it's partially hidden by any controls that might occupy the same part of the screen.
I've tried BringWindowToTop() , as well as SetWindowPos(&Cwnd::moveToTop, ...) , and even SetWindowPos(Cwnd::FromHandle(HWND_TOP), ...) .
Any help?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Are you using the WS_EX_TOOLWINDOW style as well as WS_EX_TOPMOST. Also try making it a child of the desktop so that it is not a sibling of the controls on your form.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I'm calling ::GetSysColor(COLOR_INFOBK) , and it's returning white, despite the fact that my tooltip background color has been set to yellow. Does anyone have any ideas?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Does GetSysColorBrush(COLOR_INFOBK) work?
Bernie (Boom Boom) Geoffrion worked Atlanta Flames games in the 1970s with the splendid Jiggs McDonald. One night, Geoffrion said, "Jiggs, there are only three things to hockey: shooting and skating." McDonald said, "Right, Boomer. And what's the third?" The exasperated Geoffrion replied," Jiggs, that's the three. Shooting. And. Skating."
|
|
|
|
|
Well, since this particular color definition has been available since win95, i think i can be pretty sure that function will work. BTW, I'm getting the color for the text (COLOR_INFOTEXT).
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: i think i can be pretty sure that function will work.
One would think that GetSysColor would work too, but in your case it appears to not be. GetSysColorBrush will return NULL on error, where as GetSysColor does not have a reliable error check mechanism. Also if GetSysColorBrush(COLOR_INFOBK) also returns a white brush then your system settings may not be what you think they are.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Actually, it was stupid programmer tricks. My fault entirely.
Nevermind.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi guys,
How can I change the Font for an individual item of a CTreeCtrl?
Thanks in advance.
Ivan Cachicatari Blog[^]
www.latindevelopers.com
|
|
|
|
|
The easiest option would be to handle custom drawing. The mechanism is pretty straight forward. Take a look at the NM_CUSTOMDRAW message in the MSDN. I couldn't see any articles for tree controls, but this[^] article for List Controls got me first started.
I Dream of Absolute Zero
|
|
|
|
|
<br />
SetItemState(hItem, TVIS_BOLD, TVIS_BOLD);<br />
Bernie (Boom Boom) Geoffrion worked Atlanta Flames games in the 1970s with the splendid Jiggs McDonald. One night, Geoffrion said, "Jiggs, there are only three things to hockey: shooting and skating." McDonald said, "Right, Boomer. And what's the third?" The exasperated Geoffrion replied," Jiggs, that's the three. Shooting. And. Skating."
|
|
|
|
|
|
in my application i have multiple instance of Microsoft Word document and i need to close one perticular instance of Word which has no characters in it(i.e. close empty word document out of many instances). it should be a function and return value should be 1 if there is such document of Word which is empty and 0 if there is no such document on
can any one help me out with this problem ?
-anku
anku
|
|
|
|
|
Is there an easy way to do the following:
1) find out how many files there are in a particular folder
2) find out the names of the files.
The simpler the solution the better.
thanks
KevinSheedy
|
|
|
|
|
|
Use the FindFirstFile() /FindNextFile() pair for both.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
KevinSheedy wrote: The simpler the solution the better.
what about CFileFind MFC Class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
Could someone help me modify the following code in order to dispaly in hex format the received bytes from a serial port.
<br />
CCom *pCom=(CCom*)ch;<br />
char *szReceive;<br />
int nr;<br />
szReceive = new char [(nr=(pCom->SizeUsedInRXBuf()+1))]; <br />
memset(szReceive,0,nr); <br />
pCom->ReadBuffer(szReceive,nr-1);<br />
CString str,toto;<br />
m_Edit.GetWindowText(str);<br />
str+=szReceive;<br />
delete [] szReceive; <br />
m_Edit.SetWindowText(str+"\r\n");
|
|
|
|
|
this is a function i use to convert BYTE arrays to hex strings. maybe it will help...
CString HexDump(BYTE *pData, DWORD dwSize, int imax)
{
CString out;
for (DWORD i=0; i < dwSize; i++)
{
CString f;
if (pData[i]<16)
f.Format("0%x", pData[i]);
else
f.Format("%x", pData[i]);
out+=f;
}
if (imax > 0 && imax < out.GetLength())
{
out = out.Left(imax);
out+="...";
}
return out;
}
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Looking at the formatting of the code reinforces my belief that using tabs for indenting should be banned. Use spaces only. No matter how careful you are to try and use tabs, somewhere in the code you are going to press the space bar 4 times rather than the tab key once. Now when the code is viewed with a different tab spacing it looks all screwy.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: Looking at the formatting of the code reinforces my belief that using tabs for indenting should be banned.
sometimes, when i re-install VC, i forget to turn on Insert Spaces.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
That was exactly what I was looking for;
Thanks a lot
|
|
|
|
|
what are dwSize and imax for?
|
|
|
|
|
Use CString::Format() to get the hex representation:
CString str;
BYTE by = 42;
str.Format ( _T("%02X"), by );
You can use %x instead of %X to get lowercase letters but I find uppercase easier to read.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Is there a way for a program to know when a network connection has been made? Ideally, I'd like to know when a certain interface is connected (I don't have to know when it was connected, just if it currently is physically connected). It seems as though XP can detect this since it has tray icons for this. Any idea how they are doing it?
|
|
|
|
|
If you only have to run on servers, you might be interested in the Network Monitor API:
Network Monitor captures network traffic for display and analysis. It enables you to perform tasks such as analyzing previously captured data in user-defined methods and extract data from defined protocol parsers.
No shirt, no shoes, no brains, no service.
|
|
|
|