|
What return value of sendTo.SendMail
|
|
|
|
|
Hello,
SendMail returns '0' (i.e Sucess)
But the application that calls MAPI closed when I press the "Send" button.
Thanks,
vinsankar
|
|
|
|
|
But when I run your code its working and if click on Send button in Outlook its working and also when I close Outlook it returns to my program I think maybe your problem isnt of this code
|
|
|
|
|
Did your problem solve?
|
|
|
|
|
Hello,
No ...But I overcome that problem by using MS Outlook automation...
I Don't know ...why that Simple MAPI program crashes when using with an MDI app...?
Thanks...& regards...
vinsankar
|
|
|
|
|
I didnt know where's problem I checked your code and it worked fine
|
|
|
|
|
Hello everyone,
I just created a program that use a WIN32 internet APIs, so i found the useful library called WININET.lib and i decided to add some functionalities like changing internet setting and so on, the problem is when i tried to change the username/password using InternetSetOption then calling InternetAttemptConnect function nothing happens (the settings rest in default stat)another questions is how do i change username and password even when the first parameter of InternetSetOption is NULL for example :
InternetSetOption(NULL,INTERNET_OPTION_USERNAME,
lpszUser, strlen(lpszUser)+1);
(change the defaut setting of dial up connection)
I'll be wondered if someone could help or just to post a tutorial for how to use InternetSetOption function (its not enough documented in MSDN for me)
Thank you
Anyone who considers arithmetical methods of producing random numbers is, of course, in a state of sin.
John von Neumann
|
|
|
|
|
Can any body tell me how to include a class from dll in vc++
I just have the my.dll file
and i know about the classes present in it
just give me an idea about how to do this
Sarguna
|
|
|
|
|
One more thing i forgot to mention
i don't have any source file of i know what is the class and the functions present in it
|
|
|
|
|
|
Hello!
i want display an item of context menu, gray and disable. Therefore i call EnableMenuItem function in my code, but it don't work correctly.
what do i do???
<br />
void CMyView::OnContextMenu(CWnd* pWnd, CPoint point) <br />
{<br />
if (WindowFromPoint(point) == GetDlgItem(IDC_LISTCTRL))<br />
{<br />
CMenu MyMenu;<br />
MyMenu.LoadMenu(IDR_LISTMENU);<br />
CMenu *pContextMenu;<br />
pContextMenu = MyMenu.GetSubMenu(0);<br />
if(m_iListIndex == -1)<br />
{<br />
pContextMenu->EnableMenuItem(IDR_MENUITEM1, MF_GRAYED);<br />
}<br />
else<br />
{<br />
<br />
}<br />
<br />
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | <br />
TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());<br />
}<br />
UpdateData(FALSE);<br />
}
Zo.Naderi-Iran
|
|
|
|
|
I test your code its working check if of menu
|
|
|
|
|
|
thank you, that link is useful for me;)
Zo.Naderi-Iran
|
|
|
|
|
Hi ALL
I wrote some code and i dont know why the compiler throw me this error message :
RegistryCall.obj : error LNK2001: unresolved external symbol "private: static class CRegistryCall * CRegistryCall::m_cRegistryCallObject" (?m_cRegistryCallObject@CRegistryCall@@0PAV1@A)
RegistryCall.obj : error LNK2001: unresolved external symbol "private: static bool CRegistryCall::m_bExistObject" (?m_bExistObject@CRegistryCall@@0_NA)
The code :
H file :
class CRegistryCall <br />
{<br />
private:<br />
CRegistryCall();<br />
<br />
public:<br />
static CRegistryCall* CreateInstance();<br />
virtual ~CRegistryCall();<br />
<br />
<br />
private:<br />
static bool m_bExistObject;<br />
static CRegistryCall* m_cRegistryCallObject;<br />
};
Cpp File :
CRegistryCall::CRegistryCall()<br />
{<br />
m_bExistObject = true;<br />
m_cRegistryCallObject = NULL;<br />
}<br />
<br />
CRegistryCall::~CRegistryCall()<br />
{<br />
if(m_bExistObject)<br />
{<br />
m_bExistObject = false;<br />
delete m_cRegistryCallObject;<br />
<br />
}<br />
}<br />
<br />
CRegistryCall* CRegistryCall::CreateInstance()<br />
{<br />
if(!m_bExistObject)<br />
{<br />
m_bExistObject = true;<br />
m_cRegistryCallObject = new CRegistryCall();<br />
}<br />
<br />
return m_cRegistryCallObject;<br />
}
This class need to act as singleTon.
Thanks for any help.
|
|
|
|
|
Yanshof wrote: RegistryCall.obj : error LNK2001: unresolved external symbol "private: static bool CRegistryCall::m_bExistObject" (?m_bExistObject@CRegistryCall@@0_NA)
When you use a static variable in a class you need to initialize it with some value in the .cpp file.(or outside the class) SO for the variables that you are using as static (eg for m_bExistObject) put this line on top of the .cpp file.
bool CRegistryCall::m_bExistObject =true;
and you can do like wise for the other variables too...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
if u writing in a console application then in the project-- settings options,
set use mfc in a shared dll option. it will work out
|
|
|
|
|
raghuji.rao wrote: if u writing in a console application then in the project-- settings options,
set use mfc in a shared dll option. it will work out
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Yes you need to two lines to your code in cpp file
bool CRegistryCall::m_bExistObject =true;
And also for cRegistryCallObject
|
|
|
|
|
hi all,
I have a CRichEditCtrl created on CView derived class.
After Creating the Rich edit control it's default font is something different than what i want. and it's bold also.
so to chnge the font i am selecting all the data present in control and then
applying new font to it.
but when i paste the data that is not compatible with mine font again i need to select all the data and then apply font on it!!
so my question is that is there any way to change the clipboard data's font
so that my control will receive data in compatible font only..
or is there any way that whatever font i want my rich edit control to have
i should tell it before creation as some parameter..(i think this shouls be the way )
means if i want that my rich edit control should have only this font say "courier new" and it is going to be fix for all it's lifetime then
i should create rich edit that starts with this font only??
if anybody know's please reply..
Thanks and Regards
Harshal shete
|
|
|
|
|
harsha_1234 wrote: is there any way that whatever font i want my rich edit control to have
I have solution for this.....
Declare CFont *c; reference in the class .
If you want if for lifetime
you have to add the following code in OnInitDialog where m_pRichEdit is variable of RichEditCtrl ....
c=new CFont();<br />
c->CreatePointFont(180,"Monotype Corsiva");<br />
m_pRichEdit.SetEventMask(m_pRichEdit.GetEventMask() |ENM_CHANGE);
Then Just make method for RichEditControl Text Change.
Write Following statement in it.
GetDlgItem(IDC_RICHEDIT21)->SetFont(c);
You can take font name as parameter and provide it to the CreatePointFont method of CFont. You will get the desired output.
Hope This will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Hi i Tried this it is applying the font but the boldness of the font is still there i want to disable the boldness also..
|
|
|
|
|
For more Font Specification you can use the CreatePointFontIndirect() API.
This API uses pointer of the LOGFONT.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Hey i am sorry,
it's boldness is also disabled now.
but now the only problem i am facing is that whenever i paste
saomething in the control it's font remains same..
so i am thinking of something like this whenever user say's Paste.
i will change clipboeard data's font and boldness as i want.
Is this a good approach???
please Guide me as i am not very much familiar with this control
Thanks and Regards
Harshal
|
|
|
|
|
Create a eventhandler for RicheditCtrl on EN_CHANGE
Write Following statement in it.
GetDlgItem(IDC_RICHEDIT21)->SetFont(c);
This will give the desired output.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|