<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Visual C++ Tips &#187; goto process</title>
	<atom:link href="http://weseetips.com/tag/goto-process/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to locate the process which owns the window by using window handle?</title>
		<link>http://weseetips.com/2008/07/05/how-to-locate-the-process-which-owns-the-window-by-using-window-handle/</link>
		<comments>http://weseetips.com/2008/07/05/how-to-locate-the-process-which-owns-the-window-by-using-window-handle/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 21:11:03 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Windows APIs]]></category>
		<category><![CDATA[GetWindowThreadProcessId()]]></category>
		<category><![CDATA[goto process]]></category>
		<category><![CDATA[task manager]]></category>
		<category><![CDATA[taskmgr]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=202</guid>
		<description><![CDATA[&#8220;Goto Process&#8221; menu item in Task Manager is one of the frequently used stuff. isn&#8217;t it? Its shows a list of windows currently displayed in desktop and by using &#8220;Goto Process&#8221;, we can find the process which owns the window. Have a look at it and feel refreshed! Ever thought of doing the same? How [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
<span style="color:#0000ff;">&#8220;Goto Process&#8221; menu item in Task Manager is one of the frequently used stuff. </span>isn&#8217;t it? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Its shows a list of windows currently displayed in desktop and by using <span style="color:#0000ff;">&#8220;Goto Process&#8221;</span>, we can find the process which owns the window. Have a look at it and feel refreshed! Ever thought of doing the same? <span style="color:#0000ff;">How can we identify the process which owns the window by using window handle?</span></p>
<p><img class="alignnone size-full wp-image-203" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/07/taskmgr_gotoprocess.jpg" alt="" width="463" height="510" /></p>
<p><img class="alignnone size-medium wp-image-12" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
You can use the api &#8211; <span style="color:#0000ff;">GetWindowThreadProcessId()</span>. If you provide the window handle, if will return back the Id of the process which owns that window. Have a look at code snippet.</p>
<pre>// Get the Id of Process which owns Windows Desktop.
DWORD dwProcessId = 0;
GetWindowThreadProcessId( ::GetDesktopWindow(),
                          &amp;dwProcessId );</pre>
<p><img class="alignnone size-medium wp-image-18" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Pretty good! nah? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-53" src="http://weseetips.files.wordpress.com/2008/03/intermediateseries.jpg?w=248" alt="" width="248" height="32" /><br />
Targeted Audience &#8211; Intermediate.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/07/05/how-to-locate-the-process-which-owns-the-window-by-using-window-handle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

