Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDrawItem for CTreeCtrl Pin
Florin Ochiana17-Mar-03 12:58
Florin Ochiana17-Mar-03 12:58 
GeneralRe: DrawItem for CTreeCtrl Pin
Neville Franks17-Mar-03 17:47
Neville Franks17-Mar-03 17:47 
GeneralCAsyncSockets Pin
chrisedgington17-Mar-03 12:18
chrisedgington17-Mar-03 12:18 
GeneralRe: CAsyncSockets Pin
Florin Ochiana17-Mar-03 12:55
Florin Ochiana17-Mar-03 12:55 
GeneralRe: CAsyncSockets Pin
Moak18-Mar-03 1:40
Moak18-Mar-03 1:40 
GeneralRe: CAsyncSockets Pin
chrisedgington18-Mar-03 23:18
chrisedgington18-Mar-03 23:18 
GeneralRe: CAsyncSockets Pin
Moak19-Mar-03 3:36
Moak19-Mar-03 3:36 
GeneralRe: CAsyncSockets Pin
chrisedgington19-Mar-03 4:31
chrisedgington19-Mar-03 4:31 
Thanks Moak-I was failing to get the thing to accept a call properly but have cheated now:
<br />
while(true)<br />
{<br />
if(Myskt.Accept(RecSock)==0)<br />
{<br />
SleepEx(10,FALSE);<br />
}<br />
else<br />
{ <br />
//when it hits here the call should have been accepted<br />
//and onaccept called, right?<br />
Myskt.Onaccept(); //but i am having to do it manually <br />
break;<br />
}<br />


This is my OnAccept() function as it stands. The function doesn't seem to call it automatically when the if condition is not 0 (i.e the accept completes); instead I am invoking it manually. Can you see what it is that I am doing wrong?

<br />
void Mydamnsocket::OnAccept(int nErrorCode) <br />
{<br />
Mydamnsocket RecSock;<br />
Mydamnsocket::Accept(RecSock);<br />
char Acceptmsg[20]="Connected to server";<br />
Mydamnsocket::Send(Acceptmsg,20);<br />
} <br />


Is it necessary to stick another thread in to deal with this or something?
Unsure | :~

P.S. You mention about reading the examples section-can you recommend a particular one that contains an implementation of this that isn't too complex? Cheers!
GeneralRe: CAsyncSockets Pin
Moak19-Mar-03 4:47
Moak19-Mar-03 4:47 
GeneralRe: CAsyncSockets Pin
chrisedgington19-Mar-03 4:58
chrisedgington19-Mar-03 4:58 
GeneralRe: CAsyncSockets Pin
Moak19-Mar-03 5:08
Moak19-Mar-03 5:08 
GeneralRe: CAsyncSockets Pin
chrisedgington19-Mar-03 6:07
chrisedgington19-Mar-03 6:07 
GeneralWin 32 Tooltip Pin
Anonymous17-Mar-03 12:18
Anonymous17-Mar-03 12:18 
GeneralRe: Win 32 Tooltip Pin
Neville Franks17-Mar-03 17:44
Neville Franks17-Mar-03 17:44 
GeneralRe: Win 32 Tooltip Pin
georgiek5017-Mar-03 22:46
georgiek5017-Mar-03 22:46 
GeneralRe: Win 32 Tooltip Pin
Neville Franks17-Mar-03 23:35
Neville Franks17-Mar-03 23:35 
GeneralRe: Win 32 Tooltip Pin
georgiek5018-Mar-03 1:28
georgiek5018-Mar-03 1:28 
GeneralReal quick question... Pin
CherezZaboro17-Mar-03 12:16
CherezZaboro17-Mar-03 12:16 
GeneralRe: Real quick question... Pin
_Theo_18-Mar-03 0:14
_Theo_18-Mar-03 0:14 
GeneralRe: Real quick question... Pin
Lakitu18-Mar-03 0:16
Lakitu18-Mar-03 0:16 
QuestionDisable overlay for a MCI window ? Pin
squizz17-Mar-03 11:41
squizz17-Mar-03 11:41 
QuestionOnItemChanged() - how to "reset" it? Pin
ns17-Mar-03 10:59
ns17-Mar-03 10:59 
AnswerRe: OnItemChanged() - how to "reset" it? Pin
Ravi Bhavnani17-Mar-03 11:11
professionalRavi Bhavnani17-Mar-03 11:11 
GeneralRe: OnItemChanged() - how to "reset" it? Pin
ns17-Mar-03 11:14
ns17-Mar-03 11:14 
GeneralRe: OnItemChanged() - how to "reset" it? Pin
Ravi Bhavnani17-Mar-03 11:37
professionalRavi Bhavnani17-Mar-03 11:37 

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.