473,508 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application.AddmessageFilter

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)
May 20 '07 #1
2 5146
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"P. Meyer" <ph*************@wanadoo.frwrote in message
news:46***********************@news.orange.fr...
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)
May 20 '07 #2
Thanks Nicholas.
Did not try yet but it's helpful.
Philippe
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.coma écrit
dans le message de news:
5F**********************************@microsoft.com...
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"P. Meyer" <ph*************@wanadoo.frwrote in message
news:46***********************@news.orange.fr...
>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)

May 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3275
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
3
3102
by: Amit Dedhia | last post by:
Hi I am developing a Dot net application (involving image processing) on a uni processor. It works well on my machine. I then take all my code on a multi processor, build and run the application...
6
20038
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
4
5484
by: mike2036 | last post by:
Is it possible to put a VB.NET application in a message loop without a form? From what I've read the method Application.Run() (parameterless) allows for this...but how do you define the message...
20
2668
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
6
25025
by: Josef Brunner | last post by:
Hi, I published my application (VS 2005) and am now trying to install it when I get this error message. It worked before...even on a different machine. Here is the detailed description: ...
1
1532
by: Valentin Kotelnitski | last post by:
Hello! I have got an application (some part of which is written by me). There is a control on which events are blocked (not processed) (do not work OnPaint, OnMouseDown, OnMouseOver and other...
0
1504
by: =?Utf-8?B?UmljYXJkbyBGdXJ0YWRv?= | last post by:
I'm a vb programmer but i have to make a control in C# to be consumed by a vb .net application. I've found some help on the internet/newsgroups in order to scan an image from a twain source and...
4
5378
by: =?ISO-8859-15?Q?Albe_V=B0?= | last post by:
In my Application, I need to make a certain graphical refresh, interrogating SqlServer, only if Application has focus (i.e. the title bar is blue). Interrogating .Focused property of various...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.