Blue
Red
Green
Orange
Voilet
Slate
Dark

急:C++Builder中回调问题(200分)

  • 主题发起人 kelisten
  • 开始时间
K

kelisten

Unregistered / Unconfirmed
GUEST, unregistred user!
有一个DLL在不定时的发起事件,函数声明如下:
typedef int (HandlerFunc)(Event *event, void *tag);
int setHandler(char *hName, void *tag, HandlerFunc*);
所有的事件都通过 HandlerFunc进行返回。我在classA中如下进行:
int handleevent(Event *event, void *tag);//省略实现部分
class A{
void init();
}
void A::init()
{
setHandler("test", NULL, handleevent)
}
问题:如何把handleevent函数包括到一个class中(包括 A)?
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
598
import
I
D
回复
0
查看
1K
DelphiTeacher的专栏
D
顶部 底部