Hey All,
I am having a problem with the function "SetForegroundWindow". From googling I am readin that it does not work for MSVC 6 MFC on a vista machine???? I am trying to write code that will check if a window is open, if the window is open bring the window to the foreground, if the window is not open open window:
FILE * pFile = fopen ("EvolveTraffic.exe", "rt");
if (pFile==NULL)
{ ShellExecute(this->m_hWnd,"open",
"\EvolveTraffic.exe","","", SW_SHOW );
}
else
{
HWND hWnd = ::FindWindow(NULL,"EvolveTraffic.exe");
SetForegroundWindow(hWnd);
}
I am getting a compile error "'SetForegroundWindow' : function does not take 1 parameters". I am completely stumped here, any help would be greatly appreciated, thanks.
Colm