/// <summary> /// Converts AtfMessage to WfMessage</summary> /// <param name="msg">AtfMessage</param> /// <returns>WfMessage</returns> public static WfMessage ToWf(AtfMessage msg) { var newMsg = new WfMessage(); newMsg.HWnd = msg.Result; newMsg.Msg = msg.Msg; newMsg.WParam = msg.WParam; newMsg.LParam = msg.LParam; newMsg.Result = msg.Result; return newMsg; }
/// <summary> /// Converts AtfMessage to WfMessage</summary> /// <param name="msg">AtfMessage</param> /// <returns>WfMessage</returns> public static WfMessage ToWf(AtfMessage msg) { var newMsg = new WfMessage(); newMsg.HWnd = msg.Result; newMsg.Msg = msg.Msg; newMsg.WParam = msg.WParam; newMsg.LParam = msg.LParam; newMsg.Result = msg.Result; return(newMsg); }
/// <summary> /// Constructor with ATF message</summary> /// <param name="msg">ATF message</param> public MessageInterop(AtfMessage msg) : this(msg.HWnd, msg.Msg, msg.WParam, msg.LParam, msg.Result) { }
/// <summary> /// Constructor with ATF message</summary> /// <param name="msg">ATF message</param> public MessageInterop(AtfMessage msg) : this(msg.HWnd, msg.Msg, msg.WParam, msg.LParam, msg.Result) { }
/// <summary> /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments, /// which allows this key press to be consumed by owning /// controls like PropertyView and PropertyGridView and be seen by ControlHostService. /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// Returning true means that this key press has been consumed by this method and this /// event is not passed on to any other methods or controls.</summary> /// <param name="msg">ATF message to process</param> /// <param name="keyData">ATF key data</param> /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// True to consume this key press, so this /// event is not passed on to any other methods or controls.</returns> protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData) { WfMessage wfMsg = MessageInterop.ToWf(msg); return(base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData))); }
/// <summary> /// Process Windows message and command key by calling ATF ProcessCmdKey with converted arguments. /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// Returning true means that this key press has been consumed by this method and this /// event is not passed on to any other methods or controls.</summary> /// <param name="msg">Windows message to process</param> /// <param name="keyData">Windows key data</param> /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// True to consume this key press, so this /// event is not passed on to any other methods or controls.</returns> protected override bool ProcessCmdKey(ref WfMessage msg, WfKeys keyData) { AtfMessage atfMsg = MessageInterop.ToAtf(msg); return(ProcessCmdKey(ref atfMsg, KeysInterop.ToAtf(keyData))); }
/// <summary> /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments, /// which allows this key press to be consumed by owning /// controls like PropertyView and PropertyGridView and be seen by ControlHostService. /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// Returning true means that this key press has been consumed by this method and this /// event is not passed on to any other methods or controls.</summary> /// <param name="msg">ATF message to process</param> /// <param name="keyData">ATF key data</param> /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc. /// True to consume this key press, so this /// event is not passed on to any other methods or controls.</returns> protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData) { WfMessage wfMsg = MessageInterop.ToWf(msg); return base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData)); }