Files
lserp_cs_6.0/插件库/Lskj.Control/Commom/WindowNavigate.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

49 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace Lskj.Control.Commom
{
public static class WindowNavigate
{
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern IntPtr GetWindowDC(IntPtr hwnd);
[DllImport("User32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern int ReleaseDC(IntPtr hwnd, IntPtr hdc);
[DllImport("User32.dll", EntryPoint = "SendMessage")]
public static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
/// <summary>
/// 禁止获取焦点
/// </summary>
/// <param name="hWnd"></param>
/// <returns></returns>
[DllImport("user32", EntryPoint = "HideCaret")]
public static extern bool HideCaret(IntPtr hWnd);
public static int HIWORD(int n)
{
return (n >> 16) & 0xffff;
}
public static int HIWORD(IntPtr n)
{
return HIWORD(unchecked((int)(long)n));
}
public static int LOWORD(int n)
{
return n & 0xffff;
}
public static int LOWORD(IntPtr n)
{
return LOWORD(unchecked((int)(long)n));
}
}
}