Dave's Brain

Browse - programming tips - get thread id

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

Q.  How can I get my thread id?

A.

	DWORD	dwMyThreadId:

	dwMyThreadId = GetCurrentThreadId();

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

A.

	DWORD		dwTheirThreadId;

	dwTheirThreadId = GetWindowThreadProcessId(hwnd, NULL);
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, 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.