Click here to Skip to main content
15,902,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionconfused MFC CREATING CLASS AND MESSASE HANDLE Pin
acce5511-Mar-10 14:56
acce5511-Mar-10 14:56 
AnswerRe: confused MFC CREATING CLASS AND MESSASE HANDLE Pin
chevu11-Mar-10 17:27
chevu11-Mar-10 17:27 
AnswerRe: confused MFC CREATING CLASS AND MESSASE HANDLE Pin
David Crow12-Mar-10 3:05
David Crow12-Mar-10 3:05 
Questionbuild error while compiling log4cpp using visual studio .net 2003 Pin
deardyg11-Mar-10 12:33
deardyg11-Mar-10 12:33 
AnswerRe: build error while compiling log4cpp using visual studio .net 2003 Pin
Stuart Dootson11-Mar-10 16:26
professionalStuart Dootson11-Mar-10 16:26 
QuestionHello how should i use the this pointer if it is a function param as void *this Pin
nah133711-Mar-10 11:16
nah133711-Mar-10 11:16 
AnswerRe: Hello how should i use the this pointer if it is a function param as void *this Pin
Jonathan Davies11-Mar-10 12:21
Jonathan Davies11-Mar-10 12:21 
AnswerRe: Hello how should i use the this pointer if it is a function param as void *this Pin
zhq0000111-Mar-10 14:25
zhq0000111-Mar-10 14:25 
hi

I don't understand Completely what you say,but the word "this" is the key word of C/C++. so it isn't declare as a variable. as follow,there is a example.I hope it is help for you.



#include "stdafx.h"




typedef void classfunction (void *w);
struct random_class {

char *something;
classfunction *myfunction;

};

classfunction * myclassfunction(void *w )
{
return ((struct random_class *)w)->myfunction;
}

void printfAint(void *w)
{
printf("%d\n",*(int*)w);
}

int main(int argc, char* argv[])
{
int i=10,j=20;

random_class r;
r.myfunction=printfAint;
r.myfunction(&i);
r.myfunction(&j);

return 0;
}
GeneralRe: Hello how should i use the this pointer if it is a function param as void *this Pin
Jonathan Davies12-Mar-10 0:01
Jonathan Davies12-Mar-10 0:01 
AnswerRe: Hello how should i use the this pointer if it is a function param as void *this Pin
Stephen Hewitt11-Mar-10 14:41
Stephen Hewitt11-Mar-10 14:41 
GeneralRe: Hello how should i use the this pointer if it is a function param as void *this Pin
nah133711-Mar-10 19:11
nah133711-Mar-10 19:11 
QuestionATL compiler error Pin
David Crow11-Mar-10 11:00
David Crow11-Mar-10 11:00 
AnswerRe: ATL compiler error Pin
LunaticFringe11-Mar-10 12:36
LunaticFringe11-Mar-10 12:36 
GeneralRe: ATL compiler error Pin
David Crow12-Mar-10 2:56
David Crow12-Mar-10 2:56 
GeneralRe: ATL compiler error Pin
Roger Stoltz12-Mar-10 3:53
Roger Stoltz12-Mar-10 3:53 
GeneralRe: ATL compiler error Pin
David Crow12-Mar-10 4:13
David Crow12-Mar-10 4:13 
GeneralRe: ATL compiler error Pin
Roger Stoltz12-Mar-10 5:08
Roger Stoltz12-Mar-10 5:08 
GeneralRe: ATL compiler error Pin
David Crow12-Mar-10 5:14
David Crow12-Mar-10 5:14 
GeneralRe: ATL compiler error Pin
Roger Stoltz12-Mar-10 5:43
Roger Stoltz12-Mar-10 5:43 
QuestionRe: ATL compiler error Pin
David Crow12-Mar-10 5:55
David Crow12-Mar-10 5:55 
AnswerRe: ATL compiler error Pin
Roger Stoltz12-Mar-10 8:34
Roger Stoltz12-Mar-10 8:34 
GeneralRe: ATL compiler error Pin
David Crow12-Mar-10 9:50
David Crow12-Mar-10 9:50 
GeneralRe: ATL compiler error Pin
Roger Stoltz16-Mar-10 0:34
Roger Stoltz16-Mar-10 0:34 
GeneralRe: ATL compiler error Pin
David Crow16-Mar-10 2:58
David Crow16-Mar-10 2:58 
GeneralRe: ATL compiler error Pin
Roger Stoltz16-Mar-10 4:44
Roger Stoltz16-Mar-10 4:44 

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.