Click here to Skip to main content
15,905,229 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can i creat only one instance of my application Pin
Antony M Kancidrowski30-Jun-04 0:50
Antony M Kancidrowski30-Jun-04 0:50 
GeneralRe: how can i creat only one instance of my application Pin
J.B.30-Jun-04 1:52
J.B.30-Jun-04 1:52 
AnswerRe: how can i creat only one instance of my application Pin
David Crow30-Jun-04 3:08
David Crow30-Jun-04 3:08 
GeneralAbout Critical Section Pin
Member 66532629-Jun-04 23:44
Member 66532629-Jun-04 23:44 
GeneralRe: About Critical Section Pin
Neville Franks30-Jun-04 1:52
Neville Franks30-Jun-04 1:52 
GeneralRe: About Critical Section Pin
Mike Beckerleg30-Jun-04 5:18
Mike Beckerleg30-Jun-04 5:18 
GeneralRe: About Critical Section Pin
Neville Franks30-Jun-04 10:28
Neville Franks30-Jun-04 10:28 
GeneralRe: About Critical Section Pin
Paul Ranson30-Jun-04 8:02
Paul Ranson30-Jun-04 8:02 
It's a design decison, it depends how finely you want to control your locking. In principle each resource should have a CS (or other synchronisation). So in your class Test it's appropriate to have a CS in each instance of the class since the resources being protected (function and x, y, z) are unique to each instance of the class.

But be careful about copying classes that contain CRITICAL_SECTIONS, I think each instance needs a new one, not a copy of an old one, so you need to write copy constructors etc. I suggest a helper class.

Paul
GeneralRe: About Critical Section Pin
Member 66532630-Jun-04 19:26
Member 66532630-Jun-04 19:26 
GeneralLayout in C++ IElementBehaviors Pin
Andyh29-Jun-04 23:00
Andyh29-Jun-04 23:00 
GeneralSimple question on a class' static members Pin
Indrawati29-Jun-04 22:04
Indrawati29-Jun-04 22:04 
GeneralRe: Simple question on a class' static members Pin
Antony M Kancidrowski30-Jun-04 1:02
Antony M Kancidrowski30-Jun-04 1:02 
GeneralI need help!!!F1!!! Pin
Filomela29-Jun-04 21:36
Filomela29-Jun-04 21:36 
GeneralRe: I need help!!!F1!!! Pin
David Crow30-Jun-04 3:06
David Crow30-Jun-04 3:06 
GeneralRe: I need help!!!F1!!! Pin
Filomela7-Jul-04 21:45
Filomela7-Jul-04 21:45 
QuestionHow can I change bg color in SDI? Pin
johnny,Kim29-Jun-04 20:45
johnny,Kim29-Jun-04 20:45 
AnswerRe: How can I change bg color in SDI? Pin
Johan Rosengren29-Jun-04 21:09
Johan Rosengren29-Jun-04 21:09 
GeneralChange the text color of static control Pin
Anonymous29-Jun-04 20:16
Anonymous29-Jun-04 20:16 
GeneralRe: Change the text color of static control Pin
Johan Rosengren29-Jun-04 20:22
Johan Rosengren29-Jun-04 20:22 
GeneralRe: Change the text color of static control Pin
Anonymous29-Jun-04 20:36
Anonymous29-Jun-04 20:36 
GeneralRe: Change the text color of static control Pin
Johan Rosengren29-Jun-04 20:43
Johan Rosengren29-Jun-04 20:43 
GeneralProblem with Dll Pin
Member 115017629-Jun-04 19:26
Member 115017629-Jun-04 19:26 
GeneralRe: Problem with Dll Pin
RonnyS29-Jun-04 20:29
RonnyS29-Jun-04 20:29 
GeneralSingleton class Pin
Member 118395929-Jun-04 18:57
Member 118395929-Jun-04 18:57 
GeneralRe: Singleton class Pin
Member 115017629-Jun-04 19:32
Member 115017629-Jun-04 19:32 

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.