Hi All

I am trying to find excel file is open or not through FindWindow function.
Code:
CWnd *pExal;
pExal = CWnd::FindWindow(NULL, _T("C:\\test.xls"));
if(pExal == NULL){
	AfxMessageBox("Couldn't find Excel file");
}
else
{
	
	AfxMessageBox("Excel file is open");
}
In this code if file is open then show
Code:
pExal == NULL
nad if not open then also
Code:
pExal == NULL
where i am wrong.Plz help me