简体   繁体   English

将现有的C项目转换为WPF

[英]Converting existing C project to WPF

I want to redesign the UI for a pre-existing, working C project. 我想重新设计一个现有的C项目的UI。 It's not Visual Studio, it's plain .c and .h files. 它不是Visual Studio,而是普通的.c和.h文件。 The changes I intend on making will require WPF (Windows Presentation Foundation). 我打算进行的更改将需要WPF(Windows Presentation Foundation)。

I'm wondering if this is possible, and if so, how difficult it would be. 我想知道这是否可能,如果可以,那么会有多困难。 Any links to tutorials, etc. would be fantastic. 教程等的任何链接都很棒。 I can read and write C at a novice-intermediate level, but I'm very new to Visual Studio stuff. 我可以在初级和中级水平上读写C,但是我对Visual Studio还是很陌生的。

Typically, the best approach for this type of work is to: 通常,此类工作的最佳方法是:

  1. Decouple the logic from the UI in the existing code base. 在现有代码库中将逻辑与UI分离。
  2. Make a P/Invoke (C API) or C++/CLI wrapper for the logic 为逻辑创建P / Invoke(C API)或C ++ / CLI包装器
  3. Use C# to build the WPF front end for this. 使用C#为此构建WPF前端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM