HWND hWnd = FindWindow(NULL, "Calculator");
Syntax Reference : http://msdn.microsoft.com/en-us/library/aa929233.aspx
Example:
#include <windows.h>
int main()
{
HWND hWnd = FindWindow(NULL, "Calculator");
if(hWnd == 0)
{
MessageBox(0, "Error cannot find window.", "Error", MB_OK|MB_ICONERROR);
}
else
{
//Write your code to do somethings here
}
return 0;
}
No comments:
Post a Comment