salut,
'ai retrouvé ce vieu truc en C d'un vieu prog
<pre>
void manuel(HWND hwnd,char *fiche)
{
char command[300];
char chemin1[300];
char chemin2[300];
LPTSTR val;
HANDLE Pross;
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(command,0,300);
memset(chemin1,0,300);
memset(chemin2,0,300);
if(recherche_wordpad(chemin1) != 0)
{
GetFullPathName(fiche,MAX_PATH,chemin2,&val);
strcpy(command,"wordpad.exe " );
strcat(command,chemin2);
ZeroMemory(&si,sizeof(STARTUPINFO));
ZeroMemory(&pi,sizeof(PROCESS_INFORMATION));
si.cb = sizeof(STARTUPINFO);
CreateProcess(chemin1,command,NULL, NULL,FALSE,IDLE_PRIORITY_CLASS, NULL, NULL, &si, &pi);
Pross = pi.hProcess;
WaitForSingleObject(&Pross,INFINITE);
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
else
{
wsprintf(command,"Wordpad.exe est introuvable \n Veuillez le copier dans le \n répertoire de LOG2PI.exe" );
MessageBox(hwnd,command,"WORDPAD INTROUVABLE",MB_OK|MB_ICONASTERISK);
}
RedrawWindow(hwnd,NULL,NULL,RDW_ERASE | RDW_INVALIDATE);
lulu(hwnd);
}
</pre>
fichie1 contient le nom du fichier.doc exemple. "manuel.doc"