Search the web
Sign In
New User? Sign Up
delphi-webbrowser · Delphi: Using IE's WebBrowser
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Subclassing Internet Explorer_Server   Message List  
Reply | Forward Message #10240 of 10267 |
Re: Subclassing Internet Explorer_Server

Huh seems nobody is interested by my post :(

anyway i found a way to solve my problem.
i have a common form for each of the form wich subclass the IEserver
i just call a function in that form wich callback the function in the
original form. not super clean but it work.


--- In delphi-webbrowser@yahoogroups.com, "cedmart1_fr" <cedmart1@...>
wrote:
>
> Hello there.
>
> I am trying to subclass Internet Explorer_Server Message but i got
> some trouble. Let me give u some details.
>
> I have a form Tform wich have a Twebbrowser inside this Twebbrowser is
> aligned client and i want to know when the mouse is over it or not.
> I already managed to do it with a hook but i think it's a bit heavy
> because i send a message to my host form everytime the mouse move
>
> I am trying to use something like this
>
> once i got the handle to my Internet Explorer_Server i do
> OldWindowProc := Pointer(SetWindowLong(IEHWND, GWL_WNDPROC,
> LongInt(@NewWindowProc)));
>
> then my window proc is
>
> function NewWindowProc(WindowHandle : hWnd;
> Message : LongInt;
> ParamW : LongInt;
> ParamL : LongInt) : LongInt stdcall;
> begin
>
>
> if (Message=WM_MOUSEMOVE) AND (mdhook=false) AND (MTCdrag=false) then
> begin
> if tmyform(extobj).opacity<255 then
> begin
> twidgetfrm(extobj).fadeout;
> twidgetfrm(extobj).resetftimer;
> end;
> end;
>
>
> if (Message=WM_LBUTTONDOWN) AND (MDHook=true) then
> begin
> Tmyform(extobj).hookedmd;
> if MDcancel=true then
> begin
> result:=1;
> exit;
> end;
> end;
>
> Result := CallWindowProc(OldWindowProc, WindowHandle, Message,
> ParamW, ParamL);
> end;
>
> mdhook,mtcdrag and extobj are defined below the implementation and
> problem is seems to be shared by all my Twidgetfrm and of course it
> create a bug.
>
> extobj is a back reference to the form that host the webbrowser but it
> always contain the last form created and then the opacity public
> property is not the good one.
>
> any idea how i can access private or public property withing new
> windowproc ? i tried to define newwindowproc as a member of tmyform
> but it does not compile
>
> thx for ur help.
>





Thu Nov 13, 2008 3:51 pm

cedmart1_fr
Offline Offline
Send Email Send Email

Forward
Message #10240 of 10267 |
Expand Messages Author Sort by Date

Hello there. I am trying to subclass Internet Explorer_Server Message but i got some trouble. Let me give u some details. I have a form Tform wich have a...
cedmart1_fr
Offline Send Email
Nov 3, 2008
10:06 pm

Huh seems nobody is interested by my post :( anyway i found a way to solve my problem. i have a common form for each of the form wich subclass the IEserver i...
cedmart1_fr
Offline Send Email
Nov 13, 2008
5:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help