⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yaodurant.win32.misc.cs

📁 windows mobile 开发实例wi ndows mobile 开发实例
💻 CS
字号:
// YaoDurant.Win32.Misc.cs - Wrapper for various Win32 functions.
//
// Code from _Programming the .NET Compact Framework with C#_
// and _Programming the .NET Compact Framework with VB_
// (c) Copyright 2002-2004 Paul Yao and David Durant. 
// All rights reserved.

using System;
using System.Runtime.InteropServices;

// Win32 helper functions.
namespace YaoDurant.Win32
{
   public class WinFocus
   {
      [DllImport("coredll.dll")]
      public static extern IntPtr GetFocus ();

      [DllImport("coredll.dll")]
      public static extern IntPtr SetFocus (IntPtr hWnd);
   }

   public class NativeHeap
   {
      // Memory allocation functions & definitions.
      [DllImport("coredll.dll", CharSet=CharSet.Unicode)]
      public static extern IntPtr LocalAlloc (int uFlags, int uBytes);
      [DllImport("coredll.dll", CharSet=CharSet.Unicode)]
      public static extern IntPtr LocalFree (IntPtr hMem);
      public const int LPTR = 0x0040;
   }

}  // namespace

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -