Skip to content

Instantly share code, notes, and snippets.

@toptensoftware
Created November 12, 2016 23:00
Show Gist options
  • Save toptensoftware/c79d83c1a160fa3efa4110c65396832b to your computer and use it in GitHub Desktop.
Save toptensoftware/c79d83c1a160fa3efa4110c65396832b to your computer and use it in GitHub Desktop.
class hwnd_copy : Postable
{
public override void To32(Machine machine, ref Win16.MSG msg16, ref Win32.MSG msg32)
{
msg32.wParam = HWND.Map.To32(msg16.wParam);
msg32.lParam = (IntPtr)(int)msg16.lParam;
}
public override void To16(Machine machine, ref Win32.MSG msg32, ref Win16.MSG msg16)
{
msg16.wParam = HWND.Map.To16(msg32.wParam);
msg16.lParam = (uint)msg32.lParam.ToInt32();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment