|
Hey I have noticed a similar problem.
Anyway I double checked if I released all the
references and then MS Word appeared to exit
properly.
|
|
|
|
|
could you give me an example?
|
|
|
|
|
My doing job is to receive mail from a remote exchange server with multi users account. I have these users' name and password, but I don't know how can I get their letters through simple MAPI.
My OS is win2000 professional. I have an exchange server in the network. And I logged into win2000 with my own account. I don't know if I had to log into my OS with some special account.
Could anyone help me? Whoever you are, Thanks a lot.
|
|
|
|
|
If it's a POP server, you can POP their mails out. There are some POP3 implementation classes here on CP
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I've seen that article, but some matters puzzled me.
1. I'd like to get multi users' letters. What I've know is: their account name, their password, the exchange server name. But In the article, he tolds me to use profile to logon. I've seen MSDN for help, but till now I couldn't generate a profile by the information I've got.
2. I'd like to have the same performance just like the OUTLOOK. Hum... I mean, my boss asked me to do so. He want me to receive and send letters with my application and have the same effect as OUTLOOK. And my changes through my application could be seen while using OUTLOOK.
Can some one refer some way or some books to me?
Thanks.
|
|
|
|
|
How can I show a modeless dialog in a separate thread ?
Ex: I wrote a app as dialog, let's call it CMyProgDlg
I have a button, whenever I press at that button, it calls a function( let's call it
static void Thread(LPVOID lParam)
This function shows a modeless dialog. This modeless dialog run in a thread. I tried AfxBeginThread(Thread, this) in CMyProgDlg, but it failed.
Anyway ?
Thanks
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
You don't really need to create a modeless dialog using a separate thread because the parent dialog or window is still accesible and can process messages.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
You've got it backwards. Assuming you really do need a thread -- have the modeless dialog create, control, and abide by the thread, instead of the other way around.
Regards, Larry Antram
Stardust Software
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones."
-- Albert Einstein
|
|
|
|
|
I'm trying to read the contents of a text file, then put it in an Edit control using SetDlgItemText(). I'm using CStdioFile::ReadString(CString), but that only reads the first string of the file. I'm kind of new to Win32 and MFC, so I'm not sure how to read the entire contents. Any help would be appreciated.
Thanks, Emearg.
|
|
|
|
|
Did you try calling ReadString until it returns NULL? It doesn't actually say to do this in the documentation, but it will probably work. Otherwise look at CFile.
Like it or not, I'm right.
|
|
|
|
|
Alright...
I declared a bool variable called 'done', and tried to use it in a loop like this:
while(!done)
{
if(File.ReadString(LogString) == FALSE)
done = true;
}
I did false because CStdioFile::ReadString returns BOOL types.
That should work, but it doesn't. When I click the button that calls the function that snippet is in it doesn't do anything. If I put just a simple call to the ReadSting() function then it reads the first string.. but that loops makes it read nothing... I dunno what's wrong. =/
thanks, emearg
|
|
|
|
|
Loop a call to ReadString. You'll get a NULL or a FALSE when EOF is reached depending on which over-ride of the function you are using.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Sweet, I added this:
if(File.Open(FileName, CFile::modeRead | CFile::typeText))
{
while(!done)
{
if(File.ReadString(LogInput) == FALSE)
done = true;
LogString += LogInput;
LogString += _T("\r\n");
}
}
And that did it. It looks exactly like the text file, thanks everyone that helped
|
|
|
|
|
We as programmer often need collecting many information from the web. iBee is such a good tool let programmer save exact content from the web, yes, you needn't save anything you dislike such as Ads Picture, Frames. just select the content you want and drop it, you will get what you want. What's more, you can edit the content in Internet Explorer! and then build all articles into a eBook in CHM Format.
iBee is especially optimized for codeproject users, iBee will download all zip or exe files.
you can find this cool tool at www.justdosoft.com. if you give me some advices, I will give you a copy of iBee free, thank you.
Screen Shot
|
|
|
|
|
Hi I have used this code for a UI in a dll.
<br />
<br />
CNewApp * thread = (CNewApp *) AfxBeginThread(RUNTIME_CLASS(CNewApp),THREAD_PRIORITY_NORMAL,0, CREATE_SUSPENDED);<br />
<br />
I get the following compile error
error: C2039: 'classCNewApp' : is not a member of 'CNewApp'
Note the no space in the error
Why Why Why??
CNewApp is of type CWinApp with is of type CWinThread
---
|
|
|
|
|
Does you CNewApp class contain a DECLARE_CLASS statement?
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?
|
|
|
|
|
THis is how I declared my class
<br />
class AFX_EXT_CLASS CNewApp : public CWinApp<br />
{<br />
DECLARE_DYNCREATE(CNewApp )<br />
CNewApp ();<br />
virtual BOOL InitInstance();<br />
};<br />
<br />
IMPLEMENT_DYNCREATE(CDialogThread, CWinApp)<br />
BOOL CNewApp ::InitInstance() <br />
{ <br />
...<br />
}<br />
|
|
|
|
|
Why are you trying to create a CWinApp object? You ought to be using a direct derivation of CWinThread.
Signature space for rent. Apply Within.
|
|
|
|
|
ok... I've had problems with unhandled exception error before... but right when i fixed it, i kind of forgot what i did to fix it... this is my code... "im posting it all.. except my header file, just to make sure you know what im doing."
#include <iostream>
#include "Class.h"//included header "Class.h"
using namespace std;
Name person; //class def person
int NN = 1;//incriment
char Names[21]; //total amount of names
char SName[100];
//SetName function.
bool Name::SetName(char* NName)
{
if(!NName)
{
return false;
}
int NLen = (strlen(NName) + 1);
char *NewName = new char[NLen];
if(!NewName)
{
return false;
}
strcpy(NewName, NName);
delete[] M_Name;
M_Name = NewName;
Names[NN] = *M_Name;//I think it has somthing to do with this
NN++;
return true;
}
const char* Name::GetName()
{
return M_Name;
}
//main
int main()
{
for(;;)//main loop
{
gets(SName);
person.SetName(SName);
cout << person.GetName() << endl << endl; //print name that you just typed.
for(int inc;inc < NN;inc++) //print all names.
{
cout << Names[inc] << endl; //error unhandled exception.
}//end of print all names, loop.
inc = 1;
}//end main loop.
return 0;
}
//end main
//constructor & deconstructor
//*******************
Name::Name()
{
M_Name = NULL;
}
Name::~Name()
{
delete[] M_Name;
}
The error accured when i tried to set Names[NN] = *M_Name; the error feels like its at the tip of my tongue, yet i cant think of it.
Thanks all for the help!
~SilverShalkin
ps... how do you show a screen shot of your code? or post your code on CP with its background different... "is ther a place on the forum that shows how?"
Thanks!
|
|
|
|
|
for(int inc;inc < NN;inc++)
must initialize inc = 0;
soptest
|
|
|
|
|
I didn't even look through the code, but that is truly awesome.
SilverShakin - step into the debugger sometime to see what amazingly huge negative numbers an unassigned int gets as a default value. One thing I like about C# - it sets sensible default values for variables.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
M_Name is probably NULL and you're trying to deference it.
You can make your code look different by wrapping it in a <pre> tag, but of course then you need to type & lt and & gt ( without the space ) to get your < > characters.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
int the for loop
the
for(int inc;
the int initializes, or defines inc as an intiger... therefore i do not need to define it anywhere else... but ill look over it and see if i made a mistake...
Thanks all!
M_Name is = NULL,.... hmm im thinking... ill go and change some things... if i cant figuere it out, ill jump back on
Thanks again!
~SilverShalkin
|
|
|
|
|
The problem is exactly as has been stated - you define an integer, but do not give it a value. It's value will be in the order of -80,0000. You need to put int inc = 0, not just int inc.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|