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,¬e,MAPI_DIALOG | MAPI_LOGON_UI,0);
}
else
AfxMessageBox(_T("Error in MAPISendMail!"));
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,¬e,MAPI_DIALOG | MAPI_LOGON_UI,0);
}
else
AfxMessageBox(_T("Error in MAPISendMail!"));