c - 如何使用 Windows 句柄注册回调?
问题描述
我正在使用一个 C 库,它使用 Windows 回调来执行未经请求的消息传递。我不知道如何使用 Windows 句柄注册回调。
这是我尝试使用的函数的原型:
FWLIBAPI short WINAPI cnc_unsolicstart( unsigned short FlibHndl, short number, HWND hWnd, unsigned long msgno, short chkalive, short *bill );
它要求一个窗口句柄HWND hWnd
,但我不知道如何用这个句柄注册一个回调。
这是我想由库调用的 Windows 回调函数:
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {}
我怎样才能把这一切联系在一起?
解决方案
推荐阅读
- json - 如何将 Gosu 对象转换为 JSON
- python - pycel对象可以保存为Excel工作簿吗
- java - getClassLoader().getResourceAsStream(resource) 在 java 11 中返回 null
- c# - 在 C# 中调用 C++ dll 方法
- git - 无需克隆 repo 即可查看远程提交
- flutter - 如何在 Flutter 中实现可扩展的底部导航栏
- image - 我想知道是否可以保留图片的背景并删除文本
- flutter - 更改选定的选项卡图标颜色
- asp.net - 用于 vs2019 的 vb.net 外部服务器工具
- java - 显示非可读语言的 Android 工作室