SendMessage() private method

private SendMessage ( IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam ) : uint
hWnd System.IntPtr
Msg int
wParam System.IntPtr
lParam System.IntPtr
return uint
        /// <summary>
        /// A few keyboard messages need to be forwarded to the inner textbox of the
        /// KryptonNumericUpDown control so that the first character pressed appears in it.
        /// </summary>
        protected override bool ProcessKeyEventArgs(ref Message m)
        {
            TextBox textBox = Controls[0] as TextBox;

            if (textBox != null)
            {
                PI.SendMessage(textBox.Handle, m.Msg, m.WParam, m.LParam);
                return(true);
            }

            return(base.ProcessKeyEventArgs(ref m));
        }
 private bool ProcessKeyboard(ref Message m)
 {
     // If focus is not inside the current popup...
     if (!_current.ContainsFocus)
     {
         // ...then redirect the message to the popup so it can process all
         // keyboard input. We just send the message on by altering the handle
         // to the current popup and then suppress processing of current message.
         PI.SendMessage(_current.Handle, m.Msg, m.WParam, m.LParam);
         return(true);
     }
     else
     {
         // Focus is inside the current popup, so let message be sent there
         return(false);
     }
 }
Beispiel #3
0
 void ForwardMessage(IWin32Window control, ref Message m)
 {
     PI.SendMessage(control.Handle, m.Msg, m.WParam, m.LParam);
 }