|
Normally, only the window under the mouse receives WM_SETCURSOR messages. SetCapture() ensures that your window receives WM_SETCURSOR messages without regard to the position of the mouse cursor. That said, is your window receiving WM_SETCURSOR messages even when the mouse is over other windows?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I call SetCursor () function in my OnInitDialog. But my window only receives WM_SETCURSOR messages when the cursor is over it. Even the controls into my window doesn't receive this message!
Thks in advance!
Appstmd
http://www.atlence.com
|
|
|
|
|
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;
|
|
|
|