How to get main process thead and it's main window handle? I'm getting the process from CreateToolhelp32Snapshot/ Process32First/ Process32Next and then OpenProcess
Posted on 2001-01-09 22:46:00 by The CHEMI$T
I don't know how to separate the "main" thread from others. You can walk the thread list, comparing each thread's processID with the processID of the process you're interested in. To obtain the list of windows associated with a thread, call EnumThreadWindows. The "main" window is the one that has no parent: call GetParent on every window handle and the one that returns 0 is the main window
Posted on 2001-01-10 03:20:00 by Iczelion
Hi ! Get main thread.. handle: GetCurrentThread (pseudo handle) ID: GetCurrentThreadID regards, yoda
Posted on 2001-01-10 07:46:00 by yoda
y0da: The CHEMI$T wants to get hold of the main thread in other process.
Posted on 2001-01-10 08:16:00 by Iczelion