Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can I open default mail client from my app in VC?

How can I open default mail client from my app in VC?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondesign
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karavaev Denis
    wrote on last edited by
    #1

    pls ============== www.design.kg

    N 1 Reply Last reply
    0
    • K Karavaev Denis

      pls ============== www.design.kg

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      use this

      ShellExecute(this->m_hWnd,"open","mailto:","","",SW_SHOW);

      Nish Sonork ID 100.9786 voidmain
      www.busterboy.org
      Nish is a BIG fan of Goran Ivanisevic

      K 1 Reply Last reply
      0
      • N Nish Nishant

        use this

        ShellExecute(this->m_hWnd,"open","mailto:","","",SW_SHOW);

        Nish Sonork ID 100.9786 voidmain
        www.busterboy.org
        Nish is a BIG fan of Goran Ivanisevic

        K Offline
        K Offline
        Karavaev Denis
        wrote on last edited by
        #3

        ? ============== www.design.kg

        N 1 Reply Last reply
        0
        • K Karavaev Denis

          ? ============== www.design.kg

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          you need to open the following registry key HKEY_CLASSES_ROOT\mailto\shell\open\command Nish Sonork ID 100.9786 voidmain
          www.busterboy.org
          Nish is a BIG fan of Goran Ivanisevic

          L 1 Reply Last reply
          0
          • N Nish Nishant

            you need to open the following registry key HKEY_CLASSES_ROOT\mailto\shell\open\command Nish Sonork ID 100.9786 voidmain
            www.busterboy.org
            Nish is a BIG fan of Goran Ivanisevic

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            :confused:

            N 1 Reply Last reply
            0
            • L Lost User

              :confused:

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #6

              (1) open the key HKEY_CLASSES_ROOT\mailto\shell\open\command (2) read it default value. I got this when I did that here "%ProgramFiles%\Outlook Express\msimn.exe" /mailurl:%1 (3) you need to replace %ProgramFiles% with the actual path for that use SHGetSpecialFolderLocation and SHGetSpecialFolderPath [you'll find samples in CP] (4) forget the /mailurl:%1 part (5) shellexecute the rest of it :-) Nish Sonork ID 100.9786 voidmain
              www.busterboy.org
              Nish is a BIG fan of Goran Ivanisevic

              M 1 Reply Last reply
              0
              • N Nish Nishant

                (1) open the key HKEY_CLASSES_ROOT\mailto\shell\open\command (2) read it default value. I got this when I did that here "%ProgramFiles%\Outlook Express\msimn.exe" /mailurl:%1 (3) you need to replace %ProgramFiles% with the actual path for that use SHGetSpecialFolderLocation and SHGetSpecialFolderPath [you'll find samples in CP] (4) forget the /mailurl:%1 part (5) shellexecute the rest of it :-) Nish Sonork ID 100.9786 voidmain
                www.busterboy.org
                Nish is a BIG fan of Goran Ivanisevic

                M Offline
                M Offline
                Masaaki Onishi
                wrote on last edited by
                #7

                Hello, the codegurus around the world.;) :-D Have a nice day!

                -Masaaki Onishi-

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups