Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to send parameter to other application?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00445159
Message ID:
00445390
Views:
17
>>>>As for SendMessage(), there isn't event that actually gets fired, the message just gets send directly to the application's window procedure, and the application decides what to do with the message. In most cases you're limited to the stock Windows messages (you can send a custom message, but that doesn't mean the receiving application knows what to do with it), so this may or may not work for you. There are examples for using SendMessage() in the FAQ if this is what you need. What specifically are you trying to accomplish?
>>>
>>>I'd amplify this statement to say that SendMessage() and PostMessage() and their related API cousins actually queue up indicators (messages) of event occurances in the thread or Window event queue; they don't 'trigger' an event, but act as indicators of an event having taken place, in some cases carrying additional information related to the event (ie, a WM_KEYDOWN message indicates to the event loop that a key was depressed, and it carries additional information indicating exactly which virtual key was pressed.)
>>>
>>>Making the sassumption that a SendMessage() 'causes' an event to fire is a pretty clear indication that the person doesn't understand what a Windows message is in the first place - time to read Petzold or Richter and figure this stuff out before blindly setting off little landmines whith unknown effects.
Ed, what was the phrase you used recently, ah yes... "try to reconcile" .... "there isn't event" with "Making the assumption that a SendMessage() 'causes' an event".
>>
>>Seems to me Mike was saying there is no event per se. Your amplification is probably warranted (and indeed accurate), but the "time to read..." seems a little offensive (and it was not even aimed at me, so I hate to think what Mike makes of it).
>
>Mike knows what SendMessage() does, I'm reasonably certain, having discussed it with him in person. I think my comment, insulting or not, is targeted at the people who try to use lots of API functions like SendMessage() and PostMessage() without knowing what they do; again, I try to read the instructions before operating things for the first time.
>
>AFA reconciling 'there isn't an event' with "Making the assumption that a SendMessage() 'causes' an event", it's simple - there is no single event; what SendMessage() or PostMessage() does is place a message in the message dispatch queue of a Window or thread construct; when that message is processed by the event handler, any of a number of events may be reported, but may not necessarily trigger the execution of specific code in support of the reported event; in fact, one message may trigger multiple events, or may not trigger any event at all. The difference between queuing a message that the event loop handles as it sees fit in a designated order, dependent on the API call used to add the message to the queue, and explicitly issuing an interrupt that dispatches a specific event handling procedure is what I'm trying to get across, perhaps unsuccessfully. Again, Mike Stewart is not the person failing to understand this; I felt it was necessary to amplify an explanation he gave.
>It's the individual posing the question who needs to read about Windows Messages, and is likely to suffer from an inadequate understanding of the consequences of using the Windows Messaging subsystem as a means of IPC and synchronization.
>
>If you, like Mr. Kramar, would prefer that I stopped trying to be helpful, take it away, guys. I have enough of a clue to realize that my input is seen as undesirable and unneeded. I'm certain that you can ensure infinitely greater understanding of what people want to know is made available, at far less risk of introducing deliberate errors and with infinitely greater readability and degree of thorough explanation than I can. I've got a VS.Net beta that I can explore more promptly, secure in the knowledge that you and Michael are happy to tender a better grade of expertise than I might have.
Sorry Ed. (BTW that's an apology). I've just re-read the original post, and it is now clear that your intention was to clarify the (SendMessage) situation with John Jones (and any lurkers) and not with Mike Stewart.

RE: "undesirable and unneeded" - I did not imply, intimate, (or choose your own synonym), that was the case. Merely that your post (and only the concluding paragraph) "seemed" acerbic. I still think this is the case. And unless I am some sort of imbecile, also a little ambiguous as to the intended recipient. I now feel thoroughly enlightened to know that "having discussed it with him in person" you are sure Mike Stewart knew what he was talking about. Alas, I and anyone else following this thread, cannot mind read, and are not privy to these facts. Your help is much appreciated, desireable and (in most cases) needed!

"I'm certain that you can ensure infinitely greater understanding" - tut, tut, such venom.
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform