Can not minimize the outlook window while using MAPI to send mail

A

Anu

Dear All,

I am using the MAPI to send a mail from outlook. The code works
correctly.
the only problem I am facing is that when it opens the new mail window
in outlook, the new windows can be closed / resized but I can not
minimize the window. So is there any restriction with MAPI?
The code is given below:
-------------------------------------------------
HMODULE hlibMAPI=LoadLibrary(_T("MAPI32.DLL"));
if(hlibMAPI)
{
LPMAPILOGON m_fpMAPILogon =
(LPMAPILOGON) GetProcAddress(hlibMAPI, "MAPILogon");
LPMAPILOGOFF m_fpMAPILogoff =
(LPMAPILOGOFF) GetProcAddress(hlibMAPI, "MAPILogoff");
LPMAPISENDMAIL lpfnSendMail=
(LPMAPISENDMAIL)GetProcAddress(hlibMAPI,"MAPISendMail");
if (m_fpMAPILogon == NULL || m_fpMAPILogoff == NULL || lpfnSendMail ==
NULL)
AfxMessageBox(AFX_IDP_INVALID_MAPI_DLL);

if(lpfnSendMail)
{
(lpfnSendMail)(NULL,0,&note,MAPI_DIALOG | MAPI_LOGON_UI,0);
}
else
AfxMessageBox(_T("Error in MAPISendMail!"));
 

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