Click here to Skip to main content
16,016,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Change window styles Pin
alex.barylski9-Aug-02 8:08
alex.barylski9-Aug-02 8:08 
GeneralForcing bits Pin
alex.barylski7-Aug-02 14:47
alex.barylski7-Aug-02 14:47 
GeneralRe: Forcing bits Pin
Ravi Bhavnani7-Aug-02 14:58
professionalRavi Bhavnani7-Aug-02 14:58 
GeneralRe: Forcing bits Pin
alex.barylski7-Aug-02 15:23
alex.barylski7-Aug-02 15:23 
GeneralRe: Forcing bits Pin
MSH_ILC7-Aug-02 15:14
MSH_ILC7-Aug-02 15:14 
GeneralRe: Forcing bits Pin
alex.barylski7-Aug-02 15:24
alex.barylski7-Aug-02 15:24 
GeneralRe: Forcing bits Pin
PJ Arends7-Aug-02 15:31
professionalPJ Arends7-Aug-02 15:31 
GeneralMultithreading :: MFC Pin
valikac7-Aug-02 14:33
valikac7-Aug-02 14:33 
Hi.

I am using multithread quite often now in my program when appropriate. According to Jeff Prosise, there are two simple ways of using multithreading correctly, especially worker threads.

-----
1: private HANDLE + duplicating thread handle upon instantiation

This solution make use of ::CloseThread(...)

2: private pointer to CWinThread + delete private member

This solution requires setting thread autodelete to FALSE and deleting thread manually.
-----

Right now, I am using solution #2. The reason is I would know the thread is really gone because I delete, not MFC. Nonetheless, I have seen developers use both. Jeffrey Richter uses solution #1 in his book, Programming Applications for Microsoft Windows (Dv-Mps General).

Are there advantages one solution has over the other?

Thanks,
Kuphryn
GeneralMSComm32 Pin
Frank Deo7-Aug-02 13:35
Frank Deo7-Aug-02 13:35 
GeneralTrouble w/ Multithreaded Windows Service Please Help Pin
Aisha7-Aug-02 13:29
Aisha7-Aug-02 13:29 
GeneralRe: Trouble w/ Multithreaded Windows Service Please Help Pin
Todd Smith8-Aug-02 18:39
Todd Smith8-Aug-02 18:39 
Generalabout Outlook Pin
rev7-Aug-02 13:24
rev7-Aug-02 13:24 
Generaldialog Pin
danag7-Aug-02 13:13
danag7-Aug-02 13:13 
GeneralRe: dialog Pin
Chris Losinger7-Aug-02 13:15
professionalChris Losinger7-Aug-02 13:15 
GeneralRe: dialog Pin
danag7-Aug-02 14:04
danag7-Aug-02 14:04 
GeneralRe: dialog Pin
Chris Losinger7-Aug-02 15:06
professionalChris Losinger7-Aug-02 15:06 
GeneralRe: dialog Pin
Christian Graus7-Aug-02 13:24
protectorChristian Graus7-Aug-02 13:24 
GeneralRe: dialog Pin
danag7-Aug-02 13:26
danag7-Aug-02 13:26 
GeneralRe: dialog Pin
Christian Graus7-Aug-02 13:44
protectorChristian Graus7-Aug-02 13:44 
QuestionHow to implement Global Pointers ? Pin
oRion7-Aug-02 13:06
oRion7-Aug-02 13:06 
AnswerRe: How to implement Global Pointers ? Pin
Christian Graus7-Aug-02 13:13
protectorChristian Graus7-Aug-02 13:13 
GeneralRe: How to implement Global Pointers ? Pin
Anonymous8-Aug-02 17:59
Anonymous8-Aug-02 17:59 
AnswerRe: How to implement Global Pointers ? Pin
Chris Losinger7-Aug-02 13:14
professionalChris Losinger7-Aug-02 13:14 
AnswerRe: How to implement Global Pointers ? Pin
Todd Smith8-Aug-02 18:35
Todd Smith8-Aug-02 18:35 
GeneralRe: How to implement Global Pointers ? Pin
oRion9-Aug-02 4:43
oRion9-Aug-02 4:43 

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.