Click here to Skip to main content
15,903,203 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Ho can I get the path of "My Documents" folder? Pin
Mila02521-Nov-06 3:08
Mila02521-Nov-06 3:08 
AnswerRe: Ho can I get the path of "My Documents" folder? Pin
ThatsAlok21-Nov-06 18:49
ThatsAlok21-Nov-06 18:49 
QuestionHigh speed drawing technology Pin
A_Fa21-Nov-06 2:31
A_Fa21-Nov-06 2:31 
AnswerRe: High speed drawing technology Pin
Mark Salsbery21-Nov-06 6:24
Mark Salsbery21-Nov-06 6:24 
GeneralRe: High speed drawing technology Pin
Steve S21-Nov-06 21:48
Steve S21-Nov-06 21:48 
GeneralRe: High speed drawing technology Pin
Mark Salsbery22-Nov-06 6:09
Mark Salsbery22-Nov-06 6:09 
AnswerRe: High speed drawing technology Pin
Mark Salsbery22-Nov-06 6:21
Mark Salsbery22-Nov-06 6:21 
Questiona problem with function pointer Pin
Alex Cutovoi21-Nov-06 2:26
Alex Cutovoi21-Nov-06 2:26 
Hi fellows

I'm developing an app that needs to use function pointer. I'm assigning one of my methods in a function pointer variable.

this is my fuction pointer variable:
<br />
unsigned int (__stdcall * ObjectEvent)(void*);<br />

This variable needs to be like this because in the header file that I use there are a typedef with the same signature of my variable and some functions of this header that uses this typedef. See:
<br />
typedef unsigned int (__stdcall *HDSchedulerCallback)(void *pUserData); <br />


This is my method signature:
<br />
unsigned int __stadcall Object3DS::ObjectCallBack(void * vData)<br />
{<br />
   MessageBox(NULL, "working", "Info", MB_OK);<br />
   return 1;<br />
}<br />

This is my code when I put the method of my class into the function poiner variable:
<br />
void Object3DS::LoadObject3DS(const char * cObjectName, bool bVisible, float fX, float fY, float fZ)<br />
{<br />
   ...<br />
   ObjectEvent = ObjectCallBack;<br />
   m_ObjectHandle = hdScheduleAsynchronous(ObjectEvent, 0, HD_DEFAULT_SCHEDULER_PRIORITY);<br />
}<br />

HD_DEFAULT_SCHEDULER_PRIORITY is just a thread priority variable.

The error that I receive is this:
<br />
error C2440: '=' : cannot convert from 'unsigned int (__stdcall Object3DS::*)(void *)' to 'unsigned int (__stdcall *)(void *)'<br />


So fellows what I have to do to solve this?? I've tried somethings but nothing solved. I haven't any idea.
AnswerRe: a problem with function pointer Pin
Cedric Moonen21-Nov-06 2:38
Cedric Moonen21-Nov-06 2:38 
GeneralRe: a problem with function pointer Pin
Alex Cutovoi21-Nov-06 4:51
Alex Cutovoi21-Nov-06 4:51 
AnswerRe: a problem with function pointer Pin
CPallini21-Nov-06 2:46
mveCPallini21-Nov-06 2:46 
GeneralRe: a problem with function pointer Pin
Alex Cutovoi21-Nov-06 4:51
Alex Cutovoi21-Nov-06 4:51 
AnswerRe: a problem with function pointer Pin
David Crow21-Nov-06 3:19
David Crow21-Nov-06 3:19 
GeneralRe: a problem with function pointer Pin
Alex Cutovoi21-Nov-06 4:50
Alex Cutovoi21-Nov-06 4:50 
Questionwhy "default Beep" windows sound is played Pin
singersinger21-Nov-06 2:11
singersinger21-Nov-06 2:11 
AnswerRe: why "default Beep" windows sound is played Pin
Viorel.21-Nov-06 2:49
Viorel.21-Nov-06 2:49 
GeneralRe: why "default Beep" windows sound is played Pin
singersinger21-Nov-06 2:59
singersinger21-Nov-06 2:59 
GeneralRe: User Feedback Pin
Waldermort21-Nov-06 2:59
Waldermort21-Nov-06 2:59 
QuestionCtreeCtrl Popupmenu Pin
harsha_123421-Nov-06 1:08
harsha_123421-Nov-06 1:08 
AnswerRe: CtreeCtrl Popupmenu Pin
Mila02521-Nov-06 1:39
Mila02521-Nov-06 1:39 
AnswerRe: CtreeCtrl Popupmenu Pin
Viorel.21-Nov-06 2:08
Viorel.21-Nov-06 2:08 
QuestionProblems with ClearCommError Pin
Demian Panello21-Nov-06 1:07
Demian Panello21-Nov-06 1:07 
QuestionAbout MCI Player Pin
Raja Bose C Leo21-Nov-06 1:06
Raja Bose C Leo21-Nov-06 1:06 
Questionquestion about MSXML ? Pin
Sakthiu21-Nov-06 0:55
Sakthiu21-Nov-06 0:55 
QuestionRe: question about MSXML ? Pin
CPallini21-Nov-06 2:26
mveCPallini21-Nov-06 2:26 

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.