Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "Windows.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int _cdecl _tmain(int argc, TCHAR *argv[])
- {
- for (int i = 0xB0; i <= 0xB3; i++)
- if (RegisterHotKey(NULL, 1, NULL, i))
- printf("Hotkey 0x%02X registered\n", i);
- int count = 0;
- MSG msg = { 0 };
- while (GetMessage(&msg, NULL, 0, 0)) {
- count++;
- char* name;
- char *strings[] = {
- "FORW",
- "BACK",
- "STOP",
- "PLAY",
- };
- if (msg.lParam < 0xB00000 || msg.lParam > 0xB30000)
- abort();
- name = strings[msg.lParam - 0xB00000];
- printf("==========================\n");
- printf("Count: %d\n", count);
- printf("message: 0x%02X\n", msg.message);
- printf("wParam: 0x%02X\n", msg.wParam);
- printf("lParam: 0x%02X\n", msg.lParam);
- printf("Media: %s\n", name);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement