Click here to Skip to main content
16,014,838 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: using substring in VC++ Pin
David Crow16-Jun-04 7:49
David Crow16-Jun-04 7:49 
GeneralRe: using substring in VC++ Pin
swerajan16-Jun-04 8:01
swerajan16-Jun-04 8:01 
GeneralRe: using substring in VC++ Pin
David Crow16-Jun-04 8:05
David Crow16-Jun-04 8:05 
GeneralRe: using substring in VC++ Pin
toxcct16-Jun-04 9:54
toxcct16-Jun-04 9:54 
GeneralCritical Section question Pin
kfaday16-Jun-04 7:25
kfaday16-Jun-04 7:25 
GeneralRe: Critical Section question Pin
Blake Miller16-Jun-04 13:27
Blake Miller16-Jun-04 13:27 
GeneralRe: Critical Section question Pin
kfaday16-Jun-04 14:31
kfaday16-Jun-04 14:31 
GeneralRe: Critical Section question Pin
Blake Miller16-Jun-04 14:41
Blake Miller16-Jun-04 14:41 
If you can not identify your clients, you will never sort this out.
Suppose you have a variable called PointListOwner, and you can assign PLO_NONE, PLO_CLIENT_ONE, or PLO_CLIENT_TWO, then initially you set it to PLO_NONE.

Then, when you get the button down message, you figure out which client the message came from and assign the variable that client's identifier (assuming no client currently owns the list). Then when another button down message comes in, if it is not client who owns the list, ignore it. When a button up message comes in, then if it is not client who owns it, ignore it. If the button up is the client who owns list, then draw the lines and then set the owner back to none, so the other client, or the same one, can own the list on the next button down.

Since you only have one thread, no mutex, criticalsection, etc. is going to help you with blocking access.

I don't knwo how your server is accepting the client messages, but you need to factor in a mechanism for the messages to be associated with each client.

GeneralRe: Critical Section question Pin
kfaday16-Jun-04 15:35
kfaday16-Jun-04 15:35 
Generala newbie question Pin
Nelson L.16-Jun-04 6:33
Nelson L.16-Jun-04 6:33 
GeneralRe: a newbie question Pin
Rodrigo Pinto Pereira de Souza16-Jun-04 7:15
Rodrigo Pinto Pereira de Souza16-Jun-04 7:15 
GeneralRe: a newbie question Pin
Deian16-Jun-04 10:48
Deian16-Jun-04 10:48 
GeneralGetting SID of computer Pin
Bash16-Jun-04 6:27
Bash16-Jun-04 6:27 
GeneralRe: Getting SID of computer Pin
David Crow16-Jun-04 7:48
David Crow16-Jun-04 7:48 
Generalcopy file to another folder Pin
elephantstar16-Jun-04 6:24
elephantstar16-Jun-04 6:24 
GeneralRe: copy file to another folder Pin
palbano16-Jun-04 7:06
palbano16-Jun-04 7:06 
GeneralRe: copy file to another folder Pin
elephantstar16-Jun-04 10:02
elephantstar16-Jun-04 10:02 
GeneralRe: copy file to another folder Pin
David Crow16-Jun-04 7:54
David Crow16-Jun-04 7:54 
GeneralRe: copy file to another folder Pin
elephantstar16-Jun-04 10:04
elephantstar16-Jun-04 10:04 
GeneralRe: copy file to another folder Pin
Archer28216-Jun-04 19:25
Archer28216-Jun-04 19:25 
Generalconversion from 'long' to 'void *' of greater size Pin
TonidasCouves16-Jun-04 6:19
sussTonidasCouves16-Jun-04 6:19 
GeneralRe: conversion from 'long' to 'void *' of greater size Pin
bikram singh16-Jun-04 6:44
bikram singh16-Jun-04 6:44 
GeneralRe: conversion from 'long' to 'void *' of greater size Pin
16-Jun-04 6:49
suss16-Jun-04 6:49 
GeneralRe: conversion from 'long' to 'void *' of greater size Pin
bikram singh16-Jun-04 7:24
bikram singh16-Jun-04 7:24 
GeneralRe: conversion from 'long' to 'void *' of greater size Pin
Member 1054638616-Jun-04 7:27
Member 1054638616-Jun-04 7:27 

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.