Click here to Skip to main content
15,499,289 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread- Error Pin
_anil_30-May-06 21:53
Member_anil_30-May-06 21:53 
AnswerRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 20:22
MemberNibu babu thomas30-May-06 20:22 
GeneralRe: AfxBeginThread- Error Pin
NiceNaidu30-May-06 20:46
MemberNiceNaidu30-May-06 20:46 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 20:49
MemberNibu babu thomas30-May-06 20:49 
GeneralRe: AfxBeginThread- Error Pin
satsumatable30-May-06 21:13
Membersatsumatable30-May-06 21:13 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 21:22
MemberNibu babu thomas30-May-06 21:22 
GeneralRe: AfxBeginThread- Error Pin
satsumatable30-May-06 21:33
Membersatsumatable30-May-06 21:33 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 21:46
MemberNibu babu thomas30-May-06 21:46 
sivaprakashshanmugam wrote:
Yes it sounds Good...


Well did it work? Sniff | :^)


sivaprakashshanmugam wrote:
You mentioned that it is not safe is there anyother alternate.


No it's not at all thread safe to pass around MFC objects. Instead pass the HWND of your dialog. Then use SetDlgItemText to set the text for the item.

SetDlgItemText( hDialog, IDD_DIALOGCONTROL_ID, _T( "This is thread safe" ));
Well you cannot retrieve the strResult parameter too. To get around this store the buffer of strResult inside another pointer. Put both the handle to the dialog and the pointer to the buffer inside the struct and then pass this struct object to the thread.


Nibu thomas
A Developer

Programming tips[^]  My site[^]

QuestionProgress bar Pin
KongHL30-May-06 16:20
MemberKongHL30-May-06 16:20 
AnswerRe: Progress bar Pin
led mike30-May-06 18:15
Memberled mike30-May-06 18:15 
GeneralRe: Progress bar Pin
KongHL30-May-06 20:12
MemberKongHL30-May-06 20:12 
GeneralRe: Progress bar Pin
led mike31-May-06 5:36
Memberled mike31-May-06 5:36 
GeneralRe: Progress bar Pin
Anilkumar K V30-May-06 20:40
MemberAnilkumar K V30-May-06 20:40 
GeneralRe: Progress bar Pin
led mike31-May-06 5:43
Memberled mike31-May-06 5:43 
QuestionCan i read + write two files in 1 function? Pin
Immunity1830-May-06 13:40
MemberImmunity1830-May-06 13:40 
AnswerRe: Can i read + write two files in 1 function? Pin
led mike30-May-06 13:43
Memberled mike30-May-06 13:43 
GeneralRe: Can i read + write two files in 1 function? Pin
Jörgen Sigvardsson30-May-06 14:28
MemberJörgen Sigvardsson30-May-06 14:28 
AnswerRe: Can i read + write two files in 1 function? Pin
Christian Graus30-May-06 15:27
mveChristian Graus30-May-06 15:27 
AnswerRe: Can i read + write two files in 1 function? Pin
Nibu babu thomas30-May-06 18:22
MemberNibu babu thomas30-May-06 18:22 
AnswerRe: Can i read + write two files in 1 function? Pin
Hamid_RT30-May-06 19:32
MemberHamid_RT30-May-06 19:32 
AnswerRe: Can i read + write two files in 1 function? Pin
Immunity1831-May-06 2:21
MemberImmunity1831-May-06 2:21 
QuestionGDI+ / Antialiased polyline Pin
Andre xxxxxxx30-May-06 11:41
MemberAndre xxxxxxx30-May-06 11:41 
AnswerRe: GDI+ / Antialiased polyline Pin
PJ Arends30-May-06 13:16
professionalPJ Arends30-May-06 13:16 
QuestionFile filter Pin
Luksky30-May-06 11:39
MemberLuksky30-May-06 11:39 
AnswerRe: File filter Pin
Steve Echols30-May-06 14:54
MemberSteve Echols30-May-06 14:54 

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.