Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / May 2007

Tip: Looking for answers? Try searching our database.

Application.AddmessageFilter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
P. Meyer - 20 May 2007 16:21 GMT
Hi
I want to reroute messages with a certain code to a specific control.

I need to intercept those messages at Application level since the main
window doesn't catch a third party  ActiveX.  It is done correctly with my
IMessageFilter.

From there I would like to create (and SendMessage) a new message with same
parameters except the Handler. The problem I have is to get the main window
handler from inside IMessageFilter process.

Any short example would be very appreciated!

Philippe (C# student)
Nicholas Paldino [.NET/C# MVP] - 20 May 2007 17:39 GMT
Philippe,

   You should be able to change the HWnd property of the structure to the
handle of the window you want to route the messages to.  Since the
PreFilterMessage method takes the structure by ref, any changes you make to
it will stick after the method exits.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hi
> I want to reroute messages with a certain code to a specific control.
[quoted text clipped - 10 lines]
>
> Philippe (C# student)
P. Meyer - 22 May 2007 21:38 GMT
Thanks Nicholas.
Did not try yet but it's helpful.
Philippe

"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> a écrit
dans le message de news:
5F566EA4-B70F-4A61-BB26-4A3D9A77948A@microsoft.com...
> Philippe,
>
[quoted text clipped - 17 lines]
>>
>> Philippe (C# student)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.