c++ logic, c# gui
c++ logic, c# gui
我必须用 C# 和 C++ 中的逻辑编写 GUI。如何在 Visual Studio 2010 中创建项目,以便之后不会有任何复杂情况(当我将链接两种语言时)。我需要扩展/插件/其他什么吗?
首先,你需要有两个项目,一个用于 c# gui,一个用于 c++ 逻辑。如前所述,它们可以放入相同的解决方案中。如果您已准备好使用托管C++则可以将逻辑放入类库中,UI 项目可以通过传统方式访问该类库。将 c++(甚至是非托管逻辑)打包到托管类接口中是很常见的。
因为已经讨论了C++托管代码中的逻辑。要调用托管代码中的非托管代码,您可以使用 PlaPlatform 调用服务 (PInvoke)。它allows managed code to call unmanaged functions that are implemented in a DLL
.例如,看看这个MSDN代码
// PInvokeTest.cs
using System;
using System.Runtime.InteropServices;
class PlatformInvokeTest
{
[DllImport("msvcrt.dll")]
public static extern int puts(string c);
[DllImport("msvcrt.dll")]
internal static extern int _flushall();
public static void Main()
{
puts("Test");
_flushall();
}
}
相关文章:
- C++GTKMM gui循环依赖关系
- QTcpSocket在不阻塞GUI的情况下重新连接到服务器
- 我的程序有一个保存配置文件的GUI,如何双击此配置文件以直接加载带有配置数据的GUI?
- 在哪里放置我的函数?进入我的母语 Gui 还是进入我的演示者?
- WM_KILLFOCUS logic
- 如何在带有 gdb GUI 前端的 ARM gdbserver 的 PC 上执行远程 gdb 会话?
- 在 Gui Win32 中创建子窗口C++
- 如何防止 std::thread 在 QT 中冻结 GUI?
- 调试控制台 ChessEngine.exe "used"在另一个应用程序(国际象棋 GUI)中
- 更改 Windows GUI 中静态文本框的字体大小
- 我不知道如何使用代码块win32 gui
- Qt GUI使用Qfiledialogbox和qlabel显示视频,这是我的代码
- QtConcurrent - 在发布到 UI 线程的数千个结果中保持 GUI 响应
- 德尔福在回调中出现 GUI 问题
- 从 GUI 文件资源管理器执行程序,并且不生成终端
- 线程和 GUI 处理
- 我应该有 2 个单独的班级,一个用于"logic",一个用于"graphic interface"?
- C++ WinAPI[GDI].自定义 gui 正确重绘
- c++ logic, c# gui
- Vala GUI and logic in C++