|
Hi,
I'm trying to add multiline tooltip support to my normal, (CToolBar in CReBar in CMainFrame) ToolBar.
I've found lots of code for MultiLine ToolTips for normal buttons in Dialogs etc.. but nothing specifcaly for ToolBars.
Currently I'm trying to get COXToolTipCtrl to work,
I've set the tooltips as normal with AddTool etc...
I've relayed the Pretranslate messages from CMainFrame to the ToolTip but it only shows the first tooltip and not the others.
Does anyone have any advice?
cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Sorry i'm an idiot,
didn't read the comments at the end of the article properly.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I don`t want save my XML message to disk and than call Navigate2. It should be more beautiful algorithm.
|
|
|
|
|
There is no XML in the IE API. However writing content in XML format using C++ is a breeze. If you do it using javascript ActiveX scripting it should even be easier as you may take advantage of the MSXML COM component, if it's installed.
Once it's done, navigate2(localfile) works fine.
And I swallow a small raisin.
|
|
|
|
|
You may do XSLT transformation on XML. The result should be a HTML. Then you can pass this HTML to IE as InnerHTML
|
|
|
|
|
Hi all, I finally was able to get my Word Automation project to work,
somewhat. I was never able to find a way with Office 97 but Office
2000 and XP, I was able to find a way. But I am having one problem.
When I launch Word from my application, everything seems to work
fine. Except when I decide to open an existing word document. It
opens the document but it does it in an entirely new Word window, not
in the existing window like it usually does. Any ideas what might be
causing this? Any ideas how to get around this?????? I am
stumped...
|
|
|
|
|
I thought this is how Word 2000 and beyond works. When I moved from Office 97 to 2000 one thing I noticed with Word and Excel etc was that each document was opened in a new Window. This may be an options setting. It did not bother me so I did not investigate. But you may want to look into it.
|
|
|
|
|
Thanks. I actually did look into it and after A LOT of digging, I finally found an answer on Microsoft's website. According to MS, Office 97 and earlier was created using the MDI design. But Office 2000 and Office 2002 was created using the SDI design. You are correct, there is a setting that can be turned on or off to do what is wanted. It is under Tools, then Options, and on the View tab, uncheck the Windows in Taskbar. This will bring up multiple documents in one instance.
|
|
|
|
|
I have two Acccess flat databases, each with a number of fields that may overlap. I want to by
code merge these two databases. Any clues? I'm using ADO with the #import statement and msado25.tlb.
say db1 has all the fields that db2 has, and db2 just has one extra field. Then I want the db1 merged part to have a special text entry "special entry" in its record values, while the db2 part has the values that it has already.
|
|
|
|
|
Create a select statement that will join the two tables based on some common key and then select the relevant fields. Though I am not exactly very clear on what you are trying.
|
|
|
|
|
Hi all,
anybody knows like disable [autoscroll] in a CEditView (multiline) ?
My instance is readonly and I add text always in append after then the CEditView scroll automatically automatically at the end.
Thank's,
Gigi
|
|
|
|
|
I am not sure about this, but you may want to set current selection at the top of the control after you've appended the text.
Best regards,
Alexandru Savescu
|
|
|
|
|
When I click an item with right mouse button treectrl doesn't change selected item, so I don't know how to find out which item was clicked( as far as I know NM_RCLICK handler doesn't provide anything helpful ). I'm not sure whether it is possible to get handler of clicked item. I will apreciate any help.
|
|
|
|
|
I'm using ::GetMessagePos, CTreeCtrl::ScreenToClient and CTreeCtrl::HitTest.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
It's not very elegant in my opinion but it should work (I haven't checked it), but anyway thanks for help!
|
|
|
|
|
Anonymous wrote:
It's not very elegant in my opinion
If you find more elegant solution, let me know.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz' solution sounds fine to me, but if you don't like it then i'd suggest subclassing the tree control & installing your own WM_RBUTTONDOWN handler; you'll probably find all sorts of other uses for subclassing the control anyway.
Shog9
|
|
|
|
|
Shog9 wrote:
if you don't like it then i'd suggest subclassing the tree control & installing your own WM_RBUTTONDOWN handler
This should work, however, if you use TVN_BEGINRDRAG you'd have to write non-trivial code.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I've created an MFC-dll.
InitInstance() gets called when the dll is called, and ExitInstance() is called when it's released. Normal behaviour so far.
Normaly, Run() should be called too (automaticaly), after InitInstance() , isn't it? In my dll, Run() never gets called. Is there a good reason for that?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
CWinApp::Run contains the message loop. If you have DLL, there's no need for one - .exe provides its own.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Consider declaration,
std::string name = " ABCD"
As can be seen above the string consist of many "space bar"
characters in the beginning. I want to skip them and get the resultat string value. Please tell me how ????
|
|
|
|
|
name.substr(name.find_first_not_of(' '));
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This would be easiest:
std::string name = "ABCD";
Now seriously: you should use string::find_first_not_of:
int pos = name.find_first_not_of(' ');
if (pos != std::string::npos)
{
name.erase(0, pos);
}
If you want to remove all spaces (not only at beginning), use this:
name.erase(std::remove(name.begin(), name.end(), ' '), name.end());
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Should you use CString you have the following methods: TrimLeft , TrimRight .
Best regards,
Alexandru Savescu
|
|
|
|
|
(with tremulous voice) Don't lead the guy apart from the one and true std::string ! Now seriously, these functions, though not directly available, can be easily written:
#ifndef TRIMTEMPLATES_H
#define TRIMTEMPLATES_H
#define VERSION_TRIMTEMPLATES 0x00010000
template<class String,class Ch>
inline String& trim_left(String& str,Ch ws)
{
typename String::size_type first_nonblank;
if ((first_nonblank=str.find_first_not_of(ws))!=String::npos)
return str.erase(0, first_nonblank);
else
return str;
}
template<class String>
inline String& trim_left(String& str)
{
return trim_left(str, ' ');
}
template<class String,class Ch>
inline String& trim_right(String& str,Ch ws)
{
typename String::size_type last_nonblank;
if((last_nonblank=str.find_last_not_of(ws))!= String::npos)
return str.erase(last_nonblank+1);
else
return str;
}
template<class String>
inline String& trim_right(String& str)
{
return trim_right(str, ' ');
}
template<class String,class Ch>
inline String& trim(String& str,Ch ws)
{
return trim_left(trim_right(str, ws),ws);
}
template<class String>
inline String& trim(String& str)
{
return trim_left(trim_right(str));
}
#elif VERSION_TRIMTEMPLATES!=0x00010000
#error You have included two LISTPORTS.H with different version numbers
#endif
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|