Re: PostMessage() Error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



There may also be a limit for shared memory section size for such
inter-process SETTEXT call.

"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:uwasGsEWHHA.3568@xxxxxxxxxxxxxxxxxxxxxxx
one2001boy@xxxxxxxxx wrote:
PostMessage() has a limit of 10,000 byte message in Microsoft on-line
doc. SendMessage() does not have suca a limit in its on-line doc.
It looks that it doesn't make any difference.

No, you are misunderstanding what the doc says. It says the queue is
limited to 10,000 messages. But you only need one WM_SETTEXT message to
post a string of any desired length. That is because the message contains
only a pointer - it does not contain the string.



if using WM_SETTEXT instead of WM_CHAR, both small and large data
doesn't look get sent correctly.



Show your code. You might be doing something wrong.


i = SendMessage(hwnd, WM_SETTEXT, NULL, pc);

is used.

Not sure if there are something missed in the function?

thanks.


Not enough code to diagnose your problem. Give us more code and a more
precise description of exactly what you see happens.

--
Scott McPhillips [VC++ MVP]



.



Relevant Pages

  • Re: PostMessage() Error
    ... SendMessage() does not have suca a limit in its on-line doc. ... you are misunderstanding what the doc says. ... That is because the message contains only a pointer - it does not contain the string. ...
    (microsoft.public.vc.language)
  • Re: PostMessage() Error
    ... SendMessagedoes not have suca a limit in its on-line doc. ... That is because the message contains only a pointer - it does not contain the string. ... But it is the limitation for PostMessage, not for SendMessage(), based on the doc. ... Also, if using SendMessagewith WM_SETTEXT, does it also have the same limitation with the number of message to send? ...
    (microsoft.public.vc.language)
  • Re: Marshaling a string (and struct) for call to SendMessage
    ... Is there no way to do this through SendMessage? ... You will have to find another way to marshal the string across the ... >> I am attempting to set the text on a richedit control in another ... >> public struct SETEXTEX ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SendKeys is affected by clicking on Close button
    ... it's not necessary to create an aliased SendMessage declare ... ... leave it as lparam as any and pass the string using Byval strPassword. ... The problem had to be with the way I was passing lParam since SendMessage ... handle for the Project Properties window could not be used to get the Lock ...
    (microsoft.public.vb.general.discussion)
  • SendMessage WM_SETTEXT Issues
    ... I have gotten my head around things better regarding SendMessage ... when I use WM_SETTEXT to send my string it is not imputing ... Private Declare Function SendMessage Lib "user32" Alias ... Private Declare Function FindWindow Lib "user32" Alias ...
    (microsoft.public.dotnet.languages.vb)