Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxBeginThread- Error Pin
_AnsHUMAN_ 30-May-06 18:22
_AnsHUMAN_ 30-May-06 18:22 
GeneralRe: AfxBeginThread- Error Pin
satsumatable30-May-06 18:38
satsumatable30-May-06 18:38 
AnswerRe: AfxBeginThread- Error Pin
Hamid_RT30-May-06 18:36
Hamid_RT30-May-06 18:36 
GeneralRe: AfxBeginThread- Error Pin
_anil_30-May-06 19:16
_anil_30-May-06 19:16 
GeneralRe: AfxBeginThread- Error Pin
Hamid_RT30-May-06 19:23
Hamid_RT30-May-06 19:23 
GeneralRe: AfxBeginThread- Error Pin
ThatsAlok30-May-06 20:30
ThatsAlok30-May-06 20:30 
GeneralRe: AfxBeginThread- Error Pin
Hamid_RT30-May-06 20:50
Hamid_RT30-May-06 20:50 
GeneralRe: AfxBeginThread- Error Pin
ThatsAlok30-May-06 20:28
ThatsAlok30-May-06 20:28 
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 

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.