Du kan f.eks. gøre det ved at bede Windows om at lave en 'mailto:', som vil få dit default mail program til at starte op. (Analogt til hvad de fleste hjemmesider gør.)
// Start default e-mail application with specified e-mail address, // subject "Driver instructions for <vehicle>", and "Hi <driver>" // + message as body text. tmpStr = "mailto:" + edtTO->Text + "?subject=" + edtSUBJECT->Text + "&body=" + memoBODY->Lines->Text;
// Create new string, where all blanks have been converted to %xx where // xx is the hexadecimal value of the character. cgiStr = MakeCGIstring(tmpStr);
shellExe = ShellExecute(Application->Handle, "open", cgiStr.c_str(), /*Parms*/ NULL, NULL, SW_SHOWNORMAL); if ((int)shellExe <= 32L) Application->MessageBox("E-mail program could NOT be automatically started - Check that a default mail " "application has been defined, or start it manually. Then try again.", "Error starting e-mail program", MB_ICONERROR | MB_OK);
Men hvis der står en forklaring længere nede, så finde eventuelle senere læsere vel også ud af det.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.