|
Hi All,
Can anybody help how can we get the xml file everytime I open a new window.
Thanks & Regards
Pardha
|
|
|
|
|
Put on the XML the follow lines, inside <TOOLBAR>:
<SETTINGS>
<CHECKBOX id="UpdateAutomatically" default="1"/>
</SETTINGS>
|
|
|
|
|
Hi Lwen,
you are right by doing this I was able get the latest xml file when it is there in my local system but I was unable to get when it is there in web site.
const _bstr_t serverpath "http://www.xxx.com/Toolbar/"; //not working
const _bstr_t serverpath "c:\toolbar\"; //working fine
|
|
|
|
|
IN the XML file in the settings section add
<CHECKBOX id="Scope" default="-1"/>
If "-1" is there and autoupdate is defaulted to 1 then it will update on every opening.. Note this does slow down ie when opening.. gets more pronounced on a slow connection or heavy net traffic/web server bogged down day.
Lee H
|
|
|
|
|
|
Hello Mike,
I think this question is not posted before. I need to know, how can we add a hyperlink TAG in the toolbar. can you guide me in steps. Thanks
Hardwork is key to success...
Bilal Ahmed
|
|
|
|
|
Thanks for not replying Mike. I have done it myself
Hardwork is key to success...
Bilal Ahmed
|
|
|
|
|
Bilal Ahmed wrote:
Thanks for not replying Mike. I have done it myself
Hardwork is key to success...
Bilal Ahmed
Can you tell me how you did it?
Bart Koemans
Netherlands
|
|
|
|
|
Ofcourse yes. Follow these steps.
1. Inherit HLink struct from Button struct. The complete code is here.
/////////////////////////////////////////
// HLINK = Hyperlink Button - mouse events
struct HLink : public Button
{
HPEN hPen, hPenHot;
RECT rect;
DWORD dwRet;
HLink()
{
hPen=CreatePen(PS_SOLID,1,RGB(0,0,255));
hPenHot=CreatePen(PS_SOLID,1,RGB(255,0,0));
}
~HLink()
{
DeleteObject(hPen);
DeleteObject(hPenHot);
}
virtual DWORD OnItemPrePaint(CBandToolBarCtrl* ctrl,LPNMTBCUSTOMDRAW lpTBCustomDraw)
{
CDCHandle dc = lpTBCustomDraw->nmcd.hdc;
rect.left = lpTBCustomDraw->rcText.left+lpTBCustomDraw->nmcd.rc.left+5;
rect.right = lpTBCustomDraw->rcText.left+lpTBCustomDraw->nmcd.rc.right-6;
rect.bottom = lpTBCustomDraw->rcText.bottom-2;
bool BTN_OVER = (lpTBCustomDraw->nmcd.uItemState & CDIS_HOT) == CDIS_HOT;
bool BTN_PRESSED = (lpTBCustomDraw->nmcd.uItemState & CDIS_SELECTED) == CDIS_SELECTED;
if(BTN_PRESSED){
lpTBCustomDraw->clrText = RGB(255,0,0);
dc.SelectPen(hPenHot);
rect.left += 1;
rect.right += 1;
rect.bottom += 1;
dwRet = TBCDRF_NOEDGES;
}
else if(BTN_OVER){
lpTBCustomDraw->clrText = RGB(255,0,0);
dc.SelectPen(hPenHot);
dwRet = TBCDRF_NOEDGES;
}
else{
lpTBCustomDraw->clrText = RGB(0,0,255);
dc.SelectPen(hPen);
dwRet = CDRF_DODEFAULT;
}
dc.MoveTo(rect.left, rect.bottom);
dc.LineTo(rect.right, rect.bottom);
return dwRet;
}
};
/////////////////////////////////////////
2. In the toolbar "determine" method add this line, which will add the HLINK tag in XML.
/////////////////////////////////////////
XML::determineMember<HLink>(m_toolbarItems,_T("HLINK"),p);
/////////////////////////////////////////
NOTE: The effect I gave to this Hyperlink button was just my choice as when you click it moves its position as a pressed button text, but if you don't want this effect then use TEXTOUT for drawing. Or may be you can find a much better solutions for this.
and enjoy
Hardwork is key to success...
Bilal Ahmed
|
|
|
|
|
Hi:
Unfortunally, i am not a C++ programmer and need your help.
How difficult is to make this toolbar more dinamic, where I can allow specific acess to some user (like intranet).
After user logs in, I make a .asp page to enable/disable some functions individually. There is any way to input password types?
And this tool is one of the best I ever found... Congrats!
Lee
|
|
|
|
|
If anyone interested just let me know.
I made an .ASP code on ticker to login and catch users preferences and them personalize the toolbars.
|
|
|
|
|
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.
|
|
|
|
|