- #include <windows.h>
- #include <shellapi.h>
-
-
- int WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
- {
- HWND hwnd;
-
- int rc = (int) ShellExecute(hwnd,"open","C:\\MesFichiers\\archive.zip",NULL,NULL,SW_SHOWDEFAULT);
-
- if (rc <= 32)
- {
- if (rc == SE_ERR_NOASSOC)
- MessageBox(hwnd,"Désolé, il n'y a aucun programme de visualisation par défaut !","Erreur", MB_OK | MB_ICONERROR);
- else
- MessageBox(hwnd,"Une erreur s'est produite pendant le lancement de l'application !","Erreur", MB_OK | MB_ICONERROR);
- }
-
- return 0;
- }
#include <windows.h>
#include <shellapi.h>
int WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
{
HWND hwnd;
int rc = (int) ShellExecute(hwnd,"open","C:\\MesFichiers\\archive.zip",NULL,NULL,SW_SHOWDEFAULT);
if (rc <= 32)
{
if (rc == SE_ERR_NOASSOC)
MessageBox(hwnd,"Désolé, il n'y a aucun programme de visualisation par défaut !","Erreur", MB_OK | MB_ICONERROR);
else
MessageBox(hwnd,"Une erreur s'est produite pendant le lancement de l'application !","Erreur", MB_OK | MB_ICONERROR);
}
return 0;
}