Click here to Skip to main content
15,881,740 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread- Error Pin
_anil_30-May-06 20:53
_anil_30-May-06 20:53 
AnswerRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 19:22
Nibu babu thomas30-May-06 19:22 
GeneralRe: AfxBeginThread- Error Pin
NiceNaidu30-May-06 19:46
NiceNaidu30-May-06 19:46 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 19:49
Nibu babu thomas30-May-06 19:49 
GeneralRe: AfxBeginThread- Error Pin
satsumatable30-May-06 20:13
satsumatable30-May-06 20:13 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 20:22
Nibu babu thomas30-May-06 20:22 
GeneralRe: AfxBeginThread- Error Pin
satsumatable30-May-06 20:33
satsumatable30-May-06 20:33 
GeneralRe: AfxBeginThread- Error Pin
Nibu babu thomas30-May-06 20:46
Nibu babu thomas30-May-06 20: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 15:20
KongHL30-May-06 15:20 
AnswerRe: Progress bar Pin
led mike30-May-06 17:15
led mike30-May-06 17:15 
GeneralRe: Progress bar Pin
KongHL30-May-06 19:12
KongHL30-May-06 19:12 
GeneralRe: Progress bar Pin
led mike31-May-06 4:36
led mike31-May-06 4:36 
GeneralRe: Progress bar Pin
Anilkumar K V30-May-06 19:40
Anilkumar K V30-May-06 19:40 
GeneralRe: Progress bar Pin
led mike31-May-06 4:43
led mike31-May-06 4:43 
QuestionCan i read + write two files in 1 function? Pin
Immunity1830-May-06 12:40
Immunity1830-May-06 12:40 
AnswerRe: Can i read + write two files in 1 function? Pin
led mike30-May-06 12:43
led mike30-May-06 12:43 
GeneralRe: Can i read + write two files in 1 function? Pin
Jörgen Sigvardsson30-May-06 13:28
Jörgen Sigvardsson30-May-06 13:28 
AnswerRe: Can i read + write two files in 1 function? Pin
Christian Graus30-May-06 14:27
protectorChristian Graus30-May-06 14:27 
AnswerRe: Can i read + write two files in 1 function? Pin
Nibu babu thomas30-May-06 17:22
Nibu babu thomas30-May-06 17:22 
AnswerRe: Can i read + write two files in 1 function? Pin
Hamid_RT30-May-06 18:32
Hamid_RT30-May-06 18:32 
AnswerRe: Can i read + write two files in 1 function? Pin
Immunity1831-May-06 1:21
Immunity1831-May-06 1:21 
QuestionGDI+ / Antialiased polyline Pin
Andre xxxxxxx30-May-06 10:41
Andre xxxxxxx30-May-06 10:41 
AnswerRe: GDI+ / Antialiased polyline Pin
PJ Arends30-May-06 12:16
professionalPJ Arends30-May-06 12:16 
QuestionFile filter Pin
Luksky30-May-06 10:39
Luksky30-May-06 10:39 
AnswerRe: File filter Pin
Steve Echols30-May-06 13:54
Steve Echols30-May-06 13: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.