|
Hi, I posted a while ago about IE crashing when using the highlight tool on a page with frames containing pages from various sites.
There is an article in the ATL section called PopUpBlocker version 3 by John Osbourne( http://www.codeproject.com/useritems/PopupBlocker2.asp#xx548282xx ) which I used to help me get round this problem. I recommend checking out the code he uses for disabling flash animations.
In my application I now have code like the following to recursively go through the frames:
<code>
void CMattToolbar::HighlightDocRecursively(IDispatch* pDocDisp, MStruct* mStrt){
IHTMLElement* p_BElement;
IHTMLBodyElement* p_Body;
CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> doc(pDocDisp);
if (!doc) {
return;
}
doc->get_body(&p_BElement);
if (!p_BElement) {
return;
}
p_BElement->QueryInterface(IID_IHTMLBodyElement,(void**)&p_Body);
p_BElement->Release();
if (p_Body) {
MarkUp(p_Body, mStrt); // My method to write to the page
p_Body->Release();
}
// By getting the container and enumerating the frames,
// we avoid the E_ACCESSDENIED error when trying to
// get a cross-frame document. This method side-steps
// IE cross-frame security.
CComQIPtr<IOleContainer, &IID_IOleContainer> spContainer(pDocDisp);
if (spContainer) {
// Get an enumerator for the frames
CComPtr<IEnumUnknown> spEnumerator;
HRESULT hr = spContainer->EnumObjects(OLECONTF_EMBEDDINGS, &spEnumerator);
if (SUCCEEDED(hr) && spEnumerator) {
// Enumerate all the frames
CComPtr<IUnknown> spUnk;
ULONG uFetched;
while (spEnumerator->Next(1, &spUnk, &uFetched) == S_OK) {
CComQIPtr<IWebBrowser2, &IID_IWebBrowser2> spWB(spUnk);
if (spWB) {
CComPtr<IDispatch> spDocDisp;
hr = spWB->get_Document(&spDocDisp);
if (SUCCEEDED(hr) && spDocDisp)
HighlightDocRecursively(spDocDisp, mStrt);
}
spUnk.Release();
}
}
}
}
</code>
Please note that from "CComQIPtr<IOleContainer, &IID_IOleContainer> spContainer(pDocDisp);" down this is pretty much a cut n paste job from the article mentioned above. Hope it helps someone. If anyone notices anything daft with the above please pass it on...
|
|
|
|
|
When using the toolbar, it seems that you cannot put the toolbar on right of another toolbar on the same row. When you do this every new IE you open will have the toolbar on its own row. But you can put another toolbar on the right of the 2find toolbar on the same row with out a problem. it seems the toolbar is locking itself to the left hand side?
Also with chevrons, when you have selected to hide buttons in the options & they are hid, if you shrink the window, then the hidden buttons still appear in the chevrons.. Is there a way to stop this?
Thanks
Lee H
|
|
|
|
|
Hello Mike,
I wanted to create a button in toolbar of "IE" which inturn implments a COM(in-process) object. I want to access th Object model of IE inside my COM object. I made a COM object using ATL which implements "IOleCommandTarget" and "IObjectWithSite" as MSDN help says. Able to add the button(with icon) in the toolbar. BUt the Problem is when I ckick the button nothing happens. My COM object doesnt become alive. And none of methods viz IOleCommandTarget::Exec or IObjectWithSite::SetSite gets executed.
Please help,
vishy.
|
|
|
|
|
I've noticed that once i instll the toolbar that on some pcs when you goto View->Toolbars & uncheck my compiled toolbar it will make the google toolbar disappear.. if i uncheck google, it will make my tool bar disappear.. seems as if they are mixed up.. Has anyone else noticed this? if so is there a way to stop this from happening?
Lee H
|
|
|
|
|
I have this same ploblem using this toolbar and the google beta toolbar.
|
|
|
|
|
how much would it cost for you or someone here to make me a simple toolbar? My email is mike_webb@ureach.com
Thanks
Mike
|
|
|
|
|
---- you wrote -----
how ?
understand?
--------------------
I are you talking about ?
What do you mean ?
I send this.
"""""""""""""""
nol gu it ne.
je de ro mal ha.
han guk nom jjok pal rin da.
lee cho jja ya
"""""""""""""""
|
|
|
|
|
Hi,
Anyone can help me on how to select multiple checkboxes on each menu options?
Thanks.
Adriano Barros
adrianobf@hotmail.com
Rio de Janeiro - Brazil
|
|
|
|
|
Hello,
I have used the previous version of toolbar and now I have worked on the latest version. Today the URL http://www.zmike.net/ opened automatically even though there was no IE window opened. This was the first time it happened. You can understand what I am trying to ask MIKE. Is there any logic behind this .
Hardwork is key to success...
Bilal Ahmed
|
|
|
|
|
Hello Bilal.
I am not sure that I understand you question as well. I think I can't understand some of your humour due to my bad english.
I can just say:
1. zmike.net was not updated for about 2 years.
=> 2. I don't promote it.
3. do expect bugs, may be such url was generated by some adware
4. as far as I know zmike.net don't included in any affiliate program.
5. I inserted sometimes in my projects url redirections, links, popup windows, etc. but as I can remeber I don't use zmike.net as test link for that tasks.
have you found what happened on your computer?
Mike.
|
|
|
|
|
Hello Mike,
Sorry if you misunderstood but I had really no intention for making any humour in this message. All I wanted to do was to convey this message very lightly. That is why I didn't used the word spywere or adware cause if some one got it wrong, he/she may have a bad impression of this project, which I don't want to do.
Anyways thanks for your quick reply. I will try to find out what happened and will definitly inform you the reason. I was so much disturbed due to this problem and the reason was that I have worked on this project, modified it and have used it in commertial products with your permission, which I took a little later, as you know. So I was worried that if the toolbar did it then this must not happen to those I supplied the toolbars. Now I have made all this very clear and I think you can better understand this than any one else, what I am worried about.
Hardwork is key to success...
Bilal Ahmed
|
|
|
|
|
Hi All,
Can anybody help me in implementing search by passing unicode strings
I made changes to the source to compile in unicode and I am able to type unicode strings in combobox whereas when try to use in search through variable "s1" it showing junk (?????).
where did I done a mistake or should I make my XML file to unicode.
|
|
|
|
|
Replace urlencode function with this:
const zstring urlencode(const zstring& _s, int _flags = url_normal)
{
const static unsigned char m[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,1,2,2,1,2,4,2,1,1,1,2,1,1,1,4,1,1,1,1,1,1,1,1,1,1,4,4,2,4,2,4,
//1 1
4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
const static char* h = "0123456789ABCDEF";
zstring encoded;
#ifdef _UNICODE
const wchar_t* pWideBuf = _s.begin();
int iWideSize=_s.length();
int iMultiSize = WideCharToMultiByte(CP_UTF8, 0, pWideBuf, iWideSize , NULL, 0, NULL, NULL);
char* pMultiBuf = new char[iMultiSize];
WideCharToMultiByte(CP_UTF8, 0, pWideBuf, iWideSize, pMultiBuf, iMultiSize, NULL, NULL);
for (char * i=pMultiBuf; i<(pMultiBuf+iMultiSize); i++)
{
unsigned char ii = *i;
if(ii>0xFF || m[ii]&_flags)
encoded += ii;
else {
encoded += '%';
encoded += h[ii>>4];
encoded += h[ii&0x0F];
}
}
#else
for(zstring::const_iterator i=_s.begin(); i<_s.end(); i++)
{
unsigned char ii = *i;
if(ii>0xFF || m[ii]&_flags)
encoded += ii;
else {
encoded += '%';
encoded += h[ii>>4];
encoded += h[ii&0x0F];
}
}
#endif
return encoded;
}
|
|
|
|
|
Hi orlink,
I replaced this file but still it is showing ???? marks when I am passing parameters but I am watching the parameter showing in address bar of IE correctly. what may the problem is that asp file which I am accessing is not compitable or something else please help me.
|
|
|
|
|
Did you compile it as unicode? In the project options add _UNICODE to the list of preprocessor definitions.
It should work. Your ASP page should be able to handle utf-8 encoding of url parameters, either detect it automatically or define a mask (%utf) and set it in the WebJump code.
|
|
|
|
|
Hi orlink,
Ive compiled it in unicode, can you plase give me a code snippet of defineing a mask (%utf) in webjump code. it will be a great help.
Thanks& Regards
Pardha
|
|
|
|
|
Hi orlink,
Can you help me how can we get latest xml file each time we open a new IE window
Thanks & Regards
Pardha
|
|
|
|
|
If I comiple the toolbar (all default files) once the bar is installed the IE Title only shows the first character of the page title.
Any suggestions?
|
|
|
|
|
Sorry Should have read the FAQ's and Bug Fixes. Darn WTL 8D
Thanks!
|
|
|
|
|
Thank you for your cool code
it is very powerful
i need your help in something is the same
if you find at microsoft you will find this sample
http://download.microsoft.com/download/IE5/Toolband/2/NT45/EN-US/Kbbar.exe
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q246/2/34.ASP&NoWebContent=1
it is much great for me also i was started on this sample before i find your code
just need your little help
if you compile this sample you will find the toolbar is created and put after last toolbar my problem is i want move this toolbar like google or yahoo??
if you can help me with this i will be very thanks
best regards
thank you for take time read this
wael
wael
|
|
|
|
|
what means "move" like google or yahoo
can you describe it in some more words.
Mike.
|
|
|
|
|
i was mean
I can't fix it to be appeared in its own line.
but i fixed it now
simply i set the DBIM_MINSIZE property
CMytoolbar::GetBandInfo(....)
{
if(pdbi->dwMask & DBIM_MINSIZE)
{
pdbi->ptMinSize.x = 2000;//just modified here
pdbi->ptMinSize.y = TB_MIN_SIZE_Y;
}
//some other code
}
thank you for your answer
|
|
|
|
|
hi Mike...
first...Me cannot English...sorry...
Me XML toolbar_sample_ex.xml
<PAGE url="http://www.praize.com/cgi-bin/members/cforums.cgi?forumid=10228245326057" img="-2" caption="Page"/>
Not Display...
Why?
P.S : OS XP, VC++ 6 , SP5 , SDK, WTL...ALL Install...Compile Ok...
You "2Find Toolbar for IE"...Best Project....
regards
..Ofer^^;
|
|
|
|
|
change
bool g_DO_HTML = false;
to
bool g_DO_HTML = true;
Mike.
|
|
|
|
|
Hi, all.
Now I have a question for you.
Here are some of my thoughts. I'd like to here your opinion.
First of all, when I post my article on codeproject I haven't know - why. I don't know it now, too.
May be I want to be better known in the world...
May be I wanted to help begginers to show finished project, some not bad (I hope) ideas, to show that it is easy to make such project.
I tried to show that anybody can make toolbar simular to google, hotbar, yahoo, alexa...
May be I'd like to make in cooperation great toolbar...
I try to think that I put it to give base toolbar which almost everybody can use for his own needs on his server or in his company...
Really I don't think that open source project - it is very good. One of my friends (guru for me) said "when anybody can modify code - it becomes brothel or complete chaos".
I know that we can control process..., but I am pessimism.
I made lot of toolbars.
First customers got bonus of posting article here - because some bugs were found.
Now customers can get working example, add some special additional features or bugs fixing, they know that I use my old projects, some kind of brand.
I don't search web for "my" toolbars.
But in last weeks I accidentally found:
2 guys that modified _a little_ this sample and then offer them at one coder's labour exchange
1 toolbar used at one porno site
1 toolbar on server with refering to my email as author. (my thanks for that server)
I put me sources without any license.
And I don't know under what license it should be (are there some rules at codeproject as default)
I understand that in our world everybody can use this project not only for private use but also for sale. But I am feeling uncomfortable.
So I am waiting for opinions...
Meanwhile I have initiative. I don't know is it a name for such kind of license. But there will be 2 main points in it.
a) sources provided as is.
b) you can do anything with them, but you got money for them you have to put URL for that product and your email in some special list.
What do you think?
Also I'll will be very glad to get collection of links for such private toolbars. We can understand how really it is popular and get lot of ideas...
May be I want too much...?
Mike.
|
|
|
|
|