Click here to Skip to main content
16,011,428 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing Shared Resource from a Windows "Service" Pin
Petrus Scott16-Jul-04 7:48
Petrus Scott16-Jul-04 7:48 
GeneralRe: Accessing Shared Resource from a Windows "Service" Pin
palbano16-Jul-04 8:29
palbano16-Jul-04 8:29 
GeneralAccessing resources Pin
0v3rloader16-Jul-04 6:46
0v3rloader16-Jul-04 6:46 
GeneralRe: Accessing resources Pin
David Crow16-Jul-04 7:06
David Crow16-Jul-04 7:06 
Questionhow to receive outgoing message Pin
Anton Zarubin16-Jul-04 5:37
Anton Zarubin16-Jul-04 5:37 
GeneralRe: how to receive outgoing message Pin
David Crow16-Jul-04 7:02
David Crow16-Jul-04 7:02 
GeneralRe: how to receive outgoing message Pin
Eugene Grudina16-Jul-04 8:27
sussEugene Grudina16-Jul-04 8:27 
AnswerRe: how to receive outgoing message Pin
Antti Keskinen16-Jul-04 8:22
Antti Keskinen16-Jul-04 8:22 
There is a Code Project article that does pretty much the same thing, but monitors for incoming mail. You should read through it, and you can find it here. When done reading, it's time for copy & paste. Instead of using the interfaces mentioned in the article, you should select "_MailItem" and "ApplicationEvents". The first allows access to a mail item, and the second allows you to receive notifications when an event ItemSend is fired.

Then follow the article again. The event we are interested in is 0x0000f002 in hex code. The IDispatch interface pointer is the first parameter in the DISPPARAMS::rgvarg parameter list of the Invoke method. Although it's VARIANTARG pointer, I believe you can use reinterpret_cast to convert it into an IDispatch pointer. Then use this pointer to query for _MailItem interface and this new interface to manipulate the message if required.

If all this sounds too difficult or over your head, then go do something easier first.. Capturing events in Office applications is, suprise suprise, not one of the easiest things to do in VC++. It's MUCH easier in Visual Basic, but we don't use that here Big Grin | :-D

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: how to receive outgoing message Pin
Anton Zarubin17-Jul-04 0:36
Anton Zarubin17-Jul-04 0:36 
GeneralRe: how to receive outgoing message Pin
Antti Keskinen17-Jul-04 5:30
Antti Keskinen17-Jul-04 5:30 
GeneralWindows Logon Dialog Pin
Anthony988716-Jul-04 5:11
Anthony988716-Jul-04 5:11 
GeneralRe: Windows Logon Dialog Pin
David Crow16-Jul-04 5:21
David Crow16-Jul-04 5:21 
GeneralRe: Windows Logon Dialog Pin
Antony M Kancidrowski16-Jul-04 5:47
Antony M Kancidrowski16-Jul-04 5:47 
Generalsingle instance SDI Pin
vanne16-Jul-04 4:41
vanne16-Jul-04 4:41 
GeneralRe: single instance SDI Pin
Antti Keskinen16-Jul-04 8:39
Antti Keskinen16-Jul-04 8:39 
GeneralMemory Process Pin
VietDelphi16-Jul-04 4:30
VietDelphi16-Jul-04 4:30 
GeneralRe: Memory Process Pin
David Crow16-Jul-04 4:52
David Crow16-Jul-04 4:52 
GeneralRe: Memory Process Pin
Maximilien16-Jul-04 4:57
Maximilien16-Jul-04 4:57 
GeneralRe: Memory Process Pin
VietDelphi16-Jul-04 5:06
VietDelphi16-Jul-04 5:06 
GeneralRe: Memory Process Pin
David Crow16-Jul-04 5:16
David Crow16-Jul-04 5:16 
GeneralRe: Memory Process Pin
bikram singh16-Jul-04 12:01
bikram singh16-Jul-04 12:01 
QuestionMFC with Multiple Dialogs?? Pin
Kunal Shetye16-Jul-04 4:00
Kunal Shetye16-Jul-04 4:00 
AnswerRe: MFC with Multiple Dialogs?? Pin
David Crow16-Jul-04 4:49
David Crow16-Jul-04 4:49 
AnswerRe: MFC with Multiple Dialogs?? Pin
Maximilien16-Jul-04 5:06
Maximilien16-Jul-04 5:06 
GeneralRe: how to get access to the outbox folder Pin
David Crow16-Jul-04 4:46
David Crow16-Jul-04 4:46 

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.