|
Hi Guys,
The problem with my application i want to set Properties for a message using Mapi(C++), and save the message the messae will be save in outlook. i am able to set BODY,SUBJECT, but iam not able to set email adress for it, so that mail property is not appearing when i opened in outlook and see TO Adress . can any body help me out .
Here is the sample code what i wrote.
SPropValue props[4] = {0} ;
props[0].ulPropTag = PR_BODY ;
props[0].Value.lpszW = _T("hai dolly") ;
props[1].ulPropTag = PR_SUBJECT ;
props[1].Value.lpszW = _T("how r u dolly");
props[2].ulPropTag = PR_SENDER_EMAIL_ADDRESS;//Problem here
props[2].Value.lpszW =_T("xyz@gmail.com") ;//problem here
props[3].ulPropTag = PR_MESSAGE_FLAGS ;
props[3].Value.ul = MSGFLAG_SUBMIT | MSGFLAG_READ ;
hr = pNewMessage->SetProps( 3, props, NULL ) ;
hr = pNewMessage->SaveChanges(0);
|
|
|
|
|
Pardhu_M wrote: see TO Adress
Pardhu_M wrote: props[2].ulPropTag = PR_SENDER_EMAIL_ADDRESS;//Problem here
props[2].Value.lpszW =_T("xyz@gmail.com") ;//problem here
Those two seem to contradict each other - you're setting the 'sender' e-mail address, but looking at the 'TO' address field?
Anyway - to tell a MAPI message who it's addressed to, you use IMessage::ModifyRecipients [^], IIRC.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
May i know how can i add a value for an Xmlnode.. using msxml..when im trying to use
BSTR bstr2;
Node1->get_text(&bstr2);
Node->put_text(&bstr2);
im getting the below error
error C2664:
L::IXMLDOMNode::put_text' : cannot convert parameter 1 from 'BSTR * ' to 'BSTR'
|
|
|
|
|
p_1960 wrote: Node->put_text(&bstr2);
Should be
Node->put_text(bstr2);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello
Im stuck with the problem of displaying special symbols
say
m_up_direction= "↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑";
or
m_down_direction= "↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ";
on the dialog window(im using vc++ 6.0)
could any please help ,e whether i need to type cast the expression or do any setting...??
-thanks
|
|
|
|
|
I'm presuming that the arrow symbols are in the symbols font?
In that case, you'll need something like this (it's taken pretty much verbatim from some of my own code):
class MyDialog : public CDialog
{
CButton m_up_direction;
CButton m_down_direction;
CFont symbols_;
};
BOOL MyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
if (symbols_.CreatePointFont(100, "Symbol"))
{
m_up_direction.SetFont(&symbols_);
m_down_direction.SetFont(&symbols_);
}
else
{
m_up_direction.SetWindowText("^");
m_down_direction.SetWindowText("V");
}
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
hey Stuart,,
thanks ya for the reply,,
but actually im trying to put the unicode strings on the window.
also there is one more method to retrieve from an unicode file(where these ↑ and ↓ are being stored) and display it on the window..
since those stuffs make my project messy,, thought of putting direct unicode string in the code,, i thing may be the numeric value of the unicode may work...
|
|
|
|
|
aravind.sn wrote: but actually im trying to put the unicode strings on the window.
I'm guessing that'll only work if IsWindowUnicode [^] returns TRUE for the window?
Also, you'll either want to #define UNICODE and _UNICODE to get the Unicode APIs, or use the xxxW variants of the API calls.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you,,
i just did and array of (unsigned short)decimal values for the unicode.
then to CString.
thanks stuart for ya reply...
|
|
|
|
|
Hi,
when im trying to get the childs of an Xml node in a MSXML::IXMLDOMNodeListPtr ...ie
MSXML::IXMLDOMNodeListPtr NodeList;
MSXML::IXMLDOMNodePtr Node;//contains the address of sample1 node
MSXML::IXMLDOMNodeListPtr List=Node->get_childNodes(&pXMLNodeList);
long Length;
List->get_length(&lLength);
Length is showing as 1...but it should show 0 bcos there are no Xml childnodes..but it is treating "3" as a node which is a value...
The issue is how can i get the number of childnodes in an XML node...
<sample>
<sample1>3</sample1>
<sample2>4</sample2>
</sample>
|
|
|
|
|
p_1960 wrote: Length is showing as 1...but it should show 0 bcos there are no Xml childnodes..but it is treating "3" as a node which is a value...
Your '3' is actually a text node , hence a child .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
p_1960 wrote: The issue is how can i get the number of childnodes in an XML node
No - the question you should be asking is "how can I get the number of child elements of an XML element?"
Here's one (Microsoft-specific) answer - use the selectNodes[^] method of IXMLDOMElement.
For example, if you call selectNodes for an element with a parameter of "./*", you get back a list of nodes that are children of the element and are elements themselves.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
im using msxml library ..please let me know how to get the value of a node....
ie
<test>
<test1>7+32</test1>
</test>
how can i get the value of test1...
|
|
|
|
|
I suppose a slight modification of this MSDN code sample [^] will do the job, i.e.:
#include <stdio.h>
#import <msxml4.dll>
int main(int argc, char* argv[])
{
MSXML2::IXMLDOMDocumentPtr pXMLDom;
HRESULT hr;
CoInitialize(NULL);
hr = pXMLDom.CreateInstance(__uuidof(MSXML2::DOMDocument40));
if (FAILED(hr))
{
printf("Failed to instantiate DOMDocument40 class\n");
return -1;
}
pXMLDom->async = VARIANT_FALSE;
if ( pXMLDom->load("test.xml") != VARIANT_TRUE)
{
printf("Failed load xml data from file.\n%s\n",
(LPCSTR)pXMLDom->parseError->Getreason());
return -1;
}
MSXML2::IXMLDOMNodePtr pNode = pXMLDom->selectSingleNode("//test1");
if (pNode == NULL)
{
printf("Invalid node fetched.\n%s\n",
(LPCSTR)pXMLDom->parseError->Getreason());
}
else
{
printf("Result from selectSingleNode:\nNode, <%s>:\n\t%s\n\n",
(LPCSTR)pNode->nodeName, (LPCSTR)pNode->text);
}
CoUninitialize();
}
Where test.xml is the file containing the XML text you posted.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I need a solution to retrive the body of a mail in Lotus Notes.
->Until now i was able to retrive body in richText or LnFormat.
->But The HTML files which are not attachmnets are also comming along with it.
->Now i want to seperate these HTML linkings seperate.
->The code i used to retrive body is:
doc.GetItem("Body",rt);
rt.GetText(&ln);
This gets the complete body including the text in the HTML tht is not an attachmnet can any one provide me with a solution.
sampath-padamatinti
|
|
|
|
|
|
Thnks for the reply but i don't want to use scripts so can u help me with the classes in the sdk tht i can use so tht i can know if the body is multi or single.
|
|
|
|
|
how to call a microsoft vc++ MFC function by its ordinal numbers? and i want the ordinal number equivalent functions. can u help?
Thanks
|
|
|
|
|
Use LoadLibrary and GetProcAddress .
GetProcAddress Function[^] can be used with ordinal numbers also.
This is an excerpt from MSDN
lpProcName [in]
The function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi ,
when i tried to compile my project in visual studio 2008, i got the following error...
error C2440: '<function-style-cast>' : cannot convert from 'const CString' to 'ULONG_PTR' in atlcoll.h file.
Does anyone know how to solve this problem?
Thanks,
Rakesh.
|
|
|
|
|
Which function are you calling?
Which line of your code is showing the error?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Show us the code that you're trying to compile -
I can think of so many things wrong with this scenario that seeing the code's the only real way to answer your question.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
There is a known issue related with the PreTranslateMessage in ActiveX controls. That is the PreTranslateMessage will not be called for child windows in the ActiveX control.
More details can be found in articles194294[^] and 187988[^].
The work around provided will work, ofcourse. But the PreTranslateMessage in the control class will not be called anyway. Anybody has faced such an issue?
Thanks for sharing your experience and solutions if any.
- ns ami -
|
|
|
|
|
Hello friends,
I am new to this forum and this is my first question here. Actually, I am a .NET programmer. However, nowadays am a terrible fan of C++ since the language is machine+soft/hardware independent. I needed some help for function calling code, which I had written in C# and now am trying to convert it to C++ (note: Its not VC++, just C++, the code of which is compiled in Borland compiler or C-free and not Visual Studio)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public void function01()
{
Console.WriteLine("Hi, I am function 01, now calling function 02");
function02();
}
public void function02()
{
function01();
}
public static void Main()
{
Program p = new Program();
p.function01();
}
}
}
Now, I need the C++ version of this. Can anybody in the forum please explain me the C++ code of this. I mean, implementing the function call concept in C++. I hope its aint that easy as is in the case of C#.
Hope to hear from you guys soon,
Happy Programming,
Rajdeep.NET
Always ready to help (if possible, often I am a NooB!) and be helped!
|
|
|
|
|
#include <stdio.h>
namespace ConsoleApplication1
{
class Program
{
public:
void function01()
{
printf("Hi, I am function 01, now calling function 02\n");
function02();
}
void function02()
{
function01();
}
};
}
void main()
{
ConsoleApplication1::Program p;
p.function01();
}
The behavior would be exactly the same.
It will do function calls recursively and die with a stack overflow.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|