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

C / C++ / MFC

 
Generalchar* from C++ dll in C# Pin
vinayakdl4-Jan-05 12:31
vinayakdl4-Jan-05 12:31 
GeneralRe: char* from C++ dll in C# Pin
Anthony_Yio4-Jan-05 20:53
Anthony_Yio4-Jan-05 20:53 
GeneralMaximizing view Pin
act_x4-Jan-05 10:55
act_x4-Jan-05 10:55 
GeneralRe: Maximizing view Pin
KaЯl4-Jan-05 21:39
KaЯl4-Jan-05 21:39 
GeneralRe: Maximizing view Pin
Rahim Rattani4-Jan-05 21:57
Rahim Rattani4-Jan-05 21:57 
GeneralIP address resolution Pin
Themis4-Jan-05 10:16
Themis4-Jan-05 10:16 
GeneralRe: IP address resolution Pin
Roger Wright4-Jan-05 10:47
professionalRoger Wright4-Jan-05 10:47 
GeneralSending strings (or characters) through sockets. Pin
SimCom4-Jan-05 10:15
SimCom4-Jan-05 10:15 
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? D'Oh! | :doh:

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 Blush | :O

If my application works, I forget all my problems.
GeneralMicrosoft Word Event handling help... Pin
Moozz4-Jan-05 10:09
Moozz4-Jan-05 10:09 
GeneralStruct array with string identifier Pin
Oscar Rodriguez4-Jan-05 9:55
Oscar Rodriguez4-Jan-05 9:55 
GeneralRe: Struct array with string identifier Pin
Chris Losinger4-Jan-05 10:14
professionalChris Losinger4-Jan-05 10:14 
GeneralRe: Struct array with string identifier Pin
Oscar Rodriguez5-Jan-05 0:23
Oscar Rodriguez5-Jan-05 0:23 
GeneralRe: Struct array with string identifier Pin
Chris Losinger5-Jan-05 1:09
professionalChris Losinger5-Jan-05 1:09 
GeneralRe: Struct array with string identifier Pin
Oscar Rodriguez6-Jan-05 1:26
Oscar Rodriguez6-Jan-05 1:26 
GeneralRe: Struct array with string identifier Pin
Chris Losinger6-Jan-05 2:10
professionalChris Losinger6-Jan-05 2:10 
QuestionLinking C libraries to C++? Pin
balaclavabob4-Jan-05 8:48
balaclavabob4-Jan-05 8:48 
AnswerRe: Linking C libraries to C++? Pin
Chris Meech4-Jan-05 9:15
Chris Meech4-Jan-05 9:15 
GeneralRe: Linking C libraries to C++? Pin
balaclavabob4-Jan-05 10:40
balaclavabob4-Jan-05 10:40 
GeneralRe: Linking C libraries to C++? Pin
Michael Dunn4-Jan-05 10:50
sitebuilderMichael Dunn4-Jan-05 10:50 
GeneralObtaining a handle to a textbox and populating it with text Pin
willertron4-Jan-05 8:43
willertron4-Jan-05 8:43 
GeneralRe: Obtaining a handle to a textbox and populating it with text Pin
Blake Miller4-Jan-05 9:49
Blake Miller4-Jan-05 9:49 
GeneralRe: Obtaining a handle to a textbox and populating it with text Pin
BlackDice4-Jan-05 11:11
BlackDice4-Jan-05 11:11 
Generalfatal error C1010: from VC++ .net HELP!!! Pin
bobhou4-Jan-05 8:07
bobhou4-Jan-05 8:07 
GeneralRe: fatal error C1010: from VC++ .net HELP!!! Pin
Chris Losinger4-Jan-05 10:08
professionalChris Losinger4-Jan-05 10:08 
GeneralRe: fatal error C1010: from VC++ .net HELP!!! Pin
Michael Dunn4-Jan-05 10:51
sitebuilderMichael Dunn4-Jan-05 10:51 

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.