Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Ordinal not found Pin
JensB22-May-03 6:09
JensB22-May-03 6:09 
GeneralRe: Ordinal not found Pin
David Crow22-May-03 6:47
David Crow22-May-03 6:47 
GeneralRe: Ordinal not found Pin
David Crow22-May-03 6:50
David Crow22-May-03 6:50 
GeneralRe: Ordinal not found Pin
JensB22-May-03 6:59
JensB22-May-03 6:59 
Questionkill process by name ? Pin
bob_brown_200022-May-03 4:32
bob_brown_200022-May-03 4:32 
AnswerRe: kill process by name ? Pin
valikac22-May-03 5:08
valikac22-May-03 5:08 
GeneralRe: kill process by name ? Pin
bob_brown_200022-May-03 5:39
bob_brown_200022-May-03 5:39 
Generalmember function as callback function problem Pin
yccheok22-May-03 4:31
yccheok22-May-03 4:31 
i try to pass the following global function pointer to a c library function (cvcamSetProperty) which required the third parameter as callback function pointer.
---------------------------------------------
BOOL CXFaceRecognitionDlg::OnInitDialog()
{
//
// some code had been eliminated
//

// making call the the c library function
cvcamSetProperty(0, CVCAM_PROP_CALLBACK, callback2);
}

void callback2(IplImage* image)
{
}
---------------------------------------------

the compilation stage works fine and no problem at all.


however, when i try to pass the member function pointer, it failed Frown | :(
---------------------------------------------
BOOL CXFaceRecognitionDlg::OnInitDialog()
{
//
// some code had been eliminated
//

// making call the the c library function
cvcamSetProperty(0, CVCAM_PROP_CALLBACK, &CXFaceRecognitionDlg::callback);
}

void CXFaceRecognitionDlg::callback(IplImage* image)
{
}
---------------------------------------------
here is the error message which i obtain when i try to compile the above code:

D:\Documents and Settings\Administrator\Desktop\XFaceRecognition\XFaceRecognitionDlg.cpp(144) : error C2664: 'cvcamSetProperty' : cannot convert parameter 3 from 'void (__thiscall CXFaceRecognitionDlg::*)(struct _IplImage *)' to 'void *'
There is no context in which this conversion is possible

may i now how can i solve this problem?

thank you.

regards
yccheok
GeneralRe: member function as callback function problem Pin
AlexO22-May-03 5:00
AlexO22-May-03 5:00 
GeneralRe: member function as callback function problem Pin
csc22-May-03 5:01
csc22-May-03 5:01 
GeneralCatch WebBrowserEvents Pin
snajper22-May-03 4:18
snajper22-May-03 4:18 
GeneralRe: Catch WebBrowserEvents Pin
Joan M22-May-03 21:18
professionalJoan M22-May-03 21:18 
GeneralCustomize button in MessageBox function Pin
Piccinano22-May-03 3:29
Piccinano22-May-03 3:29 
GeneralRe: Customize button in MessageBox function Pin
AlexO22-May-03 5:09
AlexO22-May-03 5:09 
GeneralRe: Customize button in MessageBox function Pin
valikac22-May-03 5:10
valikac22-May-03 5:10 
GeneralRe: Customize button in MessageBox function Pin
David Crow22-May-03 6:54
David Crow22-May-03 6:54 
GeneralRe: Customize button in MessageBox function Pin
peterchen22-May-03 8:09
peterchen22-May-03 8:09 
QuestionConvert IP4_ADDRESS to string ? Pin
ScorpioMidget22-May-03 2:46
ScorpioMidget22-May-03 2:46 
AnswerRe: Convert IP4_ADDRESS to string ? Pin
Rage22-May-03 3:24
professionalRage22-May-03 3:24 
GeneralRe: Convert IP4_ADDRESS to string ? Pin
ScorpioMidget22-May-03 3:47
ScorpioMidget22-May-03 3:47 
AnswerRe: Convert IP4_ADDRESS to string ? Pin
David Crow22-May-03 3:26
David Crow22-May-03 3:26 
GeneralRe: Convert IP4_ADDRESS to string ? Pin
ScorpioMidget22-May-03 3:48
ScorpioMidget22-May-03 3:48 
QuestionMSComm Control exits with error? Pin
Bruce W. Brooksher22-May-03 2:45
sussBruce W. Brooksher22-May-03 2:45 
AnswerRe: MSComm Control exits with error? Pin
Trollslayer22-May-03 3:51
mentorTrollslayer22-May-03 3:51 
GeneralRe: MSComm Control exits with error? Pin
jia_wei22-May-03 19:01
jia_wei22-May-03 19:01 

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.