Waitrud Weber’s blog

things and reminders for memories

Proposal 005

Keyboard Input works well in visual studio.
"swprintf" which can be compiled did not work.
I did not use hook but WM_CHAR in windows procedure.

 switch (message)
 {
 case WM_CHAR:
  // for debug. the below could pick up the event when I pushed keyboard on the 9th of May in 2018.
  a = 0;
  if (wParam == 0x0D || wParam == 0x08 || wParam == 0x09 || wParam == 0x1B) {
   return (DefWindowProc(hWnd, message, wParam, lParam));
  }
  //  LPSTR lpstr = const_cast<LPSTR>(m_string);

  key_w = wParam;
  key_l = lParam;


  InvalidateRect(hWnd, NULL, TRUE);
  break;
    case WM_COMMAND:
        {

Anyway, I still have problem of Hook indiviually but the abobe achive the puropose of use.

https://github.com/WaitrudWeber/source_zip/blob/master/20180510.zip