www.pudn.com > QQ2008.rar > TrafficMsg.cs


using System; 
using System.Runtime.InteropServices; 
 
namespace QQloginCont 
{ 
	///  
	/// 用于在不同的窗体中发送消息 
	///  
	public class TrafficMsg 
	{ 
		public TrafficMsg() 
		{ 
			// 
			// TODO: 在此处添加构造函数逻辑 
			// 
		} 
		///  
		/// 提供Win32的消息发送,发送后等到处理完成然后返回 
		///  
		/// 要发送消息窗体的句柄 
		/// 需要发送的指定消息 
		/// 需要发送的指定附加消息 
		/// 需要发送的指定附加消息 
		///  
		[DllImport("User32.dll",EntryPoint="SendMessage")] 
		public static extern int SendMessage(int hWnd,int Msg,int wParam,int lParam); 
		///  
		/// 提供Win32的消息发送,发送后立即返回 
		///  
		/// 要发送消息窗体的句柄 
		/// 需要发送的指定消息 
		/// 需要发送的指定附加消息 
		/// 需要发送的指定附加消息 
		///  
		[DllImport("User32.dll",EntryPoint="PostMessage")] 
		public static extern bool PostMessage(int hWnd,int Msg,int wParam,int lParam); 
	} 
}