Add to contact window disappears when <New Contact> is tapped RRS feed

  • Question

  • Hi
    I m trying to bring up add to contact screen and allow user to bring up <new contact> or add to existing contact.


    const CEPROPID c_propidAllEmail = PIMPR_ALL_EMAIL;

    CHOOSECONTACT cc = {0};

    cc.cbSize =

    sizeof (cc);


    hr = ChooseContact(&cc);


    Save to contact screen comes up when I do this, But when I click on the <New Contact> the whole window closes and my function (ChooseContact) returns. I see in SPY that this window has got a WM_DESTROY and hence closed.

    I do not want this to get closed but allow user to finish the operation of adding a new contact or add number to existing contact.

    How do I achieve this?

    Wednesday, December 16, 2009 5:19 PM


  • Hi,

    You can use the following command line to start the Contacts application:
      poutlook.exe contacts

    To do it programmatically, call CreateProcess or ShellExecuteEx. There is a sample in the following thread:

    If you want to go to the "Add a new contact" view directly, you can invoke the following command line:
      poutlook.exe contacts -new

    Chunsheng Tang

    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Wednesday, December 23, 2009 2:39 AM
    Monday, December 21, 2009 6:42 AM