home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
common
/
msdev98
/
bin
/
ide
/
mapicomp.dll
/
TEMPLATE
/
133
Wrap
Text File
|
1998-06-18
|
1KB
|
43 lines
// CG: This block was added by the MAPI component
{
// TODO: Add a menu item for sending mail:
// 1. In ResourceView, open your application's menu resource
// 2. Select the File submenu
// 3. Double-click on the blank item at the bottom of the submenu
// 4. Assign the new item an ID: ID_FILE_SEND_MAIL
// 5. Assign the item a Caption: Sen&d...
// TODO: Delete this entire block of code.
// The code below is only for temporary use, until the above
// instructions have been carried out. This code will not work
// correctly if your application has multiple menus or is an
// MDI application and starts up maximized.
CMenu* pMenu = NULL;
CMenu* pFileMenu = NULL;
if ((m_pMainWnd != NULL) &&
((pMenu = m_pMainWnd->GetMenu()) != NULL) &&
((pFileMenu = pMenu->GetSubMenu(0)) != NULL))
{
// Locate the "Sen&d..." menu item
for (int i = 0, nLength = pFileMenu->GetMenuItemCount();
i<nLength; i++)
{
CString strSend;
pFileMenu->GetMenuString(i, strSend, MF_BYPOSITION);
if (strSend == _T("Sen&d...")) break;
}
if (i == nLength)
{
// Didn't find Sen&d... menu item, so add one.
pFileMenu->InsertMenu(nLength-1, MF_BYPOSITION);
pFileMenu->InsertMenu(nLength-1, MF_BYPOSITION,
ID_FILE_SEND_MAIL, _T("Sen&d..."));
}
}
}
$$IF:NewFunc$$
return TRUE;
$$ENDIF$$