Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable Text Box in dialog Box Pin
PJ Arends4-Jan-05 19:03
professionalPJ Arends4-Jan-05 19:03 
GeneralRe: Disable Text Box in dialog Box Pin
John R. Shaw5-Jan-05 9:13
John R. Shaw5-Jan-05 9:13 
GeneralRe: Disable Text Box in dialog Box Pin
Member 15087325-Jan-05 0:24
Member 15087325-Jan-05 0:24 
GeneralI need some pointer help please Pin
fklldsvs4-Jan-05 17:29
fklldsvs4-Jan-05 17:29 
GeneralRe: I need some pointer help please Pin
ThatsAlok4-Jan-05 18:54
ThatsAlok4-Jan-05 18:54 
GeneralRe: I need some pointer help please Pin
John R. Shaw5-Jan-05 9:29
John R. Shaw5-Jan-05 9:29 
Questionhow can i play audio that use vivo's siren codec Pin
stephen_yeerwu4-Jan-05 15:31
stephen_yeerwu4-Jan-05 15:31 
QuestionHow can I share data which contain pointers between processes? Pin
berserkerr4-Jan-05 14:39
berserkerr4-Jan-05 14:39 
AnswerRe: How can I share data which contain pointers between processes? Pin
KaЯl4-Jan-05 21:26
KaЯl4-Jan-05 21:26 
AnswerRe: How can I share data which contain pointers between processes? Pin
Blake Miller5-Jan-05 5:09
Blake Miller5-Jan-05 5:09 
GeneralDoc View question Pin
act_x4-Jan-05 14:24
act_x4-Jan-05 14:24 
GeneralRe: Doc View question Pin
Shog94-Jan-05 14:36
sitebuilderShog94-Jan-05 14:36 
GeneralRe: Doc View question Pin
act_x4-Jan-05 14:47
act_x4-Jan-05 14:47 
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 

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.