|
Astitva23 wrote: function to flush the text
Don't get your question fully. May be you are looking for a "setWindowText("")"? Guess
not. Ok dinner time. May be back in 30 mins.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I will probably scratch the head of my tutor for this one. Anyway thanks for the effort...
|
|
|
|
|
I have an application that is running on a japanese machine and it seems that the code in that application is not working properly.
It is having a char a[256] array and it looks like the char array is not getting populated with a string.
In all strcpy(a, "test is here") is not working. Is this something related to unicode stuff on japanese locale. Will usage of tchar solve the problem?
|
|
|
|
|
tom groezer wrote: Will usage of tchar solve the problem?
Have you tried it to see?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
tom groezer wrote: Will usage of tchar solve the problem?
But you will have to replace those functions with equivalent _tcs functions. If you want to completely move to UNICODE and no looking back, you can choose wchar_t and the corresponding wcs functions.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Application uses multibyte character set but the symbol _UNICODE is not defined. Nit sure if the LOCALE Japanese can make the application to run in Unicode format?
|
|
|
|
|
tom groezer wrote: Application uses multibyte character set but the symbol _UNICODE is not defined
You mean "And"?
When you declare, MBCS, you should not use UNICODE. And Japanese letter would work with UNICODE. Remove MBCS if you had defined in your settings. and add UNICODE,_UNICODE.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Sorry to not make you understand. The project uses MBCS settings. It can't be set to unicode settings.
I was thinking if this app is made to run on a japanese m/c is there a way that locale settings could turn the application to be unicode aware.Is that is the case, since my application code used char array and strcpy function would it make it compulsory to change the application code to use -tcscpy and tchar array. This application code works perfectly on a my system.
|
|
|
|
|
tom groezer wrote: Sorry to not make you understand. The project uses MBCS settings. It can't be set to unicode settings.
Then use the character mapping routines in tchar.h. It'll handle MBCS, Unicode, or ANSI. Just learn the equivalent string functions for it.
tom groezer wrote: This application code works perfectly on a my system.
Probably because your system isn't a Japanese one. Just use the character mapping routines in tchar.h and you'll be ok.
|
|
|
|
|
Hi to All,
First of all thanks to all for replies to my previous post.
I am going to do an simple chat application on a network(LAN).Using MFC.I wanted an advice whether to do it as dialog based, SDI or MDI? The application should be more or less the same as GTalk
Please advice for both client and server.
Thanks in Advance
I am a beginner
|
|
|
|
|
I will start with dialog based application... with some pretty custom drawings...
- ns ami -
|
|
|
|
|
thanks for your reply,
But what about the server? can that be also dialog based, since there will be many clients. So i was wondering if it has to be an console based application.
I am a beginner
|
|
|
|
|
Sorry. I am not much experienced in socket programing.
But if you are going to create a gtalk like application peer to peer model is enough.
- ns ami -
|
|
|
|
|
You could make your server a service.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Answered to me?
- ns ami -
|
|
|
|
|
thanks for your reply ns ami,
And sorry that was for code-o-mate.
anyway,do you mean "cleint-client" by "peer to peer"
I am a beginner
|
|
|
|
|
himangshuS wrote: anyway,do you mean "cleint-client" by "peer to peer"
I am not sure about the terminology. But AFAIK, in peer to peer, server and client will be in the same application. Each application will keep a list of its contacts and at the starting of application it can broadcast or send some messages to each contacts. So that others can know that you are logged in.
This is only my fair concepts...
- ns ami -
|
|
|
|
|
here is one more doubt of me.
How can we broadcast a message actually using MFC socket programing. Is it a for loop and send to each one. Or any syntax is there to broadcast a message to all in a network or may be a set of IP address.
I am a beginner
|
|
|
|
|
That is something with Datagram Sockets...
- ns ami -
|
|
|
|
|
Whoups, sorry, of course i wanted to answer himangshuS, didn't notice i "mis-clicked".
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Code-o-mat wrote: sorry
No problem... It was just to inform you...
- ns ami -
|
|
|
|
|
Oh ya, that sounds pretty interesting and realistic.
But I was thinking that...why do i need a server,can i communicate directly(client to client)?
May the server can give a list of information with IP address and username,thats it. Then the clients can talk to each other directly(not through the server). Is that possible?
regards,
HImangshu S
I am a beginner
|
|
|
|
|
Yes, that is possible.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
fine, so i guess i can go ahead a simple client-client design with a limited server application which will send to the client for the IP-username mapping.
But, here again i need to maintain some table structure. I am new to MFC. can I use ms access here?
I am a beginner
|
|
|
|
|
I think you can but i have never worked with access so i can't help you with it.
Plan your chat-protocol carefully, remember that your clients will probably need to be notified of certain events like someone going offline or coming online...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|