|
This is just a guess but I think you would call SetCursor() in response to each WM_SETCURSOR received. Doing it once in OnInitDialog() is not sufficient. Have you searched CP and Googled for examples?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all,
I wrote an SMTP sink based on Microsoft's KB288098 sample ("How to use SMTP Transport Events to Add a Disclaimer to Outgoing SMTP Messages"). I've now successfully modified the sample so my sink gets called when a new email comes in (via IMailTransportSubmission::OnMessageSubmission). I started off creating a small log file in the otherwise empty function--I can confirm my sink gets called.
Now...the function receives a pointer to an IMailMsgProperties. I need to get to any attachment to save it/them locally to the hard drive (as well as retrieve the sender's name and email address). I don't care about getting the subject line or the message body.
I'm afraid my ATL/COM knowledge is severely limited at this point. Given nothing but this interface (IMailMsgProperties), how do I get to these values?
|
|
|
|
|
...what I must add is that I've managed to save the raw content of the email with IMailMsgProperties::CopyContextToFile(), but this gives me the exact same content as the .eml file that gets created under c:\inetpub\mailroot\drop...
Is there anything that will let me retrieve individual properties like sender name and email, and (in particular) the *decoded* version of any MIME or Base64 attachment?
|
|
|
|
|
For future reference (for anyone who might come across this):
The solution to retrieving the subject line, sender, etc lies in GetStringA(). Getting the decoded attachments, if any, lies in IBodyParts/IBodyPart->SaveToFile().
|
|
|
|
|
Hello:
I need to mux two mono audio pcm inputs into one stereo output. Does anyone have a simple DirectShow sample code that I can follow? Many Thanks.
Best Wishes,
Taiwu
|
|
|
|
|
We have a imaging system application with a combination of COM components, extension dll and stand alone executables. Do we have a way of profiling the thread interaction at run time. Are there any tools available for this. My need is to do a profiling of thread interaction within and across processes.
Regards
Rajdeep
|
|
|
|
|
is it possible to make a program develpoed in vb.net and another one in c++ and make them communicate with each other using socket programming.if possible,how? Thanks
|
|
|
|
|
Make the vb an activex control.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Is the timeout for an automation server a set parameter or something that can be changed. I've written an client and the server keeps popping up a message box that says the server is busy. It has 3 buttons. Retry, Switch to, Cancel. I want to extend that timeout if possible.
Any suggestions?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Is there a way to create a program that would read a text file and every time it found a space it would replace the space with a line return?
|
|
|
|
|
Sure! Are you using MFC?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
sure, It isn't a difficult thing
read the text to buffer, and chr the space char ' ', then replace it with '\r', OK, output it to file or screen.
Best Regards
|
|
|
|
|
Is it still possible with the console app? I would like to output it to a new file.
|
|
|
|
|
Andrew Admire wrote:
Is it still possible with the console app?
Of course.
Andrew Admire wrote:
I would like to output it to a new file.
Not a problem.
Is this an MFC-based application?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I do not know how to use MFC so no, I would like it to be straight console app based.
|
|
|
|
|
Andrew Admire wrote:
...I would like it to be straight console app based.
MFC can be used in both GUI and console applications.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Ok, then no I would like to use C++.
|
|
|
|
|
This should get you close. You can make the necessary changes and organize it a bit better.
FILE *pFile = fopen("C:\\!conMania Collection\\list71.txt", "rb");
if (NULL != pFile)
{
fseek(pFile, 0, SEEK_END);
long lSize = ftell(pFile);
fseek(pFile, 0, SEEK_SET);
char *pBuffer = new char[lSize];
fread(pBuffer, sizeof(char), lSize, pFile);
fclose(pFile);
for (int x = 0; x < lSize; x++)
{
if (pBuffer[x] == ' ')
pBuffer[x] = '\n';
}
pFile = fopen("C:\\!conMania Collection\\list71_temp.txt", "wb");
if (NULL != pFile)
{
fwrite(pBuffer, sizeof(char), lSize, pFile);
fclose(pFile);
}
delete [] pBuffer;
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Don't you need replace with a \r\n ?
|
|
|
|
|
I don't know. It's not my project. Given that \r is a carriage return and \n is a line feed, I'm not sure what a "line return" is.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
this needs a lot of polish, but it does the bare essentials.
in_filename and out_filename could be selected using CFileDialog. they are hard coded here.
#include windows.h
#include string.h
#include stdio.h
main()
{
FILE *infile_p; // pointer for read file
FILE *outfile_p; // pointer for write file
int byte;// var for byte read from file
if ((infile_p = fopen("in_filename", "r"))==NULL) // open file for read
{
exit(0);
}
if ((outfile_p = fopen("out_filename", "w"))==NULL) // open file for write
{
exit(0);
}
while (!feof(infile_p)) // end of file test
{
byte = (fgetc(infile_p));
if (byte == 32) // look for a space
{
fprintf(outfile_p ,"%c%c", 0x0d, 0x0a);/ replace it with CR/LF
}
else
{
fprintf( outfile_p, "%c", byte);
}
}
return(0);
}
|
|
|
|
|
Your program worked. However it kept the space after the . at the end of the sentence.
|
|
|
|
|
Here's a C++ solution:
#include <fstream>
#include <string>
using namespace std;
...
ifstream in("in.txt");
ofstream out("out.txt");
string s;
while(is >> s) os << s << endl;
|
|
|
|
|
Hello,
I'm developing an application using Visual Studio 2005. I use MFC and eveything was working (the prototypes, the application layer, eveything) until I set up the integration project. Everything compiled with a lot of warnings. I fixed them (mostly deprecated warnings that I suppress using the _CRT_SECURE_NO_DEPRECATE define).
After fixing the warnings, errors stared to appead from every GUI file it was compiling. The 5 errors that keep coming back are:
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atltime.h(393) : error C3861: '_localtime64_s': identifier not found
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atltime.h(394) : error C3861: 'strftime': identifier not found
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atltime.h(420) : error C3861: '_gmtime64_s': identifier not found
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atltime.h(421) : error C3861: 'strftime': identifier not found
c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlcomtime.h(363) : error C3861: 'strftime': identifier not found
I don't know why they appear or how to make them go away. Does anybody have a clue what might be going on?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I don't know why I solve problems just after posting a message here, but it happens everytime I post a problem. Don't get me wrong, but I try several hours if not days before I post a new thread here, but just after that, I find the solution.
The problem was that I have a file called "time.h". This is not the real problem. I specified additional include directories and the MFC file includes <time.h>. The additional include directories cause the compiler to include my time.h instead of the right time.h (the C header). I don't know why my directories have precedance over the standard directories, but I think that MS would say: "This is by design.."
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|