|
I found various articles about creating and sending emails and about sending attachments.
However I need something simpler: I have an email address and want the resident mail system to create an email with the normal user interaction, i.e. my contribution is only waking the mail service and supplying the address.
It has to be in C++, dialog-oriented (non-SDI, non-MDI).
|
|
|
|
|
Have a look at Articles on MAPI. You can't guarantee that a MAPI client is available however.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Thanks, but my program does not have the message content to send.
In fact, I have only an email address in my hand.
|
|
|
|
|
The simpliest way is to use the ShellExecute() function, specifying the email address in the lpFile parameter
ShellExecute (NULL, "open", "mailto:who@where.ever", NULL, NULL, SW_SHOW); You can also specify the subject, cc, and bcc in the lpFile parameter
ShellExecute(NULL, "open", "mailto:who@where.ever&cc=you@them.org&bcc=them@you.org&subject=hello", NULL, NULL, SW_SHOW); If you want to add text or attachments then have a look at SIMPLE MAPI
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you; this is obviously the simplest solution.
Exactly, what I needed in this situation.
One remark: the show comman flag (SW_SHOW, or whatever else) has no effect in this case.
The documentation states, that it is only for the case, then an executable file is specified.
I tested it with "mailto", and it makes no difference.
|
|
|
|
|
I'm quite partial to this. A good place to start, at least.
You left me high and dry and changed me
You lied to me and now i’m angry...
|
|
|
|
|
It appears to be an elegant solution, but it shoots a magnitude farther than I can use in the given context.
Thanks anyway.
|
|
|
|
|
Hi,
I am seeing "mouse up" messages disappear in the main event loop of my app and wondered if anyone's seen this problem before or has an idea what's going on?
Details:
The app has a custom event loop which gives time to some OpenGL display code and I have used PeekMessage with PM_NOREMOVE to see when there is a "mouse up" message in the queue. What I have found is that the calls to PreTranslateMessage and DispatchMessage can cause the "mouse up" message to vanish from the queue.
Summary of event loop for reference:
while(!quit)
{
while(::PeekMessage(&msgCur, NULL, NULL, NULL, PM_REMOVE))
{
if(!PreTranslate(&msgCur))
{
::TranslateMessage(&msgCur);
::DispatchMessage(&msgCur);
}
}
}
Any help appreciated.
Rob.
|
|
|
|
|
Hello.
I'm new in C++ Programming and want to write an application wich is able to process Bitmap files.
I try to use the MFC to get a Windows program.
I have a big Problem with my variables:
So I have a file called CADoc which loads the Bitmap in memory, a CAView which shows it in a Window and a CACutBmp (a modal Window) where the user should be able to give the top left corner and width amd height of the area he wants to process to cut a rectangle out of the bitmap.
CACutBmp is started in the CADoc file... so an Object of CACutBmp is builded and the source Data is given to the modal Window... But if i want to cut the Window it must be possible to give the data back to the CADoc Class...
Thats my problem. I dont find a way to do so.
Can somebody here explain me how to use global variables properly in a MFC Based Application ?
Is there a better way then global variables to pass Data from one Class to another ?
Excuse me if the question is unclear or too noobish, but i would really appreciate any suggestions to get this problem solved.
Best regards,
Crypt.
|
|
|
|
|
I just went through a similar problem.
Do an artical search for "sendmessage". The first artical listed is very good on how to use send and post message between classes, as well as using pointers for other classes.
Hope this helps
John
|
|
|
|
|
Hi John.
Thank you for the fast answer... but I don't find the article you mentioned... can you give me another hind how to find it ...
Helge.
|
|
|
|
|
Cant u pass a structure as a reference to the CACutBmp class from within th doc that the user modifies ?
|
|
|
|
|
Hi act.
Maybe that is what i should do... but i really do not know how to do it... Is it possible to find somewhere an example wich gives some further explanations on the how to ?
Helge.
|
|
|
|
|
You *may* be overcomplicating the issue.
You have CADoc, which hold CABmp.
You have a command IDC_CROP which you want
to pop up a box, input some coords, and crop
the bitmap.
In header.
class CADocument : public CDocument
{
....
CABmp m_Bmp;
....
afx_msg void OnCrop ();
};
In Cpp
...
ON_COMMAND(IDC_CROP, OnCrop)
...
void CADoc::OnCrop ()
{
CADlg dlg (AfxGetMainWnd ());
dlg.m_pBmp = &m_ABmp;
dlg.m_rcBmp.SetRect (0,0, m_ABmp.GetWidth (), m_ABmp.GetHeight ());
if (dlg.DoModal () != IDOK)
return;
m_ABmp.Crop (dlg.m_rcBmp);
SetModifiedFlag (TRUE);
UpdateAllViews ();
}
Just my thoughts. And there's a bunch to fill in...
Iain.
|
|
|
|
|
UpdateAllViews was a good tip too !
It's just working perfect for me, much better then UpdateWindow amd Invalidate and this stuff!
But i had to use UpdateAllViews(NULL) to make it work...
No idea why but no I'm happy ...
Many Thanks again Iain,
Helge.
|
|
|
|
|
If you look at the docs , it defines UpdateAllViews as:
void UpdateAllViews( CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL );
The pSender is an optimisation if you are calling this function from
a View.
void CMyView::OnPropagateAChange ()
{
CMyDoc *pDoc = GetDocument ();
....
pDoc->UpdateAllViews (this);
}
That would redraw all views of that document except this one. I've never needed
to call with anything other than NULL, but I can see why you *might*.
The other parameters are useful for other views to work out *why* they need
redrawing, in case they only need to do a partial job. In a simple app, you
can leave them at their defaults.
Iain.
|
|
|
|
|
Sorry I'm too dumb...
Now i find this nice faq here 6.2
http://www.codeproject.com/cpp/cppforumfaq.asp#cpp_runapp
where it's perfect described how to use global variables.
This point works just perfect for me.
So anyway thanks for your help,
Best regards,
Helge.
|
|
|
|
|
Bind a EDIT CONTROL or DATACOMBOCONTROL
Hi,
I am currently working on a program in VISUAL C ++ 6.0 (MFC) in which I would like to include an ADO DATA CONTROL 6.0 and a MS MASKED EDIT CONTROL or a DATACOMBOCONTROL .
The EDIT CONTROL is connected with the DATA CONTROL after program start-up.
All desired fields are indicated with the EDIT CONTROL.
Should the RECORDS SOURCE of the DATA Controls be changed or be limited during the runtime , the EDIT CONTROL looses the connection to the DATA CONTROL.
I have already tried everything REFRESH or BindProperty, unfortunately, without success.
I could not find a Solution to this problem or topic even in the Internet.
I would be thankful for a hint or for your assistance.
|
|
|
|
|
Listen in on the messages your window is recieving (Spy++ should work): note the differences between the messages recieved from clicking on the taskbar button, and those recieved when clicking on the menu. If they're the same, then your app probably has some problems pumping messages in a timely manner.
You left me high and dry and changed me
You lied to me and now i’m angry...
|
|
|
|
|
Hi,
I want steps to write Crystal Report file which is in RPT format and the data feilds are declared in the TTX file.
I want to populate the RPT file with the data from database in Access using TTX file.
This i want to do in vc++ 6.Need guidance.
Thanks to all....
ruturaj
|
|
|
|
|
HI Frnz,
plz help me..i tried out sample hello world Custom wizard which accepts text but when i click OK button in New Project Information Wizard , i get an error..anyone familar with custom App Wizard ..help me...
"ERROR MSG:
Custom AppWizard while Parsing template 'Root.cpp near line 209
undefined symbol DOC "
is there anything to get included...help me frnds
|
|
|
|
|
I would like to find exactly - polygon area calculation, but can't find it. So, if anybody know the web site with such algorithms?
|
|
|
|
|
|
That is a really simple solution. I shall remember that!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Attempting to compile my first IDL I keep getting the following error( using Visual Studio 7.1):-
Corba_Square error PRJ0019: A tool returned an error code from "Invoking TAO_IDL Compiler on c:\ACE_wrappers\Tao\examples\Simple\Corba_Square\Corba_Square\Square.idl"
The IDL compiles and generates the files when included in an example project supplied. I have checked all the settings and cant find anything to fix.
Does anyone know how to get rid of this error.
I am just trying to setup a project that can be used as a starting point for other projects (all the build, compiler and linker settings in place etc).
|
|
|
|