|
You have to override OnPaint to control how the data is rendered.
And an FYI: "data" is the plural form. "datum" is singular.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
If it is a FormView, you could add edit or Static controls and then use UpdateData.
OnInitialUpdate is called in the beginning. You would use this to initialize anything. This means updating the initial data on the page.
|
|
|
|
|
Sorry, not CView::OnInitialUpdate(), it is CView::Invalidate (),I made the mistake.I just want empty the view and display ,how to do it?
YES, I am here.
|
|
|
|
|
|
I want to handle an event fired by an Active X which is placed in a HTML file. This event has two parameters.
The problem is that I try to use the DHTML_EVENT_AXCONTROL macro but the handler functions of this macro must be of type
void __stdcall (void) and I need a function that recieves the two parameters.
Please Help Me. Thanks.
Jose Vicente
|
|
|
|
|
Are the handles returned from the following funcs going to be same??
GetModuleHandle(NULL)
GetCurrentProcess(void)
|
|
|
|
|
No they do not return the same thing.
GetModuleHandler returns a handle to the module that you request, which cooincidnetally is the address at which the Module was loaded into memory.
GetCurrentProcess returns a pseudo-handle, which if you use that handle value in any of the functions that expects a process handle, it will be interpreted as the current process.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
|
Hi,
We have a pop3 email server and several accounts. There is one specific account which receives some important .csv files from clients as attachments. I am writing a program which reads these mails and extract the attachment.
For heavens sake, can someone tell me how to do this in c++. You dont have to provide a code, but atleast direct me where I should start.
I used Simple MAPI, but it only reads mails from the profiles created in your machine (or the machine where u install the program).
And my program should not expect any profile created already for that email account. My program should be a command line utility for reading mails that you provide, server name, user name, pwd and other necessary info and hit enter - it should copy all the mail attachments to any folder that either u specify or it is configured somewhere.
[After a week long reading, I am so fed up of reading MAPI materials but nothing gets into my mind - feeling like fish out of water]
Please help me...
omkamal
|
|
|
|
|
No need to use MAPI. See this article for a simple way to access your POP server.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thank you Ravi for the reply. But there is something I need to tell. I tried directly from my cmd box and telnet to my pop3 server. I tried to pull the mails. It worked fine, but it gives me only garbage for the attachments. It also throws an info saying, "Since the mail message is in MIME format your mail reader is unable to translate it and so part or all of the message you may see are not text" - or something like it.
Is there any other way to read and save my attachments (especially with the exact file name that the sender sent)?
Remember, I want this utility to work in a lights-out environment. All the end user should see the next morning is bunch files on a specified folder. He should not care what command line program executes underneath.
omkamal
|
|
|
|
|
omkamal wrote:
Is there any other way to read and save my attachments (especially with the exact file name that the sender sent)?
Yep. See my last reply.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Here's another article link.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Also see the articles here.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks for all the links. You give a whole bunch of work for the rest of the day.
But please dont go anywhere. I may get back to you for any problems.
Thanks so much again.
omkamal
|
|
|
|
|
See I told I will get back to you. I checked this link (codeguru link that you sent me finally). Looked like it had a whole lot of samples and classes to explore. But just go thru the comments of different people. Everyone ask the author about how to read an attachment. Funny thing is either the author does not reply to them or one even said the following
Hi,
please do not contact me regarding the handling of attachments. I have no idea, and I never extended these classes to handle attachments.
Sorry, but this is something you have to find out yourself.
Thanks,
Michael
Submitted By: Michael Krebs (2001/06/13)
Go up a level
Isnt this weird that no one knows how to read a MIME type multipart attachment from a POP3 mail server?
[Now, ravi do you understand how I am.] Oh please help me again...
omkamal
|
|
|
|
|
Darn, I know I've seen source code for extracting attachments from a raw mail message... I will keep looking.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I think I found one from the codeguru link itself. I have gone thru the source code. Boy! its very heavy duty. The guy actually wrote whatever text that comes outta pop3 server Retr command to a file first.
He then parses thru the file, literally checking for strings like "To:", "From:", "Content-Disposition: attachment - <<filename>>" and then extracts everything to different variables.
Thats too much work though. Why in the world are there no C++ APIs or classes to do all these?
May be I should start writing them if no one really did before.
The sample that I am talking about in the codeguru link is this...
POP3 Client With Attachment - Alexander Volkov (2002/02/15)
Here is a simple COM server that is able to receive a mail messages and extract attached files.
omkamal
|
|
|
|
|
There are commercial libs available to do this.
omkamal wrote:
May be I should start writing them if no one really did before.
That would be great! Please consider posting your article at CP.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I never thought my Friday would be driven this nuts. I better go out for some movie or my head would be charbroiled. Almost burning.........
omkamal
|
|
|
|
|
What!? You'd pass up a night of hacking the COmkamalEmailAttachment class for mindless entertainment?
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
You never know ravi, how many .dsw and .dsp I have written so far starting from MAPI and until POP3 and MIME protocols with Winsock and a whole lot of fun.
I even have a feeling to quit my job. My boss is my only cheerleader now. (and ofcourse CP).
omkamal
|
|
|
|
|
See this CP article on Mime utils.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Have a look at Chilkat Mail - http://www.chilkatsoft.com/ChilkatMail.asp
It should do what you want.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Thanks Neville, I am looking thru the code. But before I go any further have you used it. Is there a simple client written consuming this COM, that i can use? [Just to save my time]
omkamal
|
|
|
|