Example #1
0
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x1c)
            {
                bool active = m.WParam != IntPtr.Zero;
                OnActivateApp(active);
            }

            OnWndProc?.Invoke(ref m);

            if (m.Result.ToInt32() < 0)
            {
                m.Result = new IntPtr(-m.Result.ToInt32() - 1);
                return;
            }

            base.WndProc(ref m);
        }
Example #2
0
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (uint)WindowsGameHost.WindowMessage.ActivateApplication)
            {
                bool active = m.WParam != IntPtr.Zero;
                OnActivateApp(active);
            }

            OnWndProc?.Invoke(ref m);

            if (m.Result.ToInt32() < 0)
            {
                m.Result = new IntPtr(-m.Result.ToInt32() - 1);
                return;
            }

            base.WndProc(ref m);
        }
Example #3
0
 protected virtual void ProcessWndProc(WndProcEventArgs e)
 {
     OnWndProc?.Invoke(this, e);
 }
Example #4
0
 protected override void WndProc(ref Message m)
 {
     OnWndProc?.Invoke(this, m);
     base.WndProc(ref m);
 }