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

C / C++ / MFC

 
Questionfile not saving properly Pin
Rakesh531-Jul-09 4:59
Rakesh531-Jul-09 4:59 
AnswerRe: file not saving properly Pin
RomanMzh31-Jul-09 5:23
RomanMzh31-Jul-09 5:23 
GeneralRe: file not saving properly Pin
Rakesh531-Jul-09 5:31
Rakesh531-Jul-09 5:31 
GeneralRe: file not saving properly Pin
RomanMzh31-Jul-09 11:44
RomanMzh31-Jul-09 11:44 
QuestionGetKeyNameText and Uppercase Pin
syntax28uk31-Jul-09 3:56
syntax28uk31-Jul-09 3:56 
AnswerRe: GetKeyNameText and Uppercase Pin
EliottA31-Jul-09 4:11
EliottA31-Jul-09 4:11 
QuestionUINT ThreadProc(LPVOID param) Pin
susanne131-Jul-09 2:49
susanne131-Jul-09 2:49 
AnswerRe: UINT ThreadProc(LPVOID param) Pin
Richard Andrew x6431-Jul-09 12:29
professionalRichard Andrew x6431-Jul-09 12:29 
Your problem stems mainly from the fact that the ThreadProc function is static, and therefore cannot access any instance members of your application class.

The easiest fix is the following:

When you call AfxBeginThread, pass the "this" pointer as your Param.

Then, inside the ThreadProc, cast the Param back to whatever object it was when you passed it originally, such as your app class or your document class.

That way, you now have access to all the instance members of your class by using the -> operator.
GeneralRe: UINT ThreadProc(LPVOID param) Pin
susanne13-Aug-09 1:11
susanne13-Aug-09 1:11 
GeneralRe: UINT ThreadProc(LPVOID param) Pin
Richard Andrew x643-Aug-09 2:24
professionalRichard Andrew x643-Aug-09 2:24 
GeneralRe: UINT ThreadProc(LPVOID param) Pin
susanne13-Aug-09 3:09
susanne13-Aug-09 3:09 
GeneralRe: UINT ThreadProc(LPVOID param) Pin
Richard Andrew x643-Aug-09 4:10
professionalRichard Andrew x643-Aug-09 4:10 
Questionsaving file in unicode format Pin
Rakesh531-Jul-09 1:47
Rakesh531-Jul-09 1:47 
AnswerRe: saving file in unicode format Pin
HimanshuJoshi31-Jul-09 2:01
HimanshuJoshi31-Jul-09 2:01 
Questionlatest version of Dr. Watson, the dump must be suitable to open ind VS 2005 Team edition Pin
ptr_Electron31-Jul-09 1:32
ptr_Electron31-Jul-09 1:32 
AnswerRe: latest version of Dr. Watson, the dump must be suitable to open ind VS 2005 Team edition Pin
Randor 31-Jul-09 15:52
professional Randor 31-Jul-09 15:52 
QuestionExcludeClipRect Pin
kumar sanghvi31-Jul-09 1:21
kumar sanghvi31-Jul-09 1:21 
AnswerRe: ExcludeClipRect Pin
CPallini31-Jul-09 1:31
mveCPallini31-Jul-09 1:31 
Questionproblem in reading characters from a file.. Pin
Rakesh531-Jul-09 1:08
Rakesh531-Jul-09 1:08 
AnswerRe: problem in reading characters from a file.. Pin
Rajesh R Subramanian31-Jul-09 6:48
professionalRajesh R Subramanian31-Jul-09 6:48 
AnswerRe: problem in reading characters from a file.. Pin
Bacon Ultimate Cheeseburger1-Aug-09 1:10
Bacon Ultimate Cheeseburger1-Aug-09 1:10 
QuestionAdding VBA user interface to MFC application Pin
ulretsam31-Jul-09 0:58
ulretsam31-Jul-09 0:58 
AnswerRe: Adding VBA user interface to MFC application Pin
Randor 31-Jul-09 16:00
professional Randor 31-Jul-09 16:00 
Questiondisplay 256 color bitmap image Pin
adichavan31-Jul-09 0:42
adichavan31-Jul-09 0:42 
AnswerRe: display 256 color bitmap image Pin
Adam Roderick J31-Jul-09 0:45
Adam Roderick J31-Jul-09 0:45 

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.