?? nativemethods.cs
字號:
?/*
*--------------------------------------------------------
* Class Name(類名): NativMethods
* Author(創(chuàng)建者): 三角貓
* Email(電子郵件): alex_zzg@163.com
* Create Time(創(chuàng)建時間): 2008/01/15 21:27:18
* CLR Version(CLR版本): 2.0.50727.312
* Copyright (c) 三角貓 www.zu14.cn
* All Rights Reserved.
* File Memo(備注):
*--------------------------------------------------------
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace QQAutoMsg
{
/// <summary>
/// API聲明類
/// </summary>
internal static class NativeMethods
{
#region Callback Delegate Section
internal delegate bool EnumDesktopWindowsDelegate(IntPtr hWnd, uint lParam);
#endregion
#region Windows API Import Section
//[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true, CharSet = CharSet.Unicode)]
//internal static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass,
string lpszWindow);
[DllImport("user32.dll", EntryPoint = "GetWindowTextLength", SetLastError = true,
CharSet = CharSet.Unicode)]
internal static extern int GetWindowTextLength(IntPtr hWnd);
[DllImport("user32.dll", EntryPoint = "GetWindowText", CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll", EntryPoint = "GetClassName", CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern int GetClassName(IntPtr hWnd, StringBuilder buf, int nMaxCount);
[DllImport("user32.dll", EntryPoint = "EnumDesktopWindows", ExactSpelling = false,
CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool EnumDesktopWindows(IntPtr hDesktop,
EnumDesktopWindowsDelegate lpEnumCallbackFunction, IntPtr lParam);
[DllImport("user32.dll", EntryPoint = "SendMessage", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern IntPtr SendMessage(IntPtr hWnd, uint wMsg, IntPtr wParam, string lParam);
[DllImport("user32.dll", EntryPoint = "SendMessage", SetLastError = true, CharSet = CharSet.Auto)]
internal static extern IntPtr SendMessage(IntPtr hWnd, uint wMsg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", EntryPoint = "GetWindow", SetLastError = true)]
internal static extern IntPtr GetWindow(IntPtr hWnd, uint wCmd);
[DllImport("user32.dll", EntryPoint = "IsWindow", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool IsWindow(IntPtr hWnd);
#endregion
#region Windows Message Declaration Section
internal const uint BM_CLICK = 0xF5;
internal const uint GW_HWNDNEXT = 0x02;
internal const uint EM_REPLACESEL = 0xC2;
#endregion
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -