title: Java JNA Postmessage not works
body: <p>I am trying to send a keystroke to a specific window  using Postmessage, but it seems not works for me. this is my codes </p>
  
  <pre><code>import com.sun.jna.platform.win32.User32;
  import com.sun.jna.platform.win32.WinDef.HWND;
  import com.sun.jna.platform.win32.WinDef.LPARAM;
  import com.sun.jna.platform.win32.WinDef.WPARAM;
  
  
  public class keystroke {
  
     public static void main(String[] args){
  
        int WM_KEYDOWN = 0x0100;
        int WM_KEYUP = 0x0101;
        int WM_CHAR = 0x0102;
  
        int VK_A = 0x41;
  
  
        WPARAM wPARAM = new WPARAM(VK_A);
        LPARAM lPARAM = new LPARAM(0);
  
        HWND hwnd = User32.INSTANCE.FindWindow(null, "Notepad"); // window title
  
        User32.INSTANCE.ShowWindow(hwnd, 9); // SW_RESTOR
        User32.INSTANCE.SetForegroundWindow(hwnd); // bring to front
  
        User32.INSTANCE.SetFocus(hwnd);
  
        User32.INSTANCE.PostMessage(hwnd, WM_CHAR, wPARAM, lPARAM);
  
       }
  }
  </code></pre>
  
  <p>it also not works when i change to this</p>
  
  <pre><code>  User32.INSTANCE.PostMessage(hwnd, WM_KEYDOWN, wPARAM, lPARAM);
    User32.INSTANCE.PostMessage(hwnd, WM_KEYUP, wPARAM, lPARAM);
  </code></pre>