Re: PostMessage() Error
<one2001boy@yahoo.com> wrote in message
news:uDXBSDkWHHA.1036@TK2MSFTNGP03.phx.gbl...
Ben Voigt wrote:
Look, this thread has been going on for three days now, and at every step
you are requiring the volunteers here to extract one tiny bit of
information at a time. We CANNOT read your mind. We do not know what
you
are trying to accomplish.
The fact that you mentioned "plotting" in one message suggests to me that
you are trying to trigger some action in another application. That is
CERTAINLY something that you have not mentioned previously. If you are
trying to simulate human activity in another app, then you have to
simulate
ALL of the human activity. For example, if you have to enter text and
click a button, then your app will have to enter text and click a button.
You're doing the "enter text" part now, but not the click a button.
Tell us exactly what you are trying to do. THEN we can offer meaningful
help.
[quote from ancient thread history]
I am talking about Gnuplot wgnuplot.exe, yes, it supports edit control.
not sure how to get the standard input into clickboard and then simulate
paste to GUI application?
[/quote]
Not sure why OP isn't using pgnuplot, which implements exactly this
message-sending stuff as a workaround to the fact that you can't have
input piped in unless you are a console app, in which case you get a
console even when not needed.
pgnuplot.exe has the problem that I want to resolve.
I have a data file size 14K and cannot be handled.
The problem is that microsoft PostMessage() doesn't allow 10k messages.
I summarized the problem as relating the send/receive data for 14K.
nothing related how GUI handle the button/plotting etc.
Sorry if I didn't make the issue clear.
Ok, well, wgnuplot is definitely not using a standard windows EDIT control,
it might perhaps be a heavily subclassed version but I think it's written
almost from scratch.
The correct solution, and if you get this to work all wgnuplot users will
probably love you for it, is to get rid of IPC entirely. There's no reason
that pgnuplot should need to open wgnuplot and start simulating GUI input in
order to process a file from stdin. To do this right, would entail
splitting wgnuplot into two pieces, wgnuplot.exe which has the interactive
GUI, and a dll (gpshared.dll?) that has all the plot layout, etc features,
that need to be accessible from pgnuplot. Then pgnuplot would be changed to
invoke this new API instead of the hack it currently is. Note that you
won't be able to perfectly separate GUI processing from the plot code in the
dll, because of the "windows" output driver. So you'd have to have a
function for setting the HWND of the plot window or something to that
effect, and then disable the "windows" output driver if it hasn't been
properly associated to a window. That would also open up possibilities in
integrating gnuplot into other apps using its DLL.