Home > Software engineering >  MFC WM_SETTEXT
MFC WM_SETTEXT

Time:10-17

I use the MFC WM_SETTEXT message sent to another process, if there is no problem, use SendMessage to PostMessage the other party will not receive this message, is this why

CodePudding user response:

LParam is beyond the scope?

With global static variables or local variables try
 
The static cstrings szLocal;
SzLocal=_T (" XXXXX ");
: : PostMessage (hWnd, 0, (LPARAM) (LPCTSTR) szLocal);

CodePudding user response:

reference 1st floor zgl7903 response:
lParam is beyond the scope?

With global static variables or local variables try
 
The static cstrings szLocal;
SzLocal=_T (" XXXXX ");
: : PostMessage (hWnd, 0, (LPARAM) (LPCTSTR) szLocal);

Not ah, just using postmessage doesn't (work well)

CodePudding user response:

Any message with the range below WM_USER always be sent by the asynchronous message functions provides with a String parameter for crossing the processes. (Note: PostMessage is asynchronous).

CodePudding user response:

If the specified window was created by a company's thread, the system switches to that thread and calls the appropriate window procedure.
  • Related