Click here to Skip to main content
15,887,364 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Parsing C files? Pin
Iain Clarke, Warrior Programmer30-Jul-07 5:38
Iain Clarke, Warrior Programmer30-Jul-07 5:38 
GeneralRe: Parsing C files? Pin
julvr230-Jul-07 6:00
julvr230-Jul-07 6:00 
GeneralRe: Parsing C files? Pin
Robert Surtees31-Jul-07 6:35
Robert Surtees31-Jul-07 6:35 
Questionneed help with thread functions Pin
alberthyc30-Jul-07 4:17
alberthyc30-Jul-07 4:17 
AnswerRe: need help with thread functions Pin
CPallini30-Jul-07 4:33
mveCPallini30-Jul-07 4:33 
GeneralRe: need help with thread functions Pin
alberthyc30-Jul-07 4:42
alberthyc30-Jul-07 4:42 
QuestionA bit generic... Pin
CPallini30-Jul-07 4:50
mveCPallini30-Jul-07 4:50 
GeneralRe: need help with thread functions Pin
julvr230-Jul-07 4:59
julvr230-Jul-07 4:59 
You're trying to access a class member from within a static function. Static member functions have no concept of an instance of a class, so you can't access a member variable of an instance which doesn't exist... make sense?

So you do need to pass in the 'this' pointer, and you need to use the this pointer to access the variable.

In your case, you call Start (which does not have a class instance), which then calls Outputdata (which is also static, and thus has no class instance). Outputdata, then tries to access m_slider, but, because you have no class instance, you're essentially trying to do NULL->m_slider, which the compiler doesn't like.

So you were on the right track in the above email, but you need to take it a step further:

Try:

CMyDlg* me=(CMYDlg*)pParam
me->Outputdata(me);

Then in outputdata:

...me->m_slider...


John

GeneralRe: need help with thread functions Pin
alberthyc30-Jul-07 6:06
alberthyc30-Jul-07 6:06 
GeneralRe: need help with thread functions Pin
led mike30-Jul-07 5:23
led mike30-Jul-07 5:23 
AnswerRe: need help with thread functions Pin
Iain Clarke, Warrior Programmer30-Jul-07 5:45
Iain Clarke, Warrior Programmer30-Jul-07 5:45 
QuestionRun an exe from MFC app Pin
koumodaki30-Jul-07 4:09
koumodaki30-Jul-07 4:09 
AnswerRe: Run an exe from MFC app Pin
Iain Clarke, Warrior Programmer30-Jul-07 4:16
Iain Clarke, Warrior Programmer30-Jul-07 4:16 
AnswerRe: Run an exe from MFC app Pin
Roberto Italy30-Jul-07 21:12
Roberto Italy30-Jul-07 21:12 
AnswerRe: Run an exe from MFC app Pin
Hamid_RT31-Jul-07 21:14
Hamid_RT31-Jul-07 21:14 
Questionpost thread message() Pin
shakumar_2230-Jul-07 3:59
shakumar_2230-Jul-07 3:59 
AnswerRe: post thread message() Pin
Iain Clarke, Warrior Programmer30-Jul-07 4:20
Iain Clarke, Warrior Programmer30-Jul-07 4:20 
GeneralRe: post thread message() Pin
shakumar_2230-Jul-07 4:38
shakumar_2230-Jul-07 4:38 
GeneralRe: post thread message() Pin
Iain Clarke, Warrior Programmer30-Jul-07 5:06
Iain Clarke, Warrior Programmer30-Jul-07 5:06 
QuestionHow to put an MFC Dialog box project into another existing project Pin
vladimir7230-Jul-07 2:29
vladimir7230-Jul-07 2:29 
AnswerRe: How to put an MFC Dialog box project into another existing project Pin
Nelek30-Jul-07 2:40
protectorNelek30-Jul-07 2:40 
GeneralRe: How to put an MFC Dialog box project into another existing project Pin
vladimir7230-Jul-07 2:51
vladimir7230-Jul-07 2:51 
GeneralRe: How to put an MFC Dialog box project into another existing project Pin
Hans Dietrich30-Jul-07 3:12
mentorHans Dietrich30-Jul-07 3:12 
AnswerRe: How to put an MFC Dialog box project into another existing project Pin
vladimir7230-Jul-07 3:58
vladimir7230-Jul-07 3:58 
GeneralRe: How to put an MFC Dialog box project into another existing project Pin
Nelek30-Jul-07 20:23
protectorNelek30-Jul-07 20:23 

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.