Dave's Brain

Browse - Programming Tips - How can I get the thread id of a given HWND ?

Date: 2008jan19
Platform: win32
OS: Windows
Language: C/C++
Keywords: threadID

Q.  How can I get the thread id of a given HWND ?

A.

DWORD dwTheirThreadId = GetWindowThreadProcessId(hwnd, NULL);

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.