wndproc方法 [英] wndproc method

查看:110
本文介绍了wndproc方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有C#Windows应用程序,该应用程序正在处理Windows事件.我已经编写了从forms.control和重写方法wndproc继承的类.工作正常.但是我需要Java引用此应用程序.所以我通过更改项目属性中的输出类型将Windows应用程序编译为dll->应用程序标签.现在不为Windows事件调用wndproc方法.如果C#Windows应用程序反过来引用了该dll,则它就像一个符咒一样工作.但是我需要将此作为dll并在Java中引用.因此,如何解决此问题,因此会触发wndproc方法.

任何帮助,将不胜感激.

i have C# windows application , which was handling windows event . i had written class inherited from forms.control and override method wndproc. it worked fine. But i needed this application to be referenced by java. so i compiled this windows appliation into the dll by changing output type in project properties -> application tab. Now wndproc method is not called for windows event. If this same dll is inturn reference by C# windows application, it works like a charm. But i need this as dll and referenced in java. So How do i solve this problem so , wndproc method get triggered.

Any help would be appreciated.

推荐答案

如果我正确理解,您已经使用Windows Forms应用程序并将其重新构建为DLL,并希望它可以在同一DLL下运行.方法.您如何在不调用从DLL导出的某些方法的情况下运行它?
If I understand correctly you have taken a Windows Forms application and re-built it as a DLL and expect it to work in the same way. How do you get it to run without calling some method exported from the DLL?


Richard,

DLL依次在CLI/C ++包装器中引用,在该包装器中,我使函数从库中导出.因此,可以在java中访问这些函数调用.那绝对很好.但是它们是dll中触发的少数Windows键事件,需要将其传播到此CLI/C ++包装器,然后在Java中进行引用.问题这些事件不是在dll本身中触发的.我的问题是为什么?我希望这次可以清除.
Hi Richard,

dll is inturn referred at CLI/C++ wrapper , where i made function exported from library. So these function call can be accessed at java. That is working absolutely fine. But they are few windows key events triggered in dll , which need to get propagated to this CLI/C++ wrapper and then referred in java. Problem these events are not triggered in dll itself. My question is why ?I Hope i''m clear this time.


这篇关于wndproc方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆