Unity中调用Windows窗口句柄以及根据需求对其设置
问题背景: 现在在搞PC端应用开发,我们开发中需要调用系统的窗口以及需要最大化最小化,缩放窗口拖拽窗口,以及设置窗口位置,去边框等功能 解决根据: 使用user32.dll解决 具体功能: Unity中对Windows窗口设置 <1>.unity中调用打开文件窗口和保存窗口: 调用Comdlg32.dll中方法 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Runtime.InteropServices; 5 using System.Text; 6 using System.Threading.Tasks; 7 8 namespace Tx3d.Ventilation 9 { 10 /// <summary> 11 /// 场景窗口类型基类 12 /// </summary> 13 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 14 public class SceneWindows 15 { 16 public int structSize = 0; 17 public IntPtr dlgOwner = IntPtr.Zero; 18 public IntPtr