title: C++ Custom hot keys using windows hooks
body: <p>I want to make some custom hot keys where in any program I can bring up different programs with certain key combinations. I researched how to do hooks and was given this example.</p>
  
  <pre><code>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
      // Set windows hook
      HHOOK keyboardHook = SetWindowsHookEx(
          WH_KEYBOARD_LL,
          keyboardHookProc,
          hInstance,
          0);
      MessageBox(NULL, "Press OK to stop hot keys", "Information", MB_OK);
      return 0;
  }
  </code></pre>
  
  <p>Rather than a message box, as I want this to run in the background, I tried using loops but nothing I have tried successfully behaves like the messagebox. Any ideas?</p>