Click here to Skip to main content
15,894,180 members
Home / Discussions / C#
   

C#

 
GeneralRe: A Design Question. Pin
David Stone7-Oct-03 13:19
sitebuilderDavid Stone7-Oct-03 13:19 
GeneralRe: A Design Question. Pin
jtmtv187-Oct-03 13:51
jtmtv187-Oct-03 13:51 
GeneralQuestion about reflection... Pin
Kryal6-Oct-03 12:56
Kryal6-Oct-03 12:56 
GeneralRe: Question about reflection... Pin
leppie6-Oct-03 15:17
leppie6-Oct-03 15:17 
GeneralRe: Question about reflection... Pin
Blake Coverett6-Oct-03 20:20
Blake Coverett6-Oct-03 20:20 
GeneralPheonix Pin
leppie7-Oct-03 7:45
leppie7-Oct-03 7:45 
GeneralRe: Pheonix Pin
Blake Coverett7-Oct-03 15:43
Blake Coverett7-Oct-03 15:43 
GeneralBEGINNER: Help with messaging Pin
BambooMoon6-Oct-03 12:52
BambooMoon6-Oct-03 12:52 
Please be kind if this is a foolish question or has been discussed ad nauseum, but I can't find it and I don't get it.

As a dyed-in-the-wool C++/MFC programmer, I now have to start usign C#, but of course new programs I write still have to interact with existing C++/MFC programs. The existing C++/MFC programs communicate with each other through Windows messages (mostly WM_USER + xxx, but also sometimes just sending a WM_CLOSE to close each other). They ALSO communicate internally to a given process among threads by using PostMessage() and PostThreadMessage() with user-defined messages.

So, to my questions:

1) Is it true, as I've read in several places now, that the only/best way for a C# application to receive a Windows message is by overriding WinProc? That seems hideous.

2) Is it true, as I've also read, that the only way for a C# application to send a Windows message to another application is by P/Invoke of SendMessage()?

3) Finally, for the communication between threads or windows of a given process. I realize that I can call functions back and forth, use delegates, or whatever, but (pardon my ignorance), that seems very synchronous and painful compared with being able to call PostMessage() or PostThreadMessage() and not have to wait for the receiver to process the message. Is there a better way?

Thanks for any advice.
GeneralRe: BEGINNER: Help with messaging Pin
jparsons6-Oct-03 12:54
jparsons6-Oct-03 12:54 
GeneralProblem with embedded NULLs. Pin
Alvaro Mendez6-Oct-03 12:24
Alvaro Mendez6-Oct-03 12:24 
GeneralShell Refresh (Desktop) Pin
Developer @ RGG Network6-Oct-03 10:53
Developer @ RGG Network6-Oct-03 10:53 
GeneralRe: Shell Refresh (Desktop) Pin
jtmtv186-Oct-03 17:53
jtmtv186-Oct-03 17:53 
GeneralRe: Shell Refresh (Desktop) Pin
Developer @ RGG Network6-Oct-03 20:20
Developer @ RGG Network6-Oct-03 20:20 
GeneralRe: Shell Refresh (Desktop) Pin
jtmtv187-Oct-03 13:08
jtmtv187-Oct-03 13:08 
GeneralLogic help: Storing the cast of a movie Pin
tsigo6-Oct-03 10:31
tsigo6-Oct-03 10:31 
GeneralRe: Logic help: Storing the cast of a movie Pin
Daniel M. Edwards6-Oct-03 12:18
Daniel M. Edwards6-Oct-03 12:18 
GeneralRe: Logic help: Storing the cast of a movie Pin
Mike Ellison6-Oct-03 14:47
Mike Ellison6-Oct-03 14:47 
GeneralRe: Logic help: Storing the cast of a movie Pin
tsigo6-Oct-03 14:57
tsigo6-Oct-03 14:57 
GeneralXML Schema Pin
frank216-Oct-03 9:01
frank216-Oct-03 9:01 
GeneralRe: XML Schema Pin
leppie6-Oct-03 9:08
leppie6-Oct-03 9:08 
GeneralPre-Build events for specific configurations Pin
Joe Woodbury6-Oct-03 8:42
professionalJoe Woodbury6-Oct-03 8:42 
GeneralRe: Pre-Build events for specific configurations Pin
leppie6-Oct-03 9:21
leppie6-Oct-03 9:21 
GeneralRe: Pre-Build events for specific configurations Pin
Joe Woodbury6-Oct-03 9:39
professionalJoe Woodbury6-Oct-03 9:39 
GeneralStatistical Functions in C# Pin
AZBugsBunny6-Oct-03 8:00
AZBugsBunny6-Oct-03 8:00 
GeneralRe: Statistical Functions in C# Pin
leppie6-Oct-03 9:28
leppie6-Oct-03 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.