How to find window handle from exe file's name
<p>Imagine I have Firefox and I open Firefox Start Page, then I should have a Window with the title: "Mozilla Firefox Start Page - Mozilla Firefox".</p>

<p>I can find window handle with the code below</p>

<pre><code>HWND hwnd = ::FindWindow(0, _T("Mozilla Firefox Start Page - Mozilla Firefox"));
</code></pre>

<p>But what I want is find window handle from the window's exe file's name like this</p>

<pre><code>HWND hwnd = FindWindowFromExe(_T("firefox.exe"));//How to make this function?
</code></pre>

<p>Does windows Api has a function like FindWindowFromExe()? If it doesn't, what is the best way to Find window from its exe?</p>

<p>Thanks for reading :)</p>