Well I tried this but it gives me an error:
BOOL CTestApp::OnIdle(LONG lCount)
{
EnumWindows(EnumWindowsProc, NULL);
return TRUE;
}
BOOL CALLBACK CTestApp::EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
char String[255];
char *MyCheck;
if (!hWnd)
return TRUE; // Not a window
if (!::IsWindowVisible(hWnd))
return TRUE; // Not visible
if (!SendMessage(hWnd, WM_GETTEXT, sizeof(String), (LPARAM)String))
return TRUE; // No window title
MyCheck = strstr(String, "C:\\"

;
if (MyCheck != NULL)
// MessageBox("Access Denied!"

;
DestroyWindow(hWnd);
return TRUE;
}
The error that it gives me is:
error C2664: 'EnumWindows' : cannot convert parameter 1 from 'int (struct HWND__ *,long)' to 'int (__stdcall *)(struct HWND__ *,long)'
I just find out that should be a good ideea to use hooks, but i guess i would get more complicated, and i dont even know how to use this hooks (SetWindowsHookEx())