Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Please help me please Pin
Still learning how to code5-Jul-09 5:02
Still learning how to code5-Jul-09 5:02 
GeneralRe: Please help me please Pin
molesworth5-Jul-09 12:39
molesworth5-Jul-09 12:39 
GeneralRe: Please help me please Pin
aashu45-Jul-09 23:58
aashu45-Jul-09 23:58 
GeneralRe: Please help me please Pin
aashu46-Jul-09 0:04
aashu46-Jul-09 0:04 
GeneralRe: Please help me please Pin
molesworth6-Jul-09 1:11
molesworth6-Jul-09 1:11 
Questionbitmap from resource DLL Pin
kiranin4-Jul-09 20:41
kiranin4-Jul-09 20:41 
Questionhow to set mail time Pin
santhosh-padamatinti4-Jul-09 20:28
santhosh-padamatinti4-Jul-09 20:28 
Questionsetting attachment for a message Pin
Pardhu_M4-Jul-09 20:28
Pardhu_M4-Jul-09 20:28 
how to set a attachment for a message using mapi in C++ this is my core logic which isn't working any help is highly appericiated


LPATTACH lpAttach = NULL;
ULONG ulAttachNum = 0;
hr = pNewMessage->CreateAttach(NULL, 0, &ulAttachNum, &lpAttach);

if (FAILED(hr))
{
if (lpAttach)
lpAttach->Release();
pNewMessage->Release();
return false;
}
enum {SUBJECT, CLASS, BODY, MSG_DEL, MSG_PROPS };
// Message properties tag array
SPropValue lpPropValueArray2[MSG_PROPS];
lpPropValueArray2[SUBJECT].ulPropTag = PR_SUBJECT;
lpPropValueArray2[SUBJECT].Value.lpszW = _T("Testing IPM With Attachments");

// TO DO:Change this to your custom form class

lpPropValueArray2[CLASS].ulPropTag = PR_MESSAGE_CLASS;
lpPropValueArray2[CLASS].Value.lpszA = "IPM.Note";
lpPropValueArray2[BODY].ulPropTag = PR_BODY;
lpPropValueArray2[BODY].Value.lpszW =_T("Custom Text For Message");
lpPropValueArray2[MSG_DEL].ulPropTag = PR_DELETE_AFTER_SUBMIT;
lpPropValueArray2[MSG_DEL].Value.b = TRUE;


enum {METHOD,RENDERING,PATH, FILENAME, DISPLAYNAME, NUM_ATT_PROPS};
SPropValue spvAttach[NUM_ATT_PROPS];
spvAttach[METHOD].ulPropTag = PR_ATTACH_METHOD;
spvAttach[METHOD].Value.l = ATTACH_BY_REFERENCE;

spvAttach[RENDERING].ulPropTag = PR_RENDERING_POSITION;
spvAttach[RENDERING].Value.l = -1;

spvAttach[PATH].ulPropTag = PR_ATTACH_PATHNAME;
spvAttach[PATH].Value.lpszW =_T("C:\\Documents and Settings\\rakesh\\Desktop\\raki.txt");

spvAttach[FILENAME].ulPropTag = PR_ATTACH_FILENAME;
spvAttach[FILENAME].Value.lpszW =_T( "raki.txt");

spvAttach[DISPLAYNAME].ulPropTag = PR_DISPLAY_NAME;
spvAttach[DISPLAYNAME].Value.lpszW =_T( "code.txt");

// Save the properties we have set on the attachment
if (FAILED(hr = lpAttach ->SetProps(
NUM_ATT_PROPS,
(LPSPropValue)&spvAttach,
NULL)))

if (FAILED(hr = lpAttach->SaveChanges(0)))




if (FAILED(hr = pNewMessage->SetProps(MSG_PROPS,lpPropValueArray2,NULL)))
AnswerRe: setting attachment for a message Pin
Stuart Dootson5-Jul-09 0:25
professionalStuart Dootson5-Jul-09 0:25 
Questionloadbalancing in p2p network Pin
nimmi priya4-Jul-09 19:58
nimmi priya4-Jul-09 19:58 
AnswerRe: loadbalancing in p2p network Pin
Michael Schubert5-Jul-09 3:29
Michael Schubert5-Jul-09 3:29 
Questionstabilization test of API generated exe programme Pin
adeshayee4-Jul-09 18:25
adeshayee4-Jul-09 18:25 
AnswerRe: stabilization test of API generated exe programme Pin
PJ Arends4-Jul-09 20:01
professionalPJ Arends4-Jul-09 20:01 
GeneralRe: stabilization test of API generated exe programme Pin
adeshayee5-Jul-09 6:28
adeshayee5-Jul-09 6:28 
QuestionMS Detours Pin
Mohanned4-Jul-09 12:47
Mohanned4-Jul-09 12:47 
AnswerRe: MS Detours Pin
Stuart Dootson4-Jul-09 13:04
professionalStuart Dootson4-Jul-09 13:04 
AnswerRe: MS Detours Pin
Mohanned4-Jul-09 14:09
Mohanned4-Jul-09 14:09 
QuestionHELP! Pin
klopsikon4-Jul-09 8:23
klopsikon4-Jul-09 8:23 
AnswerRe: HELP! Pin
Stuart Dootson4-Jul-09 8:32
professionalStuart Dootson4-Jul-09 8:32 
AnswerRe: HELP! Pin
Joe Woodbury4-Jul-09 15:04
professionalJoe Woodbury4-Jul-09 15:04 
Questionguys help me out Pin
Sheela Gusain4-Jul-09 7:52
Sheela Gusain4-Jul-09 7:52 
AnswerRe: guys help me out Pin
Hamid_RT4-Jul-09 9:05
Hamid_RT4-Jul-09 9:05 
Questionhow to get file attributes from a cluster in volume bitmap Pin
ssundar19744-Jul-09 4:44
ssundar19744-Jul-09 4:44 
AnswerRe: how to get file attributes from a cluster in volume bitmap Pin
Rozis4-Jul-09 10:30
Rozis4-Jul-09 10:30 
AnswerRe: how to get file attributes from a cluster in volume bitmap Pin
Luc Pattyn4-Jul-09 11:42
sitebuilderLuc Pattyn4-Jul-09 11: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.