Code:
BOOL WINAPI RegisterHotKey(
  __in_opt  HWND hWnd,
  __in      int id,
  __in      UINT fsModifiers,
  __in      UINT vk
);


Code:
#include "stdafx.h"

int _cdecl _tmain (
    int argc, 
    TCHAR *argv[])
{           
    if (RegisterHotKey(
        NULL,
        1,
        MOD_ALT | MOD_NOREPEAT,
        0x42))  //0x42 is 'b'
    {
        _tprintf(_T("Hotkey 'ALT+b' registered, using MOD_NOREPEAT flag\n"));
    }
 
    MSG msg = {0};
    while (GetMessage(&msg, NULL, 0, 0) != 0)
    {
        if (msg.message == WM_HOTKEY)
        {
            _tprintf(_T("WM_HOTKEY received\n"));            
        }
    } 
 
    return 0;
}


---------- Post added at 06:07 AM ---------- Previous post was at 06:07 AM ----------

Try This, if dont work, let me know.