I'm currently playing with a worker thread shelling a console program, piping back the output, and then posting this text to the main thread's GUI (a text box). I usually try to use one of Iczelion's tuts as a starting point to work things out, this time I'm using two of them: #15 (threads) and #21 (pipes). Here's my deal: It's working. The thread is created, it opens a pipe, starts another process, gets the data (my debug macros still work inside the thread because it's all the same process). In fact, all the grunt work happens and the app run normally without GPF. HOWEVER, nothing appears back in my main edit box. I'm sure I've got the correct hwnd (I display the same number both in govenor thread and worker thread). I do just the same as Icz did in the pipe tut, except I post messages:

    invoke PostMessage,hWndOutput,EM_SETSEL,-1,0
    invoke PostMessage,hWndOutput,EM_REPLACESEL,FALSE,addr buffer
Anyone know what I'm doing wrong? ------------------------ "Bart, with $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!"
Posted on 2001-03-20 10:27:00 by Ernie
Oops... seems I was using the wrong handle to send messages to. Everything is fine now. Really. ----------------------------------------- "Doh!!!"
Posted on 2001-03-20 11:54:00 by Ernie