Click here to Skip to main content
15,887,464 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionprogramming Pin
Dure-Shehwar14-Oct-06 5:42
Dure-Shehwar14-Oct-06 5:42 
AnswerRe: programming Pin
Sceptic Mole14-Oct-06 9:28
Sceptic Mole14-Oct-06 9:28 
AnswerRe: programming Pin
Mark Salsbery14-Oct-06 10:04
Mark Salsbery14-Oct-06 10:04 
AnswerRe: programming Pin
Hamid_RT14-Oct-06 19:13
Hamid_RT14-Oct-06 19:13 
Questionhook mousewheel problem Pin
Michael ZY14-Oct-06 5:24
Michael ZY14-Oct-06 5:24 
AnswerRe: hook mousewheel problem Pin
Mark Salsbery14-Oct-06 6:59
Mark Salsbery14-Oct-06 6:59 
GeneralRe: hook mousewheel problem Pin
Michael ZY14-Oct-06 14:40
Michael ZY14-Oct-06 14:40 
GeneralRe: hook mousewheel problem Pin
Mark Salsbery14-Oct-06 15:01
Mark Salsbery14-Oct-06 15:01 
I see it.

short zDelta = (short)HIWORD(wParam);

won't work. wParam is WM_MOUSEWHEEL, not the wheel delta Smile | :)

extern "C" _declspec(dllexport) LRESULT WINAPI MouseProc(int nCode,WPARAM wParam,LPARAM lParam){   
   if(nCode < 0)      
      return CallNextHookEx(g_hHook,nCode,wParam,lParam);      
   if(nCode == HC_ACTION)   
   {      
      switch(wParam)      
      {         
         case WM_MOUSEWHEEL:            
            short zDelta = (short)HIWORD(wParam);// The 'zDelta' always seem to be zero
            break;
         default:            
            return CallNextHookEx(g_hHook,nCode,wParam,lParam);      
      }   
   }
   return CallNextHookEx(g_hHook,nCode,wParam,lParam);
}



I can't find how to get the wheel delta in a hook proc LOL I'll let you know when/if I do!

Mark
GeneralRe: hook mousewheel problem Pin
Mark Salsbery14-Oct-06 15:10
Mark Salsbery14-Oct-06 15:10 
GeneralRe: hook mousewheel problem Pin
Michael ZY15-Oct-06 1:20
Michael ZY15-Oct-06 1:20 
QuestionHow to catch keyboard event before the operation system ? Pin
Yanshof14-Oct-06 5:21
Yanshof14-Oct-06 5:21 
AnswerRe: How to catch keyboard event before the operation system ? Pin
Sceptic Mole14-Oct-06 10:44
Sceptic Mole14-Oct-06 10:44 
GeneralRe: How to catch keyboard event before the operation system ? Pin
Yanshof14-Oct-06 22:49
Yanshof14-Oct-06 22:49 
AnswerRe: How to catch keyboard event before the operation system ? Pin
Diagon Alley16-Oct-06 20:34
Diagon Alley16-Oct-06 20:34 
GeneralWhy use Dll ? Pin
Yanshof16-Oct-06 21:32
Yanshof16-Oct-06 21:32 
QuestionProblem with using class wincrypt.h Pin
Yanshof14-Oct-06 1:55
Yanshof14-Oct-06 1:55 
AnswerRe: Problem with using class wincrypt.h Pin
Waldermort14-Oct-06 2:04
Waldermort14-Oct-06 2:04 
GeneralRe: Problem with using class wincrypt.h Pin
Yanshof14-Oct-06 2:19
Yanshof14-Oct-06 2:19 
GeneralRe: Problem with using class wincrypt.h Pin
Waldermort14-Oct-06 2:34
Waldermort14-Oct-06 2:34 
GeneralRe: Problem with using class wincrypt.h Pin
Yanshof14-Oct-06 2:59
Yanshof14-Oct-06 2:59 
GeneralRe: Problem with using class wincrypt.h Pin
Hamid_RT14-Oct-06 3:41
Hamid_RT14-Oct-06 3:41 
GeneralRe: Problem with using class wincrypt.h Pin
Yanshof14-Oct-06 3:46
Yanshof14-Oct-06 3:46 
GeneralRe: Problem with using class wincrypt.h Pin
Hamid_RT14-Oct-06 4:17
Hamid_RT14-Oct-06 4:17 
GeneralRe: Problem with using class wincrypt.h Pin
Yanshof14-Oct-06 4:27
Yanshof14-Oct-06 4:27 
GeneralRe: Problem with using class wincrypt.h Pin
Hamid_RT14-Oct-06 4:35
Hamid_RT14-Oct-06 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.