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

C / C++ / MFC

 
GeneralThumb nail view Pin
Neelesh K J Jain12-Sep-04 23:50
Neelesh K J Jain12-Sep-04 23:50 
GeneralRe: Thumb nail view Pin
David Salter13-Sep-04 0:11
David Salter13-Sep-04 0:11 
Questionhow to use visual c++ Pin
Member 135729712-Sep-04 23:35
Member 135729712-Sep-04 23:35 
AnswerRe: how to use visual c++ Pin
Hardy_Smith12-Sep-04 23:47
Hardy_Smith12-Sep-04 23:47 
GeneralRe: how to use visual c++ Pin
Member 135729712-Sep-04 23:55
Member 135729712-Sep-04 23:55 
GeneralRe: how to use visual c++ Pin
Hardy_Smith12-Sep-04 23:59
Hardy_Smith12-Sep-04 23:59 
AnswerRe: how to use visual c++ Pin
Arsalan Malik12-Sep-04 23:57
Arsalan Malik12-Sep-04 23:57 
Generalcallback of a class' method Pin
Jerome Conus12-Sep-04 23:29
Jerome Conus12-Sep-04 23:29 
Hi !

I'm calling a function of a api to which I have to give a pointer to a callback function. Here is the typedef :

typedef int (*proc_restore_progress_callback)(restore_progress_data*)


The problem is that I want, as the callback method, to pass a method of my own class. I tried something like this :

api_set_restore_progress_callback(JSPartLoader::setRestoreProgress);*)


Here is the signature of the 'setRestoreProgress' method :

int JSPartLoader::setRestoreProgress(restore_progress_data* pProgressData);*)


But I get a compiler error :

error C2664: 'set_restore_progress_callback' : impossible to convert the parameter 1 from 'int (restore_progress_data *)' to 'proc_restore_progress_callback'

Is it possible to give a class' method as the callback function or do I have to have a global function which will be the callback function ?

Thanks for your help !
Jerome
GeneralRe: callback of a class' method Pin
Antti Keskinen13-Sep-04 2:26
Antti Keskinen13-Sep-04 2:26 
GeneralRe: callback of a class' method Pin
Jerome Conus13-Sep-04 2:36
Jerome Conus13-Sep-04 2:36 
Generalmemory leaks in mfc Pin
nnvidya12-Sep-04 22:52
nnvidya12-Sep-04 22:52 
GeneralRe: memory leaks in mfc Pin
Jon Hulatt13-Sep-04 1:42
Jon Hulatt13-Sep-04 1:42 
GeneralRe: memory leaks in mfc Pin
nnvidya13-Sep-04 1:56
nnvidya13-Sep-04 1:56 
GeneralRe: memory leaks in mfc Pin
Mike Beckerleg13-Sep-04 3:43
Mike Beckerleg13-Sep-04 3:43 
GeneralRe: memory leaks in mfc Pin
Alexander M.,13-Sep-04 5:07
Alexander M.,13-Sep-04 5:07 
GeneralRe: memory leaks in mfc Pin
Bob Stanneveld13-Sep-04 5:52
Bob Stanneveld13-Sep-04 5:52 
GeneralRe: memory leaks in mfc Pin
nnvidya14-Sep-04 1:10
nnvidya14-Sep-04 1:10 
GeneralRe: memory leaks in mfc Pin
Bob Stanneveld14-Sep-04 8:02
Bob Stanneveld14-Sep-04 8:02 
GeneralRe: memory leaks in mfc Pin
nnvidya13-Sep-04 20:39
nnvidya13-Sep-04 20:39 
GeneralRe: memory leaks in mfc Pin
nnvidya14-Sep-04 22:46
nnvidya14-Sep-04 22:46 
GeneralRe: memory leaks in mfc Pin
nnvidya15-Sep-04 20:13
nnvidya15-Sep-04 20:13 
Generalcom port settings Pin
anuchelvi12-Sep-04 22:06
anuchelvi12-Sep-04 22:06 
GeneralRe: com port settings Pin
Hardy_Smith12-Sep-04 23:44
Hardy_Smith12-Sep-04 23:44 
GeneralRe: com port settings Pin
anuchelvi13-Sep-04 1:49
anuchelvi13-Sep-04 1:49 
GeneralRe: com port settings Pin
Hardy_Smith13-Sep-04 2:35
Hardy_Smith13-Sep-04 2:35 

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.