本文整理汇总了C#中System.Windows.Forms.Msg类的典型用法代码示例。如果您正苦于以下问题:C# Msg类的具体用法?C# Msg怎么用?C# Msg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Msg类属于System.Windows.Forms命名空间,在下文中一共展示了Msg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendMessage
public static IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
{
if (_onMSNET)
return SendMessage_Win32 (hwnd, (int) message, wParam, lParam);
else
return (IntPtr) InvokeMethod ("SendMessage", new object[] { hwnd, message, wParam, lParam });
}
示例2: SendMessage
public static IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
{
Assembly assembly = Assembly.Load (Consts.AssemblySystem_Windows_Forms);
Type refType = assembly.GetType ("System.Windows.Forms.Message&");
object[] args = new object[] { Message.Create (hwnd, (int)message, wParam, lParam) };
InvokeMethod ("SendMessage", args, new Type[] { refType });
return ((Message)args[0]).Result;
}
示例3: ProcessMenuKey
void ProcessMenuKey (Msg msg_type)
{
if (TopMenu.MenuItems.Count == 0)
return;
MainMenu main_menu = TopMenu as MainMenu;
switch (msg_type) {
case Msg.WM_SYSKEYDOWN:
switch (keynav_state) {
case KeyNavState.Idle:
keynav_state = KeyNavState.Startup;
hotkey_active = true;
GrabControl.ActiveTracker = this;
CurrentMenu = TopMenu;
main_menu.Draw ();
break;
case KeyNavState.Startup:
break;
default:
Deactivate ();
main_menu.Draw ();
break;
}
break;
case Msg.WM_SYSKEYUP:
switch (keynav_state) {
case KeyNavState.Idle:
case KeyNavState.Navigating:
break;
case KeyNavState.Startup:
keynav_state = KeyNavState.NoPopups;
SelectItem (TopMenu, TopMenu.MenuItems [0], false);
break;
default:
Deactivate ();
main_menu.Draw ();
break;
}
break;
}
}
示例4: PeekMessage
private static extern bool PeekMessage( out Msg msg, IntPtr handle, uint msgFilterMin, uint msgFilterMax,
uint removeMsg );
示例5: PostMessage
// FIXME - I think this should just enqueue directly
public bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
{
XEvent xevent = new XEvent ();
X11Hwnd hwnd = (X11Hwnd)Hwnd.ObjectFromHandle(handle);
xevent.type = XEventName.ClientMessage;
xevent.ClientMessageEvent.display = display;
if (hwnd != null) {
xevent.ClientMessageEvent.window = hwnd.WholeWindow;
} else {
xevent.ClientMessageEvent.window = IntPtr.Zero;
}
xevent.ClientMessageEvent.message_type = Atoms.PostAtom;
xevent.ClientMessageEvent.format = 32;
xevent.ClientMessageEvent.ptr1 = handle;
xevent.ClientMessageEvent.ptr2 = (IntPtr) message;
xevent.ClientMessageEvent.ptr3 = wparam;
xevent.ClientMessageEvent.ptr4 = lparam;
hwnd.Queue.Enqueue (xevent);
return true;
}
示例6: Win32DefWindowProc
private extern static IntPtr Win32DefWindowProc(IntPtr hWnd, Msg Msg, IntPtr wParam, IntPtr lParam);
示例7: Win32PostMessage
private extern static bool Win32PostMessage(IntPtr hwnd, Msg msg, IntPtr wParam, IntPtr lParam);
示例8: SendParentNotify
// For WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN, WM_XBUTTONDOWN
// WM_CREATE and WM_DESTROY causes
void SendParentNotify(IntPtr child, Msg cause, int x, int y)
{
Hwnd hwnd;
if (child == IntPtr.Zero) {
return;
}
hwnd = Hwnd.GetObjectFromWindow (child);
if (hwnd == null) {
return;
}
if (hwnd.Handle == IntPtr.Zero) {
return;
}
if (ExStyleSet ((int) hwnd.initial_ex_style, WindowExStyles.WS_EX_NOPARENTNOTIFY)) {
return;
}
if (hwnd.Parent == null) {
return;
}
if (hwnd.Parent.Handle == IntPtr.Zero) {
return;
}
if (cause == Msg.WM_CREATE || cause == Msg.WM_DESTROY) {
SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), child);
} else {
SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), Control.MakeParam(x, y));
}
SendParentNotify (hwnd.Parent.Handle, cause, x, y);
}
示例9: SendMessage
internal override IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) {
return Win32SendMessage(hwnd, message, wParam, lParam);
}
示例10: WaitForHwndMessage
void WaitForHwndMessage (Hwnd hwnd, Msg message) {
WaitForHwndMessage (hwnd, message, false);
}
示例11: PostMessage
internal override bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
{
XEvent xevent = new XEvent ();
Hwnd hwnd = Hwnd.ObjectFromHandle(handle);
xevent.type = XEventName.ClientMessage;
xevent.ClientMessageEvent.display = DisplayHandle;
if (hwnd != null) {
xevent.ClientMessageEvent.window = hwnd.whole_window;
} else {
xevent.ClientMessageEvent.window = IntPtr.Zero;
}
xevent.ClientMessageEvent.message_type = (IntPtr) PostAtom;
xevent.ClientMessageEvent.format = 32;
xevent.ClientMessageEvent.ptr1 = handle;
xevent.ClientMessageEvent.ptr2 = (IntPtr) message;
xevent.ClientMessageEvent.ptr3 = wparam;
xevent.ClientMessageEvent.ptr4 = lparam;
if (hwnd != null)
hwnd.Queue.EnqueueLocked (xevent);
else
ThreadQueue(Thread.CurrentThread).EnqueueLocked (xevent);
return true;
}
示例12: PostMessage
internal override bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
{
return display.PostMessage (handle, message, wparam, lparam);
}
示例13: SendMessage
// XXX this is likely shareable amongst other backends
internal override IntPtr SendMessage (IntPtr handle, Msg message, IntPtr wParam, IntPtr lParam)
{
return display.SendMessage (handle, message, wParam, lParam);
}
示例14: SendMessage
internal static IntPtr SendMessage (IntPtr handle, Msg message, IntPtr wParam, IntPtr lParam)
{
DriverDebug ("SendMessage ({0}, {1}, {2:X}, {3:X}): Called", Window (handle), message, wParam.ToInt32 (), lParam.ToInt32 ());
return driver.SendMessage (handle, message, wParam, lParam);
}
示例15: PostMessage
internal static bool PostMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
{
DriverDebug ("PostMessage ({0}, {1}, {2:X}, {3:X}): Called", Window (hwnd), message, wParam.ToInt32 (), lParam.ToInt32 ());
return driver.PostMessage (hwnd, message, wParam, lParam);
}