Office 2003 Beta

S

Soumitra Banerjee

Hello Everybody,

I have an Addin, that basically displays a modal dialog. This works fine in
Outlook 2002. In Office 2003 version, the dialog is no longer modal. Is
there a way of making this dialog modal? Any help would be highly
appreciated.

My Code snippet is as follows:
*****************************************************
//Get the handle to the main window

// QI() for _Application
CComQIPtr <Outlook::_Application> spApp(Application);
ATLASSERT(spApp);


m_pOutLookApp = spApp.Detach ();

CComPtr<Outlook::_Explorer> spExplorer;
m_pOutLookApp->ActiveExplorer(&spExplorer);



CComPtr<IOleWindow> spOleWindow;
spExplorer.QueryInterface(&spOleWindow);

if (spOleWindow)
{
spOleWindow->GetWindow(&m_hWnd);
}
..........
****************************************************
...........
//Display the modal dialog.

if (bHasBinderPkg == FALSE)
{
MessageBox(m_hWnd, _T("xxxxxxxxxxxxxxxxx."), _T("XXXXXXXX"),
MB_OK|MB_ICONSTOP);
throw -1;
}

CCSelectAttachment dlg(attachments) ;

dlg.DoModal(m_hWnd);



*****************************************************

Thanks,
Regards,

Soumitra Banerjee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top