The PostAppMessage function is now obsolete. It has been replaced by the PostThreadMessage function.
To maintain compatibility for older applications, Win32 supports the PostAppMessage function as previously documented. New Win32 applications should use PostThreadMessage.
PostAppMessage used a process identifier as its first parameter. PostThreadMessage uses a thread identifier as its first parameter.
PostThreadMessage