?? utiilities.cs
字號:
public struct MIXERCONTROLDETAILS_LISTTEXT
{
public int dwParam1;
public int dwParam2;
public string szName;
}
[StructLayout(LayoutKind.Sequential)]
public class MIXERCONTROLDETAILS_SIGNED
{
public int lValue;
}
[StructLayout(LayoutKind.Sequential)]
public class MIXERCONTROLDETAILS_UNSIGNED
{
public int dwValue;
}
/*
* typedef struct {
DWORD cbStruct;
DWORD dwDestination;
DWORD dwSource;
DWORD dwLineID;
DWORD fdwLine;
DWORD dwUser;
DWORD dwComponentType;
DWORD cChannels;
DWORD cConnections;
DWORD cControls;
CHAR szShortName[MIXER_SHORT_NAME_CHARS];
CHAR szName[MIXER_LONG_NAME_CHARS];
struct {
DWORD dwType;
DWORD dwDeviceID;
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
CHAR szPname[MAXPNAMELEN];
} Target;
} MIXERLINE;
*/
[StructLayout(LayoutKind.Sequential)]
public struct MIXERLINE
{
public int cbStruct;
public uint dwDestination;
public uint dwSource;
public uint dwLineID;
public int fdwLine;
public int dwUser;
public int dwComponentType;
public int cChannels;
public int cConnections;
public int cControls;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=16)]
public string szShortName;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=64)]
public string szName;
public Target tTarget;
}
[StructLayout(LayoutKind.Sequential)]
public struct Target
{
public int dwType;
public int dwDeviceID;
public short wMid;
public short wPid;
public int vDriverVersion;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]
public string szPname;
}
/*typedef struct {
DWORD cbStruct;
DWORD dwLineID;
union {
DWORD dwControlID;
DWORD dwControlType;
};
DWORD cControls;
DWORD cbmxctrl;
LPMIXERCONTROL pamxctrl;
} MIXERLINECONTROLS;
*/
[StructLayout(LayoutKind.Sequential)]
public struct MIXERLINECONTROLS
{
public int cbStruct;
public uint dwLineID;
//union
//{
// DWORD dwControlID;
// DWORD dwControlType;
//};
public int dwControlType;
public int cControls;
public int cbmxctrl;
public IntPtr pamxctrl;
}
#endregion
#region compress
/// <summary>
/// Values for dwFlags of ICOpen()
/// </summary>
public enum ICMODE
{
ICMODE_COMPRESS=1,
ICMODE_DECOMPRESS=2,
ICMODE_FASTDECOMPRESS=3,
ICMODE_QUERY=4,
ICMODE_FASTCOMPRESS=5,
ICMODE_DRAW=8
}
public class FOURCC
{
public static readonly int DIVX=FOURCC.mmioFOURCC('d','i','v','x');
public static readonly int MP42=FOURCC.mmioFOURCC('M','P','4','2');
public static readonly int streamtypeVIDEO = mmioFOURCC('v', 'i', 'd', 's');
public static readonly int streamtypeAUDIO = mmioFOURCC('a', 'u', 'd', 's');
public static readonly int streamtypeMIDI = mmioFOURCC('m', 'i', 'd', 's');
public static readonly int streamtypeTEXT = mmioFOURCC('t', 'x', 't', 's');
public static readonly int ICTYPE_VIDEO =mmioFOURCC('v', 'i', 'd', 'c');
public static readonly int ICTYPE_AUDIO =mmioFOURCC('a', 'u', 'd', 'c');
public static readonly int ICM_FRAMERATE =mmioFOURCC('F','r','m','R');
public static readonly int ICM_KEYFRAMERATE =mmioFOURCC('K','e','y','R');
public static Int32 mmioFOURCC(char ch0, char ch1, char ch2, char ch3)
{
return ((Int32)(byte)(ch0) | ((byte)(ch1) << 8) |
((byte)(ch2) << 16) | ((byte)(ch3) << 24));
}
}
/// <summary>
/// constants for the biCompression field
/// </summary>
public enum BI
{
BI_RGB ,
BI_RLE8,
BI_RLE4 ,
BI_BITFIELDS ,
BI_JPEG ,
BI_PNG ,
}
/// <summary>
/// Flags for index
/// </summary>
public enum AVIIF
{
AVIIF_LIST = 0x00000001, // chunk is a 'LIST'
AVIIF_KEYFRAME = 0x00000010, // this frame is a key frame.
AVIIF_FIRSTPART = 0x00000020, // this frame is the start of a partial frame.
AVIIF_LASTPART = 0x00000040, // this frame is the end of a partial frame.
AVIIF_MIDPART =0x00000040|0x00000020, //(AVIIF_LASTPART|AVIIF_FIRSTPART)
AVIIF_NOTIME = 0x00000100, // this frame doesn't take any time
AVIIF_COMPUSE = 0x0FFF0000 // these bits are for compressor use
}
[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]
public class ICINFO
{
public int dwSize;
public int fccType;
public int fccHandler;
public int dwFlags;
public int dwVersion;
public int dwVersionICM;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=16)]
public string szName;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=128)]
public string szDescription;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=128)]
public string szDriver;
}
[StructLayout(LayoutKind.Sequential)]
public class COMPVARS
{
public int cbSize;
public int dwFlags;
public int hic;
public int fccType;
public int fccHandler;
public IntPtr lpbiIn;
public IntPtr lpbiOut;
public int lpBitsOut;
public int lpBitsPrev;
public int lFrame;
public int lKey;
public int lDataRate;
public int lQ;
public int lKeyCount;
public int lpState;
public int cbState;
}
[System.Flags]
public enum ICDRAWFlag
{
ICDRAW_QUERY = 0x00000001, // test for support
ICDRAW_FULLSCREEN = 0x00000002, // draw to full screen
ICDRAW_HDC = 0x00000004, // draw to a HDC/HWND
ICDRAW_ANIMATE = 0x00000008, // expect palette animation
ICDRAW_CONTINUE = 0x00000010, // draw is a continuation of previous draw
ICDRAW_MEMORYDC = 0x00000020, // DC is offscreen, by the way
ICDRAW_UPDATING = 0x00000040, // We're updating, as opposed to playing
ICDRAW_RENDER = 0x00000080, // used to render data not draw it
ICDRAW_BUFFER = 0x00000100 // please buffer this data offscreen, we will need to update it
}
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
internal struct ICDRAWBEGIN
{
public ICDRAWFlag dwFlags; // flags
public IntPtr hpal; // palette to draw with
public IntPtr hwnd; // window to draw to
public IntPtr hdc; // HDC to draw to
public int xDst; // destination rectangle
public int yDst;
public int dxDst;
public int dyDst;
public IntPtr lpbi; // format of frame to draw
public int xSrc; // source rectangle
public int ySrc;
public int dxSrc;
public int dySrc;
public int dwRate; // frames/second = (dwRate/dwScale)
public int dwScale;
}
#endregion
public class SendMessageClass
{
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
int wParam,
int lParam
);
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
int wParam,
IntPtr lParam
);
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
int wParam,
StringBuilder lParam
);
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
int wParam,
string lParam
);
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
bool wParam,
string lParam
);
[DllImport("USER32.DLL")]
public static extern int SendMessage(
IntPtr hwnd,
int wMsg,
bool wParam,
int lParam
);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -