473,936 Members | 25,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to receive message sent from another window?

Hello, guys.

In my application, I need to receive a windows message from another
window, and the other window is a MFC application using SendMessage to
send a custom windows message. So, in my c# application how can I
receive the message? (I know the message identifier in c#
application.)

Thanks.

Dec 18 '06 #1
2 3136
Hooyoo wrote:
In my application, I need to receive a windows message from another
window, and the other window is a MFC application using SendMessage to
send a custom windows message. So, in my c# application how can I
receive the message? (I know the message identifier in c#
application.)
Override the form's WndProc.

(You should be able to find code that will let you mark a method as
[Message(32123)] and then automatically invoke it when message 32123
comes in. For example, my Chapter15\WndPr oc project in the big zip at
www.midnightbeach.com/.net/source.code - though I'm sure you can find
a smaller, more targeted source for the functionality.)

--

..NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Dec 18 '06 #2
Thank you, got it.
Jon Shemitz wrote:
Hooyoo wrote:
In my application, I need to receive a windows message from another
window, and the other window is a MFC application using SendMessage to
send a custom windows message. So, in my c# application how can I
receive the message? (I know the message identifier in c#
application.)

Override the form's WndProc.

(You should be able to find code that will let you mark a method as
[Message(32123)] and then automatically invoke it when message 32123
comes in. For example, my Chapter15\WndPr oc project in the big zip at
www.midnightbeach.com/.net/source.code - though I'm sure you can find
a smaller, more targeted source for the functionality.)

--

.NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Dec 18 '06 #3

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

Similar topics

6
3576
by: Mosher | last post by:
Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this... e.g., <a target=new href="www.mydomain.com/main.php?username=test&id=50> click here </a> ....that will popup another window. This new window should be able to use those variables. Thanks in advance.
3
2768
by: eddie wang | last post by:
I have an the following asp. How to have this asp to open in another window when it is called? Thanks! <% something %> *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
1
1153
by: Christian Perthen | last post by:
Hi, How can I trigger a reload in another window. Basically, I have a main page with link to a pop-up window. When closing the pop-up window I would like to have the main page reloaded (populated with some session variables selected from the pop-up window). Any ideas? Thanks in advance
6
11157
by: harvie wang | last post by:
Hi, How to send a message to every window(include child window), I use SendMessage ,but It can't do that. class frmA { public const int WM_test = 0x400 + 1; protected override void WndProc(ref Message m) {
3
8648
by: Nevyn Twyll | last post by:
I've got a web form with a number of dropdowns, combos, etc. When the user submits the form, I want to redirect them to another form, but I need to pop it in another window. So, I have a hyperlink on the form whose NavigateURL gets refreshed whenever the user makes a selection (...NavigateUrl = '<%#DataBinder.Eval(Container, "GetRedirect()") %>'...) - but it's too slow to do all those round-trips! I understand that in the code-behind...
4
1934
by: astromac | last post by:
I'm new to php and was wondering if the following was possible... I would like to have a list of items loaded from a text file, process each item in the list and then return the processed result to a new window so that the new window displays the results, one by one, until it is done processing the list. I considered javascript but the whole client-side/server-side divide seems difficult for this newbie to figure out. Is what I want...
1
2982
by: Jeff Williams | last post by:
I have an application using dial monitors which is used in an aution room. The auctioneer has a form showing details of the current lot number. As he changes to the next lot number I need to send a message to a form on the other monitor to change to picture to this new lot. Shat is the best way to have a form send a message to another form. ie Monitor one is showing lot 10 details and the monitor two is showing the picture of lot...
4
4363
by: MichaelK | last post by:
Hello. I have all data already collected on the current page? I want to open another window with the form, fill the fields and submit that form. So basically the question is how can I fill all fields and submit the form on another window. Regards, Michael
0
11500
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11078
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11262
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10641
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8200
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7367
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6268
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4894
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4435
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.