Click here to Skip to main content
15,908,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple inheritance Pin
#realJSOP14-Apr-03 6:42
professional#realJSOP14-Apr-03 6:42 
QuestionCreateProcess ??? Pin
will138314-Apr-03 5:38
will138314-Apr-03 5:38 
AnswerRe: CreateProcess ??? Pin
Rage14-Apr-03 6:08
professionalRage14-Apr-03 6:08 
GeneralRe: CreateProcess ??? Pin
will138314-Apr-03 6:27
will138314-Apr-03 6:27 
GeneralRe: CreateProcess ??? Pin
Rage14-Apr-03 6:43
professionalRage14-Apr-03 6:43 
GeneralRe: CreateProcess ??? Pin
Rage14-Apr-03 6:45
professionalRage14-Apr-03 6:45 
AnswerRe: CreateProcess ??? Pin
valikac14-Apr-03 7:41
valikac14-Apr-03 7:41 
GeneralI can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 5:24
Martin_Viet14-Apr-03 5:24 
hi.

I´m making a easy network application. So I did a new class which inherits from CSocket. Then I overwrite OnConnect and OnReceive, where I´ve written :

<br />
void SurSocket2::OnConnect(int nErrorCode) <br />
{<br />
	// TODO: Add your specialized code here and/or call the base class<br />
	SurSocket2 s;<br />
<br />
	Accept(s);<br />
	<br />
	CSocket::OnConnect(nErrorCode);<br />
}


void SurSocket2::OnReceive(int nErrorCode) <br />
{<br />
	// TODO: Add your specialized code here and/or call the base class<br />
<br />
   TCHAR buff[4096];<br />
   int nRead;<br />
   nRead = Receive(buff, 4096);<br />
   <br />
   AfxMessageBox(buff);<br />
   <br />
	<br />
	CSocket::OnReceive(nErrorCode);<br />
}


.... Finally, in the main dialog i have:
	int nPort = 21010;<br />
<br />
    socket.Create( nPort);<br />
<br />
	socket.Listen(50);


Why it doesn´t work? Confused | :confused: Confused | :confused:

el hombre arriesga su vida cada vez que elige y eso es lo que lo hace libre
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 5:30
Joaquín M López Muñoz14-Apr-03 5:30 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 5:46
Martin_Viet14-Apr-03 5:46 
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 6:17
Joaquín M López Muñoz14-Apr-03 6:17 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 7:01
Martin_Viet14-Apr-03 7:01 
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 7:24
Joaquín M López Muñoz14-Apr-03 7:24 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 9:04
Martin_Viet14-Apr-03 9:04 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 12:21
Martin_Viet14-Apr-03 12:21 
Generalpragma once Pin
ns14-Apr-03 5:15
ns14-Apr-03 5:15 
GeneralRe: pragma once Pin
User 988514-Apr-03 5:17
User 988514-Apr-03 5:17 
GeneralRe: pragma once Pin
Joaquín M López Muñoz14-Apr-03 5:22
Joaquín M López Muñoz14-Apr-03 5:22 
GeneralThanks! Pin
ns14-Apr-03 6:13
ns14-Apr-03 6:13 
GeneralRemote debugging a C++ app Pin
Navin14-Apr-03 5:05
Navin14-Apr-03 5:05 
Generaldynamic_cast and static_cast Pin
User 988514-Apr-03 5:05
User 988514-Apr-03 5:05 
GeneralRe: dynamic_cast and static_cast Pin
Joaquín M López Muñoz14-Apr-03 5:26
Joaquín M López Muñoz14-Apr-03 5:26 
GeneralRe: dynamic_cast and static_cast Pin
User 988514-Apr-03 5:31
User 988514-Apr-03 5:31 
QuestionMSAccess BatchUpdate throw ADO ? Pin
rosen14-Apr-03 3:58
rosen14-Apr-03 3:58 
AnswerRe: MSAccess BatchUpdate throw ADO ? Pin
Dave Kreskowiak14-Apr-03 5:05
mveDave Kreskowiak14-Apr-03 5:05 

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.