设置鼠标回调 - DrawGuiSetMouseCallback
函数简介
为目标对象设置鼠标事件回调函数。
接口名称
DrawGuiSetMouseCallback
DLL调用
int32_t DrawGuiSetMouseCallback(int64_t instance, int64_t handle, DrawGuiMouseCallback callback);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| handle | 长整数型 | 目标对象句柄。 |
| callback | 回调函数 | 鼠标回调函数指针。 |
示例
// 伪代码示例,具体回调签名以头文件为准
void OnMouse(int x, int y, int type) { /* ... */ }
DrawGuiSetMouseCallback(ola, obj, OnMouse);
返回值
0 失败,1 成功。
