Click here to Skip to main content
15,909,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Difference between WIN32 Application and WIN32 Console Application wizard Pin
Alton Williams17-May-06 2:46
Alton Williams17-May-06 2:46 
AnswerRe: Difference between WIN32 Application and WIN32 Console Application wizard Pin
Sarath C17-May-06 0:20
Sarath C17-May-06 0:20 
GeneralRe: Difference between WIN32 Application and WIN32 Console Application wizard Pin
NiceNaidu17-May-06 2:49
NiceNaidu17-May-06 2:49 
AnswerRe: Difference between WIN32 Application and WIN32 Console Application wizard Pin
Alton Williams17-May-06 3:00
Alton Williams17-May-06 3:00 
QuestionRe: Difference between WIN32 Application and WIN32 Console Application wizard Pin
David Crow17-May-06 3:22
David Crow17-May-06 3:22 
QuestionOutlook _ContactItem Display() function Pin
mhammans16-May-06 23:33
mhammans16-May-06 23:33 
QuestionAccessing values from dialog window Pin
VinayCool16-May-06 23:32
VinayCool16-May-06 23:32 
AnswerRe: Accessing values from dialog window Pin
Cedric Moonen16-May-06 23:50
Cedric Moonen16-May-06 23:50 
vinaycool wrote:
UINT WorkerThreadProc(LPVOID Param)
{
CStatusDlg status;

CString loc = status.slocation + status.sfile;
--
---
}


What you are doing here is simply declaring a new instance of the CStatusDlg class (CDialog classes are still classes even if they are GUI 'components' Wink | ;) ). So, you are not accessing the data from the 'dialog' that is on the screen. I won't suggest you to pass the dialog through the thread data because it's bad to share MFC classes across thread.
What you can do is send the required data only to your thread. But I think your design is not correct: if you start your thread in OnInitDialog, the user has not entered data on your dialog so the data is not valid. Why not start your thread later, when the user has entered data and requested your thread to be started (in general, if the thread is required for processing, the user start the processing right ?)


Cédric Moonen
Software developer

Charting control
GeneralRe: Accessing values from dialog window Pin
VinayCool17-May-06 2:21
VinayCool17-May-06 2:21 
GeneralRe: Accessing values from dialog window Pin
Russell'17-May-06 3:24
Russell'17-May-06 3:24 
GeneralRe: Accessing values from dialog window Pin
VinayCool17-May-06 20:17
VinayCool17-May-06 20:17 
AnswerRe: Accessing values from dialog window Pin
VinayCool17-May-06 21:19
VinayCool17-May-06 21:19 
AnswerRe: Accessing values from dialog window Pin
David Crow17-May-06 3:25
David Crow17-May-06 3:25 
GeneralRe: Accessing values from dialog window Pin
VinayCool17-May-06 20:19
VinayCool17-May-06 20:19 
AnswerRe: Accessing values from dialog window Pin
VinayCool17-May-06 21:18
VinayCool17-May-06 21:18 
QuestionTitle for customised menu's child menu. Pin
Swati_18816-May-06 23:30
Swati_18816-May-06 23:30 
QuestionFile or Folder Pin
Anil_vvs16-May-06 23:10
Anil_vvs16-May-06 23:10 
AnswerRe: File or Folder Pin
kk.tvm16-May-06 23:12
kk.tvm16-May-06 23:12 
AnswerRe: File or Folder Pin
Mila02516-May-06 23:18
Mila02516-May-06 23:18 
AnswerRe: File or Folder Pin
Cool Ju16-May-06 23:36
Cool Ju16-May-06 23:36 
AnswerRe: File or Folder Pin
Hamid_RT17-May-06 1:03
Hamid_RT17-May-06 1:03 
QuestionDiff btwn int *p=NULL & int *p=0; ?? Pin
G Haranadh16-May-06 22:49
G Haranadh16-May-06 22:49 
AnswerRe: Diff btwn int *p=NULL & int *p=0; ?? Pin
Cedric Moonen16-May-06 22:56
Cedric Moonen16-May-06 22:56 
AnswerRe: Diff btwn int *p=NULL & int *p=0; ?? Pin
Nibu babu thomas16-May-06 23:00
Nibu babu thomas16-May-06 23:00 
AnswerRe: Diff btwn int *p=NULL & int *p=0; ?? Pin
kk.tvm16-May-06 23:08
kk.tvm16-May-06 23:08 

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.