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 / .NET Framework / .NET SDK / January 2004

Tip: Looking for answers? Try searching our database.

Handling broadcasted messages in VC++.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ajju - 06 Jan 2004 14:25 GMT
Hi,

    I'm a rookie to .Net development. I have two VC++
applications, one is an MFC application and another a
VC++.NET managed CONSOLE application. I have to post a
message using Messaging Queues. I broadcast the message
from MFC application using HWND_BROADCAST. Now this event
has to be handled in the managed VC++.NET application.

     Can anyone give an idea of how to catch this event
in the VC++.NET managed console application. Or is there a
different approach for this?

     Thanks in advance.
Regards,
ajju
Chris Taylor - 07 Jan 2004 04:10 GMT
Hi,

Take a look at Application.AddMessageFilter(), this will enable you to add a
message filter to catch the broadcast message.
Alternatively, you could override the WndProc method of the Form and handle
the message in there.

Hope this helps

Signature

Chris Taylor
http://www.xanga.com/home.aspx?user=taylorza

> Hi,
>
[quoted text clipped - 12 lines]
> Regards,
> ajju
Ajay Kumar Mothukuri - 07 Jan 2004 05:24 GMT
Hi,

     my managed application is a console application. Can I use these
methods in a Console application, which does not have any form in it.

Regards,
Ajay
Chris Taylor - 07 Jan 2004 07:22 GMT
Hi,

You can add a hidden form to the console application. And use
Application.Run to start the message loop using an instance of the hidden
form.

Hope this helps
Signature

Chris Taylor
http://www.xanga.com/home.aspx?user=taylorza

>
> Hi,
[quoted text clipped - 4 lines]
> Regards,
> Ajay

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.