Lo que quiero exactamente es que si existe un archivo encienda un boton y si no existe, lo desactive.
- Código: Seleccionar todo
if(¿Que es lo que va aqui dentro?)
{
l2btn_start.EnableWindow( false );
}
![]() |
![]() |
|
Moderador: latindeveloper
if(¿Que es lo que va aqui dentro?)
{
l2btn_start.EnableWindow( false );
}

#include <sys/types.h>
#include <sys/stat.h>
struct stat f__stat;
bool bExiste = (stat("c:\\lugar\\archivo.txt",&f__stat) != 0);
if(bExiste)
{
MessageBox("Existe!");
}if (OpenFile("c:\\lugar\\archivo.txt",&ofs,OF_EXIST) != HFILE_ERROR)
{
MessageBox("Existe!");
}CFileFind finder;
BOOL bFound = finder.FindFile("c:\\lugar\\archivo.txt");
if(bFound == true)
{
MessageBox("Existe!");
}if((_access("c:\\lugar\\archivo.txt", 0 )) != -1 )
{
MessageBox("Existe!");
}


CFileFind finder;
BOOL bFound = finder.FindFile("c:\\lugar\\archivo.txt");
if(bFound == true)
{
MessageBox("Existe!");
}

#include <sys/types.h>
#include <sys/stat.h>
struct stat f__stat;
bool bExiste = (stat("c:\\lugar\\archivo.txt",&f__stat) != 0);
if(!bExiste)
{
MessageBox("Existe!");
}
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados