Results 1 to 5 of 5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The_USDL
    The_USDL is offline
    Senior Member The_USDL's Avatar
    Join Date
    2011 Oct
    Posts
    201
    Thanks Thanks Given 
    24
    Thanks Thanks Received 
    538
    Thanked in
    47 Posts
    Rep Power
    0
    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.

Similar Threads

  1. Xtrap
    By bhebhe in forum Aika Online
    Replies: 1
    Last Post: 2010-12-03, 09:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •