Post by Lund » Mon, 25 May 1998 04:00:00

I'm using VC++ v5.0 and MFC.  Here is my situation.  Within class "A", I
create an instance of class "B."  I then call a member function of object B
and it returns immediately but continues to operate in the background.  When
object B finishes, I want it to send a message back to object A.  I can't
figure out how to use PostMessage (or PostThreadMessage) correctly.

Neither class is derived from CWinThread.  There are derived from CWnd.  I'm
using the ON_MESSAGE message handler to trap the message.  If I call
PostMessage from within the same class as the ON_MESSAGE handler, it works.
But I can't get it to work when call PostThreadMessage from the child
object.  When I use PostThreadMessage, how can I get the idThread?

Email address modified to prevent spamming.
Remove the "$" in front of address before replying.


1. Postmessage & shift & control


I can send normal keys (letters, numbers, function keys)
to another application using Postmessage (hwnd,
wm_keydown, vbkeycode,0).

However the application doesn't seem to respond to
vkshift, vbkeycontrol. Do normal wm_keydown handlers check
the physical keystates?
This because vbkey6 could give in the targetapp instead
of 6.

Have to try the altkeys with wm_syskey yet.
Can this be done without popping up the receiver-window?

The purpose is a macroutility which sends keys to multiple
windows at a regular interval without interrupting the

Any suggestions?

Target Os win2k or win98
Programming environment visual basic 6

2. How can I have more control over Shared Borders?

3. PostMessage - Invalid window handle in NT/2000

4. Sendmail 8.12.x not respecting forwarding at times. Any ideas??

5. CreateWindow and PostMessage problems in DLL

6. Program works on desktop ; but gives Internal Error if launched from folder ?

7. PostMessage doesn't post (when hooking)

8. Stacker 4.0 for 0S/2?

9. PostMessage behavior

10. Service Process - error on PostMessage

11. calling postmessage from a vxd under win3.1

12. How can I Implement "PostMessage" from Kernel-mode to User-mode?

13. PostMessage/PostThreadMessage failures