Bonjour à tous
j'ai créer un messagebox avec 2 bouton OKCANCEL
messagebox(0,"............",0+MB_OKCANCEL+MB_ICONINFORMATION);
ShellExecute(0, "open", "C:\\test.doc", 0, 0, SW_SHOWNORMAL);<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /??>
je cherche le code pour annuler ShellExecute et fermer le message box
Avez-vous une idée
Merci d'avance
Re Bonjour
voilà mon problème, ShellExecute çà marche avec les 2 bouton, soit en clic sur Ok, soit sur Annuler.
je cherche le code pour ne pas executer ShellExecute si en clic sur le bouton Annuler.
Merci
If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
If the function succeeds, the return value is one of the following menu-item values.
IDABORT, Abort button was selected., ----
IDCANCEL, Cancel button was selected., ----
IDCONTINUE, Continue button was selected., ----
IDIGNORE, Ignore button was selected., ----
IDNO, No button was selected., ----
IDOK, OK button was selected., ----
IDRETRY, Retry button was selected., ----
IDTRYAGAIN, Try Again button was selected., ----
IDYES, Yes button was selected.
...
example :
if (MessageBox(hwndDlg, SZNOTFOUND, SZDELETEITEM, MB_OKCANCEL) ==IDOK)
{
// Prompt for a new item name and repeat the command.
}
else
{
// Cancel the command.
}
Re Bonjour à tous
pas de réponse, pas d'aide je trouve la programmation en c ou c++ est trés difficile, j'ai essayer tant de fois j'ai pas avancer en 1% en programmation.
comême merci pour tous les forumeurs, je vais retourner sous excel c'est mon niveau.
Merci à toute et à tous.