Click here to Skip to main content
14,427,798 members

C / C++ / MFC

 
AnswerRe: Dot Net Version Pin
Richard Deeming26-Mar-19 3:18
communityengineerRichard Deeming26-Mar-19 3:18 
QuestionCADODatabase class: Currency parameters in SQL Pin
Don Stauffer18-Mar-19 13:31
MemberDon Stauffer18-Mar-19 13:31 
AnswerRe: CADODatabase class: Currency parameters in SQL Pin
Richard MacCutchan18-Mar-19 23:41
communityengineerRichard MacCutchan18-Mar-19 23:41 
GeneralRe: CADODatabase class: Currency parameters in SQL Pin
Don Stauffer19-Mar-19 8:26
MemberDon Stauffer19-Mar-19 8:26 
GeneralRe: CADODatabase class: Currency parameters in SQL Pin
Richard MacCutchan19-Mar-19 8:45
communityengineerRichard MacCutchan19-Mar-19 8:45 
GeneralRe: CADODatabase class: Currency parameters in SQL Pin
Don Stauffer19-Mar-19 11:54
MemberDon Stauffer19-Mar-19 11:54 
GeneralRe: CADODatabase class: Currency parameters in SQL Pin
Don Stauffer19-Mar-19 13:00
MemberDon Stauffer19-Mar-19 13:00 
QuestionClass member function as call back Pin
NoviceEx14-Mar-19 3:41
MemberNoviceEx14-Mar-19 3:41 
Maybe someone will be able to help me with this quite complex problem.
First of all I have control initialization function which requires callback

typedef int (*callback_fnc)(HWND, int, ...);
my_init_control(HWND hwnd, callback_fnc cb, int flags);


I have few classes:

Class A
{
public:
 ...
private:
 int var1;
}

Class B: public A
{
public:
 ...
 void init();
 int proc(HWND hwnd, int msg, ...); // it uses var1 and var2
 ...
private:
 int var2;
}


I need to init control and I need to use class B function proc as callback function. Tried to use it that way but it does not work that way.

void B::init()
{
  my_init_control(itemHwnd, B::proc, 0);
}


Also I have tried that way

my_init_control(itemHwnd, boost::bind(&B::proc, this), 0);


but it does not work either. Tried to google but cannot find samples close to my case.

So question is what should I need to do in order to use function
B::proc()
as callback in
B::init()
.

modified 14-Mar-19 10:37am.

AnswerRe: Class member function as call back Pin
Richard MacCutchan14-Mar-19 4:27
communityengineerRichard MacCutchan14-Mar-19 4:27 
GeneralRe: Class member function as call back Pin
NoviceEx14-Mar-19 5:01
MemberNoviceEx14-Mar-19 5:01 
GeneralRe: Class member function as call back Pin
Richard MacCutchan14-Mar-19 5:05
communityengineerRichard MacCutchan14-Mar-19 5:05 
AnswerRe: Class member function as call back Pin
CPallini14-Mar-19 5:16
mveCPallini14-Mar-19 5:16 
AnswerRe: Class member function as call back Pin
Richard MacCutchan14-Mar-19 6:00
communityengineerRichard MacCutchan14-Mar-19 6:00 
GeneralRe: Class member function as call back Pin
NoviceEx14-Mar-19 22:29
MemberNoviceEx14-Mar-19 22:29 
GeneralRe: Class member function as call back Pin
CPallini14-Mar-19 23:44
mveCPallini14-Mar-19 23:44 
GeneralRe: Class member function as call back Pin
Richard MacCutchan15-Mar-19 0:02
communityengineerRichard MacCutchan15-Mar-19 0:02 
GeneralRe: Class member function as call back Pin
CPallini15-Mar-19 2:49
mveCPallini15-Mar-19 2:49 
GeneralRe: Class member function as call back Pin
Richard MacCutchan15-Mar-19 3:57
communityengineerRichard MacCutchan15-Mar-19 3:57 
AnswerRe: Class member function as call back Pin
Stefan_Lang19-Mar-19 5:07
mveStefan_Lang19-Mar-19 5:07 
QuestionWin32++ Dialog Pin
Member 1372187514-Mar-19 2:32
MemberMember 1372187514-Mar-19 2:32 
AnswerRe: Win32++ Dialog Pin
Richard MacCutchan14-Mar-19 2:58
communityengineerRichard MacCutchan14-Mar-19 2:58 
GeneralRe: Win32++ Dialog Pin
CPallini14-Mar-19 3:30
mveCPallini14-Mar-19 3:30 
GeneralRe: Win32++ Dialog Pin
Richard MacCutchan14-Mar-19 3:35
communityengineerRichard MacCutchan14-Mar-19 3:35 
AnswerRe: Win32++ Dialog Pin
leon de boer14-Mar-19 15:34
Memberleon de boer14-Mar-19 15:34 
QuestionGet file size Pin
_Flaviu14-Mar-19 1:31
Member_Flaviu14-Mar-19 1:31 

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.