Click here to Skip to main content
15,895,709 members
Articles / Desktop Programming / ATL

A VC++ Outlook COM Add-in that publicizes a custom form

Rate me:
Please Sign up or sign in to vote.
4.27/5 (7 votes)
6 Apr 20054 min read 183.8K   1.5K   42  
This article explains how to publicize and retrieve data from custom Outlook forms programmatically.
// PropPage.cpp : Implementation of PropPage
#include "stdafx.h"
#include "PropPage.h"
#include "Addin.h"
#include ".\proppage.h"


STDMETHODIMP PropPage::GetControlInfo(LPCONTROLINFO lpCI)
{
	m_bCustomForm=true;
	CheckRadioButton(IDC_RADIO1,IDC_RADIO2,IDC_RADIO1);
    return S_OK;
}


// PropPage

LRESULT PropPage::OnBnClickedButtonLoad(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	if (m_bCustomForm)
		m_pForm->LoadCustomForm();
	else
		m_pForm->LoadDefaultForm();
	return 0;
}


LRESULT PropPage::OnBnClickedRadioCustom(WORD /*wNotifyCode*/, WORD /*wID*/, HWND hWndCtl, BOOL& /*bHandled*/)
{
	m_bCustomForm = true;
	return 0;
}

LRESULT PropPage::OnBnClickedRadioDefault(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	m_bCustomForm = false;
	return 0;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Engineer
Italy Italy
See Andrea's profile on Linkedin

Comments and Discussions