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 / CLR / July 2006

Tip: Looking for answers? Try searching our database.

Sending Window Messages from an MFC app to a Windows Firm tray application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janiv Ratson - 04 Jul 2006 11:54 GMT
Hello,

I have an MFC MDI application and a Windows Forms (2.0) Tray Icon
application.
I want to run a command on the tray application via my MFC application.
There is a "Register" context menu command on the tray icon application.
I want to call the Register command from my MFC MDI application.

I thought of a windows message.
How do I do it?
Is there any other better mechanism to do so?
Thanks,
Janiv Ratson.
Tom Serface - 04 Jul 2006 16:01 GMT
If you know the class of the window on the tray application you can use
FindWindow() to get the window for the class.  Then you can use either
PostMessage() or SendMessage() to send a message to that window.  You should
be able to use the same message ID that is generated when you select the
functionality from the menu in the application.  Basically, the tray
application will not know the difference between the message that came from
the outside or the one from its own menu.

Tom

> Hello,
>
[quoted text clipped - 9 lines]
> Thanks,
> Janiv Ratson.

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.