Click here to Skip to main content
15,929,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalopening a dialog box Pin
Rajveer22-Feb-02 7:37
Rajveer22-Feb-02 7:37 
GeneralRe: opening a dialog box Pin
Sonu Kapoor22-Feb-02 7:51
Sonu Kapoor22-Feb-02 7:51 
GeneralRe: opening a dialog box Pin
Paul M Watt22-Feb-02 8:00
mentorPaul M Watt22-Feb-02 8:00 
GeneralRe: opening a dialog box Pin
Tili2-Dec-02 22:03
Tili2-Dec-02 22:03 
GeneralRe: opening a dialog box Pin
Jon Hulatt22-Feb-02 8:06
Jon Hulatt22-Feb-02 8:06 
GeneralRe: opening a dialog box Pin
mr200322-Feb-02 11:48
mr200322-Feb-02 11:48 
GeneralThread Problems Pin
Jon Hulatt22-Feb-02 7:37
Jon Hulatt22-Feb-02 7:37 
GeneralRe: Thread Problems Pin
Paul M Watt23-Feb-02 16:10
mentorPaul M Watt23-Feb-02 16:10 
Since you are using a Derived class from CAsyncSocket, you could simply add a static member variable to the derived class.

Then you would expose a static member function of the class that will create a new instance of the class only if the static count is less than the limit that you want to impose. When ever the objects are destroyed, they will decrement the count of current objects.

Then you can hide the constructors by declaring them private, this will make it so that the only way that users of your class can create a new object by calling your static member function.

The thread solution that you were talking about should be able to work, you would need to structure your worker thread procedure to start, create your new object, attempt to create the connection, then loop while it is working. It would only terminate with some message or event that you set for the thread. With out really knowing the details of what this thread needs to perform, I cannot give any more hints for this solution.
GeneralRe: Thread Problems Pin
Jon Hulatt24-Feb-02 21:56
Jon Hulatt24-Feb-02 21:56 
GeneralLoading bitmaps Pin
22-Feb-02 6:49
suss22-Feb-02 6:49 
GeneralRe: Loading bitmaps Pin
Not Active22-Feb-02 7:11
mentorNot Active22-Feb-02 7:11 
GeneralRe: Loading bitmaps Pin
Paul M Watt22-Feb-02 7:15
mentorPaul M Watt22-Feb-02 7:15 
GeneralBroadcasting the command Pin
yellowine22-Feb-02 6:23
yellowine22-Feb-02 6:23 
GeneralRe: Broadcasting the command Pin
Tim Smith22-Feb-02 6:30
Tim Smith22-Feb-02 6:30 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
yellowine22-Feb-02 6:34
yellowine22-Feb-02 6:34 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
Tim Smith22-Feb-02 6:46
Tim Smith22-Feb-02 6:46 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
Nish Nishant22-Feb-02 9:18
sitebuilderNish Nishant22-Feb-02 9:18 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
yellowine22-Feb-02 10:35
yellowine22-Feb-02 10:35 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
pba_22-Feb-02 10:40
pba_22-Feb-02 10:40 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
yellowine22-Feb-02 10:42
yellowine22-Feb-02 10:42 
GeneralRe: Broadcasting the command: Problem with UpdateAllViews() Pin
pba_22-Feb-02 12:04
pba_22-Feb-02 12:04 
GeneralRe: Broadcasting the command Pin
22-Feb-02 7:00
suss22-Feb-02 7:00 
GeneralRe: Broadcasting the command Pin
yellowine22-Feb-02 10:36
yellowine22-Feb-02 10:36 
GeneralDeallocating Tree Control Data Pin
Aaron Schaefer22-Feb-02 6:17
Aaron Schaefer22-Feb-02 6:17 
GeneralRe: Deallocating Tree Control Data Pin
Tim Smith22-Feb-02 6:19
Tim Smith22-Feb-02 6:19 

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.