Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Music Sequencer Pin
Maximilien15-Mar-04 2:54
Maximilien15-Mar-04 2:54 
GeneralHMENU handle of a popup menu Pin
15-Mar-04 0:13
suss15-Mar-04 0:13 
GeneralRe: HMENU handle of a popup menu Pin
Steve S15-Mar-04 0:39
Steve S15-Mar-04 0:39 
GeneralRe: HMENU handle of a popup menu Pin
15-Mar-04 2:21
suss15-Mar-04 2:21 
GeneralRe: HMENU handle of a popup menu Pin
Ravi Bhavnani15-Mar-04 4:00
professionalRavi Bhavnani15-Mar-04 4:00 
GeneralRe: HMENU handle of a popup menu Pin
not-logged-in15-Mar-04 4:54
sussnot-logged-in15-Mar-04 4:54 
GeneralRe: HMENU handle of a popup menu Pin
Ravi Bhavnani15-Mar-04 6:50
professionalRavi Bhavnani15-Mar-04 6:50 
GeneralOutlook Automation Pin
Amir Leshem14-Mar-04 23:45
Amir Leshem14-Mar-04 23:45 
I need to know how to automate outlook2000 with VC++7.0.
My object is sending mail to several recipients.
I've created several TypeLib classes (_Application,_MailItem,_NameSpace,Recipients).
It seems as if the IDispatch doesn't want to be instansiated.
Does anyone have an idea what am I doing wrong?
Thnx!!
Amir.

That's part of the code:
(CApplication is the TypeLib class):
{
LPDISPATCH pDisp;
LPUNKNOWN pUnk;
CLSID clsid;
CApplication app;
::CLSIDFromProgID(L"Outlook.Application.9",&clsid);
if (::GetActiveObject(clsid,NULL,&pUnk)==S_OK)
{
VERIFY(pUnk->QueryInterface(IID_IDispatch,
(void**) &pDisp)==S_OK);
app.AttachDispatch(pDisp);
pUnk->Release();
}
else
{
if (!app.CreateDispatch("Outlook.Application.9"))
{
AfxMessageBox("Outlook 2000 not found!");
}
}
CNameSpace nms;
nms.AttachDispatch(app.GetNamespace("MAPI"));
CMailItem itm;
itm.AttachDispatch(app.CreateItem(0));
CRecipients rcp;
rcp.AttachDispatch(itm.m_lpDispatch);
GeneralThread Problem Pin
Caoimh14-Mar-04 22:50
Caoimh14-Mar-04 22:50 
GeneralRe: Thread Problem Pin
Caoimh15-Mar-04 7:05
Caoimh15-Mar-04 7:05 
GeneralRe: Thread Problem Pin
Nitron15-Mar-04 15:26
Nitron15-Mar-04 15:26 
GeneralRe: Thread Problem Pin
Caoimh16-Mar-04 0:04
Caoimh16-Mar-04 0:04 
GeneralIncluding library to Visual C++ Pin
JeabJB14-Mar-04 22:45
JeabJB14-Mar-04 22:45 
GeneralRe: Including library to Visual C++ Pin
Prakash Nadar14-Mar-04 23:22
Prakash Nadar14-Mar-04 23:22 
GeneralRe: Including library to Visual C++ Pin
Steve S15-Mar-04 0:41
Steve S15-Mar-04 0:41 
GeneralGetting access to OE inbox Pin
ravjak14-Mar-04 22:09
ravjak14-Mar-04 22:09 
GeneralRe: Getting access to OE inbox Pin
Joel Lucsy15-Mar-04 5:18
Joel Lucsy15-Mar-04 5:18 
GeneralRe: Getting access to OE inbox Pin
ravjak15-Mar-04 10:46
ravjak15-Mar-04 10:46 
GeneralFilter Driver for File Operations Pin
mmica14-Mar-04 21:51
mmica14-Mar-04 21:51 
GeneralRe: Filter Driver for File Operations Pin
Ravi Bhavnani15-Mar-04 4:06
professionalRavi Bhavnani15-Mar-04 4:06 
GeneralDialogBox Pin
asv14-Mar-04 21:25
asv14-Mar-04 21:25 
GeneralRe: DialogBox Pin
Prakash Nadar14-Mar-04 21:36
Prakash Nadar14-Mar-04 21:36 
GeneralTinting a Bitmap Pin
MeterMan14-Mar-04 20:30
MeterMan14-Mar-04 20:30 
GeneralRe: Tinting a Bitmap Pin
Monty214-Mar-04 20:37
Monty214-Mar-04 20:37 
GeneralRe: Tinting a Bitmap Pin
MeterMan14-Mar-04 20:42
MeterMan14-Mar-04 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.