|
From: Jose de on 27 Apr 2008 03:09 These were of great help to me, thanks. Question, how do you use PostMessage(...) when working with non-window apps, (e.g. console apps as in my case?) Does a main thread in a console have a HWND ?
From: Alex Blekhman on 27 Apr 2008 05:59 <Jose de Alba> wrote: > Question, how do you use PostMessage(...) when working with > non-window apps, (e.g. console apps as in my case?) > > Does a main thread in a console have a HWND ? If you want to use windows messages as a communication mechanism between threads, then you can create message-only window (search for "HWND_MESSAGE" in MSDN) in main thread and post messages to it with `PostMessage' from working threads. You'll need to mainatin message loop in main thread, too. On start no thread has windows by default. HTH Alex
From: SvenC on 27 Apr 2008 12:45 Hi Jose, > Question, how do you use PostMessage(...) when working with > non-window apps, (e.g. console apps as in my case?) > > Does a main thread in a console have a HWND ? You do not need an HWND at all to post messages to a thread. Just use PostThreadMessage to send and run a GetMessage loop in the thread receiving messages. -- SvenC
|
Pages: 1 Prev: $$$ on line hero $$$ Next: Porting 32 bit applications to 64 bit in Visual Studio 2005 |