小编Neo*_*ani的帖子

试图用C#创建数学输入面板

如何在C#中创建数学输入面板?

我试图将它放入一个dll并调用它但它立即关闭.

#include <stdafx.h>
#include <atlbase.h>
#include "micaut.h"
#include "micaut_i.c"

extern "C" __declspec(dllexport) int run()
{
   CComPtr<IMathInputControl> g_spMIC; // Math Input Control
   HRESULT hr = CoInitialize(NULL);
   hr = g_spMIC.CoCreateInstance(CLSID_MathInputControl);
   hr = g_spMIC->EnableExtendedButtons(VARIANT_TRUE);
   hr = g_spMIC->Show();

   return hr;
}
Run Code Online (Sandbox Code Playgroud)

我在C#中调用了dll函数,面板弹出但立即消失.有什么建议?

c# c++ dll dllimport windows-7

4
推荐指数
1
解决办法
2276
查看次数

标签 统计

c# ×1

c++ ×1

dll ×1

dllimport ×1

windows-7 ×1