N
Nauman Khan
Hi!
I'm writting my Outlook Adding using VC6 and ATL. And now I
experienced problem when trying to add my addin's property page to
Tools->Options notebook.
This how I'm adding page:
void _stdcall OnOptionPagesAdd(IUnknown* Pages)
{
CComQIPtr<Outlook:ropertyPages> spPages(Ctrl);
ATLASSERT(spPages);
//ProgId of the propertypage control
CComVariant varProgId(OLESTR("OutlookAddin.ConfigurationPage"));
//tab text
CComBSTR bstrTitle(OLESTR("Account"));
HRESULT hr = spPages->Add((_variant_t)varProgId,(_bstr_t)bstrTitle);
if(FAILED(hr))
MessageBox(NULL, _T("Failed adding propertypage"), _T(""), MB_OK);
}
All wokrks fine. I'm able to open Tools->Options and see my page name
between the others. But when I clicking on it, Outlook displays the
following message:
"Unable to display "Account" page. This page will remain visible, but
is not available".
Can anyone help me to solve this problem?
Regards
Nauman
I'm writting my Outlook Adding using VC6 and ATL. And now I
experienced problem when trying to add my addin's property page to
Tools->Options notebook.
This how I'm adding page:
void _stdcall OnOptionPagesAdd(IUnknown* Pages)
{
CComQIPtr<Outlook:ropertyPages> spPages(Ctrl);
ATLASSERT(spPages);
//ProgId of the propertypage control
CComVariant varProgId(OLESTR("OutlookAddin.ConfigurationPage"));
//tab text
CComBSTR bstrTitle(OLESTR("Account"));
HRESULT hr = spPages->Add((_variant_t)varProgId,(_bstr_t)bstrTitle);
if(FAILED(hr))
MessageBox(NULL, _T("Failed adding propertypage"), _T(""), MB_OK);
}
All wokrks fine. I'm able to open Tools->Options and see my page name
between the others. But when I clicking on it, Outlook displays the
following message:
"Unable to display "Account" page. This page will remain visible, but
is not available".
Can anyone help me to solve this problem?
Regards
Nauman