Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSkin Pin
john563211-May-08 21:06
john563211-May-08 21:06 
AnswerRe: Skin Pin
Hamid_RT11-May-08 21:10
Hamid_RT11-May-08 21:10 
QuestionRe: Skin Pin
Rajesh R Subramanian11-May-08 22:53
professionalRajesh R Subramanian11-May-08 22:53 
QuestionCreateThread and AfxBeginThread Pin
tom groezer11-May-08 20:54
tom groezer11-May-08 20:54 
AnswerRe: CreateThread and AfxBeginThread Pin
Hamid_RT11-May-08 21:17
Hamid_RT11-May-08 21:17 
AnswerRe: CreateThread and AfxBeginThread Pin
CPallini11-May-08 21:20
mveCPallini11-May-08 21:20 
AnswerRe: CreateThread and AfxBeginThread Pin
ShilpiP11-May-08 22:55
ShilpiP11-May-08 22:55 
AnswerRe: CreateThread and AfxBeginThread Pin
Mark Salsbery12-May-08 6:13
Mark Salsbery12-May-08 6:13 
On Windows, all the thread creation methods eventually call ::CreateThread()
to create the thread.

The difference is, AfxBeginThread() does MFC-specific initialization on the thread.

The typical rule of thumb is:

Use AfxBeginThread() to create a thread in MFC if the thread will use any MFC objects.
Use _beginthreadex() to create a thread if no MFC objects are used but CRT functions are used (including new/delete!).
Use ::CreateThread() if just Win32 APIs/objects are used.

Also make sure you link to the multithread MFC/CRT libraries!! Smile | :)

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionRetrieve Record number ( ODBC Api) [modified] Pin
nitin311-May-08 20:16
nitin311-May-08 20:16 
QuestionHow to calculate diffrence of two dates? Pin
Le@rner11-May-08 20:08
Le@rner11-May-08 20:08 
AnswerRe: How to calculate diffrence of two dates? Pin
Mark Salsbery11-May-08 20:22
Mark Salsbery11-May-08 20:22 
GeneralRe: How to calculate diffrence of two dates? Pin
Le@rner11-May-08 20:49
Le@rner11-May-08 20:49 
GeneralRe: How to calculate diffrence of two dates? [modified] Pin
Rajkumar R11-May-08 21:03
Rajkumar R11-May-08 21:03 
GeneralRe: How to calculate diffrence of two dates? Pin
Le@rner11-May-08 21:20
Le@rner11-May-08 21:20 
QuestionRe: How to calculate diffrence of two dates? Pin
Mark Salsbery12-May-08 5:13
Mark Salsbery12-May-08 5:13 
AnswerRe: How to calculate diffrence of two dates? Pin
Le@rner12-May-08 18:13
Le@rner12-May-08 18:13 
GeneralRe: How to calculate diffrence of two dates? Pin
Mark Salsbery13-May-08 5:05
Mark Salsbery13-May-08 5:05 
GeneralRe: How to calculate diffrence of two dates? Pin
CPallini11-May-08 21:34
mveCPallini11-May-08 21:34 
QuestionHow can i Install TTF font through program using VC++ Pin
phanindra varma11-May-08 19:43
phanindra varma11-May-08 19:43 
AnswerRe: How can i Install TTF font through program using VC++ Pin
ShilpiP11-May-08 19:54
ShilpiP11-May-08 19:54 
GeneralRe: How can i Install TTF font through program using VC++ Pin
phanindra varma1-Jun-08 22:09
phanindra varma1-Jun-08 22:09 
AnswerRe: How can i Install TTF font through program using VC++ Pin
Hamid_RT11-May-08 20:05
Hamid_RT11-May-08 20:05 
GeneralRe: How can i Install TTF font through program using VC++ Pin
phanindra varma12-May-08 0:39
phanindra varma12-May-08 0:39 
QuestionHow can i Install TTF font through program Pin
phanindra varma11-May-08 19:41
phanindra varma11-May-08 19:41 
AnswerRe: How can i Install TTF font through program Pin
Sarath C11-May-08 21:11
Sarath C11-May-08 21:11 

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.