Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmicrosoft acoustic echo canceller !! help Pin
usman sarwar6-Jan-05 15:08
usman sarwar6-Jan-05 15:08 
Generalplaying mp3/tone Pin
vinnzy6-Jan-05 14:39
vinnzy6-Jan-05 14:39 
GeneralWndProc : Passing parameters to Pin
tnguyen4446-Jan-05 11:24
tnguyen4446-Jan-05 11:24 
GeneralRe: WndProc : Passing parameters to Pin
User 66586-Jan-05 14:19
User 66586-Jan-05 14:19 
GeneralRe: WndProc : Passing parameters to Pin
tnguyen4446-Jan-05 14:43
tnguyen4446-Jan-05 14:43 
GeneralRe: WndProc : Passing parameters to Pin
User 66587-Jan-05 2:46
User 66587-Jan-05 2:46 
GeneralRe: WndProc : Passing parameters to Pin
tnguyen4447-Jan-05 7:15
tnguyen4447-Jan-05 7:15 
GeneralCan't send text trough socket-connection, help me please! Pin
SimCom6-Jan-05 9:34
SimCom6-Jan-05 9:34 
Hello my best friends,

I'm a beginner to Visual C++ programming, so I have some "stupid" questions for you and I hope you guys to help me.

I'm working on my own very simple chatapplication, but I encounterd some problems. I've made a client and a server part, I've tested it out but I had the problem that I couldn't send a text string. My serverside establishes a connection with the clientside ( I know it because I put some control messages to be sure there is a connection).

But when I try to send a peace of text, it does nothing except that it shows the sending text on my display and the receiver part shows nothing on the display. I used the following code to send a string:

void CSimComDlg::OnSend()
{
m_Message.GetWindowText(strMESSAGE);
m_pArOut->WriteString(strMESSAGE);
m_pArOut->Flush();
m_MsgDsp.SetWindowText(_T(Name+":"+strMESSAGE+"\r\n"));
strMESSAGE.Empty();
}

And to read a received string:

void CSimComDlg::ReadReceive()
{
m_pArIn->ReadString(strMESSAGE);
m_MsgDsp.SetWindowText(_T("Chatter:"+strMESSAGE+"\r\n"));
strMESSAGE.Empty();
}

m_pArOut and m_pArIn are CArchive pointers (I use this in combination with CSocketFile to send data over internet).

Is there something wrong with these codes?

I've seen some other example codes on the internet, they include also the length of the message to send and they check also the buffer if there's more data coming in. But are they neccesary to put them in my code?

I hope you can help me boyzz


If my application works, I forget all my problems.
GeneralRe: Can't send text trough socket-connection, help me please! Pin
lzzqqq6-Jan-05 16:57
lzzqqq6-Jan-05 16:57 
GeneralRe: Can't send text trough socket-connection, help me please! Pin
SimCom6-Jan-05 23:41
SimCom6-Jan-05 23:41 
GeneralRe: Can't send text trough socket-connection, help me please! Pin
El Corazon7-Jan-05 4:08
El Corazon7-Jan-05 4:08 
GeneralMs Visual C++ Toolkit 2003 Resource Pin
mycha6-Jan-05 9:26
mycha6-Jan-05 9:26 
GeneralTools->Custimize->Keyboard Pin
John R. Shaw6-Jan-05 9:02
John R. Shaw6-Jan-05 9:02 
QuestionHow to find the toolbar button's position? Pin
transoft6-Jan-05 7:11
transoft6-Jan-05 7:11 
AnswerRe: How to find the toolbar button's position? Pin
PJ Arends6-Jan-05 7:55
professionalPJ Arends6-Jan-05 7:55 
QuestionHow to change the Color of Scroll Bars? Pin
pubududilena6-Jan-05 6:48
pubududilena6-Jan-05 6:48 
GeneralStack Overflow Exception Pin
AssemblySoft6-Jan-05 6:43
AssemblySoft6-Jan-05 6:43 
GeneralRe: Stack Overflow Exception Pin
Tim Smith6-Jan-05 7:15
Tim Smith6-Jan-05 7:15 
GeneralRe: Stack Overflow Exception Pin
AssemblySoft6-Jan-05 11:19
AssemblySoft6-Jan-05 11:19 
GeneralRe: Stack Overflow Exception Pin
Ryan Binns6-Jan-05 17:47
Ryan Binns6-Jan-05 17:47 
GeneralRe: Stack Overflow Exception Pin
AssemblySoft6-Jan-05 22:02
AssemblySoft6-Jan-05 22:02 
GeneralRe: Stack Overflow Exception Pin
Ryan Binns7-Jan-05 13:00
Ryan Binns7-Jan-05 13:00 
QuestionSimulate pressing of tab key ??? Pin
Raul Simcic6-Jan-05 6:06
Raul Simcic6-Jan-05 6:06 
AnswerRe: Simulate pressing of tab key ??? Pin
Michael Dunn6-Jan-05 11:00
sitebuilderMichael Dunn6-Jan-05 11:00 
GeneralRe: Simulate pressing of tab key ??? Pin
Raul Simcic7-Jan-05 8:04
Raul Simcic7-Jan-05 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.