|
First, thanks for you Deskband tool, it's great!
I have made a toolbar for IE with your help.
Now, i have a question: can i get the client area of IE,
and draw a line (by tracking the mouse event)in it ?
That is when a button (in my toolbar)is pressed, i tracking the MOUSE LBUTTONDOWN and MOUSE MOVE event,
and draw a line in the client area.
Thanks.
|
|
|
|
|
Many months back I was working on something related to highlighting items within a browser window. Being able to track mouse events and drawing lines in the client area is relatively easy since you can get the HWND for the web browser from the IE DOM then wrap it for messages you want to recieve and act on.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
thx Erik for ur code, that's great!
everyone of u, have seen how ".pdf" files are opened in IE. Acrobat adds his toolbars, documentview, i.e.
another sample except Adobe Actobat is Crystal Repost's interface.
what is my problem - i've to write something like Adobe Acrobat's interface, but ActiveX, not Active Document.
i mean, that i've to be able to manipulate with that object (ActiveX) in VBScript code.
like this:
<br />
<OBJECT ID="CRViewer"<br />
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"<br />
WIDTH=100% HEIGHT=95%<br />
CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217"><br />
<PARAM NAME="EnableRefreshButton" VALUE=0><br />
<PARAM NAME="EnableGroupTree" VALUE=1><br />
<PARAM NAME="DisplayGroupTree" VALUE=0><br />
<PARAM NAME="EnablePrintButton" VALUE=1><br />
<PARAM NAME="EnableExportButton" VALUE=1><br />
<PARAM NAME="EnableDrillDown" VALUE=1><br />
<PARAM NAME="EnableSearchControl" VALUE=1><br />
<PARAM NAME="EnableAnimationControl" VALUE=1><br />
<PARAM NAME="EnableZoomControl" VALUE=1><br />
</OBJECT><br />
<br />
<SCRIPT LANGUAGE="VBScript"><br />
<!--<br />
Sub Window_Onload<br />
On Error Resume Next<br />
Dim webBroker<br />
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")<br />
if ScriptEngineMajorVersion < 2 then<br />
window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."<br />
CRViewer.ReportName = "rptserver.asp"<br />
else<br />
Dim webSource<br />
Set webSource = CreateObject("WebReportSource.WebReportSource")<br />
webSource.ReportSource = webBroker<br />
webSource.URL = "rptserver.asp"<br />
webSource.PromptOnRefresh = True<br />
CRViewer.ReportSource = webSource<br />
end if<br />
<br />
CRViewer.ViewReport<br />
End Sub<br />
--><br />
</SCRIPT><br />
|
|
|
|
|
thx Erick for ur code, that's great!
everyone of u, have seen how ".pdf" files are opened in IE. Acrobat adds his toolbars, documentview, i.e.
another sample except Adobe Actobat is Crystal Repost's interface.
what is my problem - i've to write something like Adobe Acrobat's interface, but ActiveX, not Active Document.
i mean, that i've to be able to manipulate with that object (ActiveX) in VBScript code.
like this:
OBJECT ID="CRViewer"<br />
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"<br />
WIDTH=100% HEIGHT=95%<br />
CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217"><br />
<PARAM NAME="EnableRefreshButton" VALUE=0><br />
<PARAM NAME="EnableGroupTree" VALUE=1><br />
<PARAM NAME="DisplayGroupTree" VALUE=0><br />
<PARAM NAME="EnablePrintButton" VALUE=1><br />
<PARAM NAME="EnableExportButton" VALUE=1><br />
<PARAM NAME="EnableDrillDown" VALUE=1><br />
<PARAM NAME="EnableSearchControl" VALUE=1><br />
<PARAM NAME="EnableAnimationControl" VALUE=1><br />
<PARAM NAME="EnableZoomControl" VALUE=1><br />
</OBJECT><br />
<br />
<SCRIPT LANGUAGE="VBScript"><br />
<!--<br />
Sub Window_Onload<br />
On Error Resume Next<br />
Dim webBroker<br />
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")<br />
if ScriptEngineMajorVersion < 2 then<br />
window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript <br />
<br />
or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or <br />
<br />
install IE 4.01 SP1. These files are available at Microsoft's web site."<br />
CRViewer.ReportName = "rptserver.asp"<br />
else<br />
Dim webSource<br />
Set webSource = CreateObject("WebReportSource.WebReportSource")<br />
webSource.ReportSource = webBroker<br />
webSource.URL = "rptserver.asp"<br />
webSource.PromptOnRefresh = True<br />
CRViewer.ReportSource = webSource<br />
end if<br />
<br />
CRViewer.ViewReport<br />
End Sub<br />
--><br />
</SCRIPT><br />
|
|
|
|
|
Erik - I'be been an avid folower of your work, your Deskband wizard is a great tool and got me off to a good start. However, I have a problem which I cannot solve! My taskbar deskband (not IE!) has an embedded toolbar which it populates with buttons. When the width of the toolband is adjusted, I have the chevron displayed. However, I cannot trap the notifications sent when the chevron is clicked. My question is, how do I get the notifications?
Thanks for any help in advance,
Mark
|
|
|
|
|
The solutiont to this is to wrap your toolbar in a message reflection window. The reflection window does nothing but forward messages back to your toolbar it would not otherwise get. i.e. notification messages the toolbar sends to the parent which includes the chevron messages.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
I am developing a toolbar to stop those annoying window.open()'s, and all the functionality for that is there, but I'm having trouble registering a wndproc for the toolbar? First off, by registering a wndproc for the toolbar, does the toolbar also send messages for the buttons, etc., since I don't actually define the window class for them? Second, I am using ::SetWindowLong with GWL_WNDPROC and the correct declaration of the function (LRESULT CALLBACK ToolbarProc(HWND, UINT, WPARAM, LPARAM) but I keep getting errors during compiling about typecase problems. I'm using ::SetWindowLong like so:
::SetWindowLong(m_hWnd /* HWND for toolbar /*, GWL_WNDPROC, (LONG) ToolbarProc)
I've also tried typecasting it to (WNDPROC).
Any ideas?
---
Heath Stewart
Network Administrator / Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
|
|
|
|
|
I'm a little new to ATL and am having problems figuring out how to place an MSHTML control inside the view using this app wizard (which I really do appreciate - it saves so much busy work! thanks!). I've looked at several other examples (many on this site) but they don't follow the same pattern. Basically, I'm figuring I need to place the functionality to create the MSHTML control inside RegisterAndCreateWindow(). I didn't want to totally recode everything the wizard's done to make it like the other examples - defeats the purpose of saving time. any help on this? Example using Erik's wizard?
|
|
|
|
|
Are you looking or anything in particular in your example or are you just looking for the MSHTML control free of any HTML?
I can provide with both in little time.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Actually, I'm nearly done custructing an RDF ActiveX control and desk band control to contain it. It uses MS XML parser and basically tries to emulate the side bar in Netscape 6 (mozilla). I still have to construct the toolbar for it and figure out why IPersistStreamInit::* isn't getting called (which is elluding me and even an MVP, even though debug output for IE says it's calling methods of that interface), but then it's done. I'll add enhancements such as RDF drag-and-drop, window.external functionality to add RDF files to the toolbar, and more (like making the ActiveX control display properties and methods like MS-coded ones do instead of the default properties).
The one thing I did that you might be interested in is get the scroll bars to work. I was thinking that in one of your projects you didn't get it to work and tried handling WM_HSCROLL manually. Actually, you don't need to do this. It's as easy as overriding WM_CREATE and calling a couple property functions of IWebBrowser2. I've noticed a lot of other people are having this problem, too. Odd. Basically, you just tell the scroll bars for IE to "turn on" and it handles the rest flawlessly. Interested?
---
Heath Stewart
Systems Administrator / Developer
EsotericRealm / Palisade Systems
http://www.esotericrealm.com/~hstewart
|
|
|
|
|
Where is the source code? I need to view it in html format. MSI failing for unknown reasons.
Thanks,
|
|
|
|
|
I have not published the source code yet, It's under the free programming tools without source section. I have plans to update it in the next month, I will make available the DLL and help files in a zip within 24 hours.
-Erik
|
|
|
|
|
Thanks Erik. I would love to take a look at the code. I'm programming a similar app. and would like a few pointers from you.
|
|
|
|
|
hello,
what's does this color picker do? why would i need it?
forgive me; it wasn't clear from the article...
all best,
brian hart
|
|
|
|
|
People are rating this article low. Is it being rated low just because I didn't supply the source? Are there other reasons. If you rated below a 4, you must have reaons, why not share your reasons.
If there are certain areas you are curious about, I would be willing to post code snippets and update the article.
What's missing that you aren't happy with?
It's easy to press a button, It's better to leave a reason.
-Eri
|
|
|
|
|
Erik,
I am surprised you are surprised.
This is a CODE (as in "source code") board, not a shareware BBS.
Be
|
|
|
|
|
Actually Ben, Erik has give us a great tool for developing your own deskbands. And on top of that, the source IS included to not only making a deskband but creating a wizard. Thank you Erik, I am impressed and will use this tool
|
|
|
|
|
ben,
i certainly do agree with you... even tools should have included source code with them. it is the policy of The Code Project (although i'm not official, so don't quote me ) that *all* posted articles include freely available, public domain source code.
regards,
brian hart
|
|
|
|
|
It is woderdull job for yourself. I learn nothing else that it can be done. That´s why I rate it low.
Code for all...
|
|
|
|
|
Isnt this site made to provide source code too i saw this thing and needed to know how to do that kinda stuff for ie and to my desparation this thing only installs a dll and a chm file. wth is source code if you cant provide source code why do you post stuff like this on codeproject
|
|
|
|
|
Varun,
As I stated in the article, the code was developed using the DeskBand ATL Wizard that I posted in another article. Since this is a TOOL in the FREE TOOL section, and since I have put a lot of hard work into the development of the tool, and I may not keep it free in the future, I choose not to divulge the source. If you would like, I can expand on the architecture of it, but the code itself is no different than the code generated by the DeskBand wizard with CWindowImpl classes in it.
This site is about code and about projects. I have posted the fruits of a project that may help others with their projects, web development and other. That's why I posted stuff like this to the site.
Also, The author's email address is available. Most authors (can't speak for everyone) would probably not mind getting questions about their code or projects, and would probably respond to them all too.
I can't make everyone happy, but I'll do my best.
-Eri
|
|
|
|
|