Click here to Skip to main content
16,007,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCreating CFormView-form from dialog Pin
28-Aug-01 3:22
suss28-Aug-01 3:22 
GeneralRe: Creating CFormView-form from dialog Pin
Joel Holdsworth28-Aug-01 9:59
Joel Holdsworth28-Aug-01 9:59 
GeneralRe: Creating CFormView-form from dialog Pin
29-Aug-01 1:57
suss29-Aug-01 1:57 
GeneralWSAAsyncselect winsock problem Pin
Kuniva28-Aug-01 2:54
Kuniva28-Aug-01 2:54 
GeneralRe: WSAAsyncselect winsock problem Pin
Malcolm McMahon28-Aug-01 3:04
Malcolm McMahon28-Aug-01 3:04 
GeneralRe: WSAAsyncselect winsock problem Pin
Kuniva28-Aug-01 23:11
Kuniva28-Aug-01 23:11 
GeneralRe: WSAAsyncselect winsock problem Pin
Kuniva28-Aug-01 23:14
Kuniva28-Aug-01 23:14 
GeneralRe: WSAAsyncselect winsock problem Pin
Malcolm McMahon29-Aug-01 0:04
Malcolm McMahon29-Aug-01 0:04 
The top half of the long value in the window message (from memory) contains the
FD_ flags for the event(s) that trigger the message.

In general, however, I use AsyncSelect like this:

  1. I make a winsock call.
  2. If the call returns the WOULDBLOCK result I wait for AsyncSelect to send a message.
  3. I make the same call again. This time I should get a real result (should I get a WOULDBLOCK I'll wait again).


When I get these messages I generally just look for an error code , or a FD_CLOSE. Otherwise I check the status by making the winsock calls.

So, for example, you do a listen. You call accept and it will normally give you a WOULDBLOCK (if it doesn't it means a call is already waiting and you can take it).

Then you wait for a message from asynselect to tell you there's a connection waiting.

Then you make that accept call again and it gives you the new socket.


The only exception to this pattern is the connect call which you only make once. In the case of the connect call once your FD_CONNECT comes back you're connected. You don't make the connect call again (an annoying inconsistency to my mind).
GeneralTooltips and Trees Pin
Malcolm McMahon28-Aug-01 2:50
Malcolm McMahon28-Aug-01 2:50 
GeneralRe: Tooltips and Trees Pin
Tomasz Sowinski28-Aug-01 3:24
Tomasz Sowinski28-Aug-01 3:24 
GeneralRe: Tooltips and Trees Pin
Malcolm McMahon28-Aug-01 5:20
Malcolm McMahon28-Aug-01 5:20 
GeneralRe: Tooltips and Trees Pin
Tomasz Sowinski28-Aug-01 5:25
Tomasz Sowinski28-Aug-01 5:25 
GeneralRe: Tooltips and Trees Pin
Malcolm McMahon28-Aug-01 5:28
Malcolm McMahon28-Aug-01 5:28 
GeneralRe: Tooltips and Trees Pin
Tomasz Sowinski28-Aug-01 5:34
Tomasz Sowinski28-Aug-01 5:34 
GeneralRe: Tooltips and Trees Pin
Malcolm McMahon28-Aug-01 5:41
Malcolm McMahon28-Aug-01 5:41 
GeneralMemory leak Pin
Noman Nadeem28-Aug-01 2:16
Noman Nadeem28-Aug-01 2:16 
GeneralRe: Memory leak Pin
Anders Molin28-Aug-01 2:23
professionalAnders Molin28-Aug-01 2:23 
GeneralRe: Memory leak Pin
billb211228-Aug-01 6:15
billb211228-Aug-01 6:15 
GeneralRe: Memory leak Pin
Derek Waters28-Aug-01 14:08
Derek Waters28-Aug-01 14:08 
GeneralTwo simple questions ... Pin
Hadi Rezaee28-Aug-01 1:12
Hadi Rezaee28-Aug-01 1:12 
GeneralRe: Two simple questions ... Pin
Anders Molin28-Aug-01 2:20
professionalAnders Molin28-Aug-01 2:20 
GeneralRe: Two simple questions ... Pin
Hadi Rezaee28-Aug-01 19:12
Hadi Rezaee28-Aug-01 19:12 
GeneralRe: Two simple questions ... Pin
Anders Molin28-Aug-01 22:09
professionalAnders Molin28-Aug-01 22:09 
GeneralRe: Two simple questions ... Pin
KingsGambit28-Aug-01 21:22
KingsGambit28-Aug-01 21:22 
Questionhow to capture active window background's screen? Pin
boyhill28-Aug-01 1:02
boyhill28-Aug-01 1:02 

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.