Re: Cache the login information

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I use code like this:

AfxGetApp()->WriteProfileString(_T("Host History"), _T("MessageServer
Host"), m_csMessageServerHost);
AfxGetApp()->WriteProfileString(_T("Host History"), _T("MessageServer
Port"), m_csMessageServerPort);

And to get back...

m_csMessageServerHost = GetProfileStringRimage(_T("Host History"),
_T("MessageServer Host"),_T("Messaging
Host"),GRS(IDS_THIS_COMPUTER),false);
m_csMessageServerPort = GetProfileStringRimage(_T("Host History"),
_T("MessageServer Port"),_T("Messaging Port"),DEFAULT_PORT,false);

You can fill in the variables for the edit controls directionly and use
UpdateData(false) to update the window.

Tom

<anup.kataria@xxxxxxxxx> wrote in message
news:1155191332.208418.208970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi

I am writting a chat client. I need to add such feature that Last login
user name should automatically appear in the input box.

I need to know should I use a file or there is any other method for
this.



.


Quantcast