Click here to Skip to main content
15,898,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Delay Windows shutdown Pin
Mark Salsbery15-Feb-08 6:21
Mark Salsbery15-Feb-08 6:21 
GeneralRe: Delay Windows shutdown Pin
Rajesh R Subramanian15-Feb-08 7:30
professionalRajesh R Subramanian15-Feb-08 7:30 
GeneralRe: Delay Windows shutdown Pin
JudyL_MD15-Feb-08 9:34
JudyL_MD15-Feb-08 9:34 
GeneralRe: Delay Windows shutdown Pin
RoyceF19-Feb-08 4:36
RoyceF19-Feb-08 4:36 
GeneralWH_KEYBOARD_LL Pin
codeinelogic15-Feb-08 3:38
codeinelogic15-Feb-08 3:38 
AnswerRe: WH_KEYBOARD_LL Pin
Rajesh R Subramanian15-Feb-08 3:56
professionalRajesh R Subramanian15-Feb-08 3:56 
GeneralRe: WH_KEYBOARD_LL Pin
David Crow15-Feb-08 4:10
David Crow15-Feb-08 4:10 
GeneralRe: WH_KEYBOARD_LL Pin
codeinelogic16-Feb-08 5:50
codeinelogic16-Feb-08 5:50 
defines and includes included [hehe]
<br />
#define WIN32_LEAN_AND_MEAN<br />
<br />
#define STRICT<br />
<br />
#include <windows.h><br />
<br />
HHOOK hKeyboardHook;<br />
HINSTANCE hInst;


and than the hook along with the on off function..

LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) <br />
{<br />
    PKBDLLHOOKSTRUCT k;<br />
<br />
    if (nCode == HC_ACTION) <br />
    {<br />
        k = (PKBDLLHOOKSTRUCT) lParam;<br />
<br />
        if (

here is where i will choose to disable keys
return 1;<br />
   }<br />
                    <br />
   return CallNextHookEx(hKeyboardHook, nCode, wParam, lParam);<br />
}


the turn on...

hKeyboardHook  = SetWindowsHookEx(WH_KEYBOARD_LL,<br />
                                  LowLevelKeyboardProc,<br />
                                  hInst,<br />
                                  0);

the turn off..

UnhookWindowsHookEx(hKeyboardHook);<br />
hKeyboardHook = NULL;<br />



a note: without define strict i receive an error in the lpfn parameter.
also it will compile without win23_lean_and_mean but while reading
other's articles it seemed recomended.
QuestionRe: WH_KEYBOARD_LL Pin
David Crow18-Feb-08 2:32
David Crow18-Feb-08 2:32 
GeneralRedirect the output Pin
bhat15-Feb-08 3:28
bhat15-Feb-08 3:28 
GeneralRe: Redirect the output Pin
led mike15-Feb-08 4:08
led mike15-Feb-08 4:08 
GeneralRe: Redirect the output Pin
David Crow15-Feb-08 4:09
David Crow15-Feb-08 4:09 
QuestionHow to assign/ map Left arrow key to a specific character suppose letter 'L' Pin
Abhijit D. Babar15-Feb-08 2:38
Abhijit D. Babar15-Feb-08 2:38 
AnswerRe: How to assign/ map Left arrow key to a specific character suppose letter 'L' Pin
Rajesh R Subramanian15-Feb-08 2:51
professionalRajesh R Subramanian15-Feb-08 2:51 
AnswerRe: How to assign/ map Left arrow key to a specific character suppose letter 'L' Pin
Maximilien15-Feb-08 2:57
Maximilien15-Feb-08 2:57 
GeneralRe: How to assign/ map Left arrow key to a specific character suppose letter 'L' Pin
Rajesh R Subramanian15-Feb-08 3:42
professionalRajesh R Subramanian15-Feb-08 3:42 
GeneralBackground color of CToolBar. [modified] Pin
Paresh Chitte15-Feb-08 1:24
Paresh Chitte15-Feb-08 1:24 
GeneralRecycle Bin Files and Folders Pin
john563214-Feb-08 23:30
john563214-Feb-08 23:30 
Questionmy code breaks unique pointer rule? Pin
George_George14-Feb-08 23:06
George_George14-Feb-08 23:06 
GeneralError while exporting a static member form a DLL Pin
Prasanth M V14-Feb-08 23:04
Prasanth M V14-Feb-08 23:04 
GeneralRe: Error while exporting a static member form a DLL Pin
CPallini14-Feb-08 23:23
mveCPallini14-Feb-08 23:23 
GeneralRe: Error while exporting a static member form a DLL Pin
Prasanth M V17-Feb-08 22:15
Prasanth M V17-Feb-08 22:15 
GeneralRe: Error while exporting a static member form a DLL Pin
CPallini17-Feb-08 22:35
mveCPallini17-Feb-08 22:35 
GeneralRe: Error while exporting a static member form a DLL Pin
Prasanth M V17-Feb-08 23:01
Prasanth M V17-Feb-08 23:01 
GeneralRe: Error while exporting a static member form a DLL Pin
CPallini18-Feb-08 0:53
mveCPallini18-Feb-08 0:53 

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.