Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRead and write binary Pin
The ANZAC28-Aug-08 3:14
The ANZAC28-Aug-08 3:14 
AnswerRe: Read and write binary Pin
David Crow28-Aug-08 3:25
David Crow28-Aug-08 3:25 
GeneralRe: Read and write binary Pin
The ANZAC28-Aug-08 3:50
The ANZAC28-Aug-08 3:50 
GeneralRe: Read and write binary Pin
sashoalm28-Aug-08 3:56
sashoalm28-Aug-08 3:56 
GeneralRe: Read and write binary Pin
David Crow28-Aug-08 3:57
David Crow28-Aug-08 3:57 
GeneralRe: Read and write binary Pin
enhzflep28-Aug-08 4:24
enhzflep28-Aug-08 4:24 
GeneralRe: Read and write binary Pin
The ANZAC28-Aug-08 4:30
The ANZAC28-Aug-08 4:30 
QuestionMouse Right Click Pin
MsmVc28-Aug-08 2:28
MsmVc28-Aug-08 2:28 
AnswerRe: Mouse Right Click Pin
sudhir_Kumar28-Aug-08 2:50
sudhir_Kumar28-Aug-08 2:50 
GeneralRe: Mouse Right Click Pin
MsmVc28-Aug-08 2:56
MsmVc28-Aug-08 2:56 
AnswerRe: Mouse Right Click Pin
Jijo.Raj28-Aug-08 3:16
Jijo.Raj28-Aug-08 3:16 
QuestionVisual C++6 Pin
susanne128-Aug-08 2:12
susanne128-Aug-08 2:12 
AnswerRe: Visual C++6 Pin
onlyjaypatel28-Aug-08 2:19
onlyjaypatel28-Aug-08 2:19 
AnswerRe: Visual C++6 Pin
Nibu babu thomas28-Aug-08 2:46
Nibu babu thomas28-Aug-08 2:46 
AnswerRe: Visual C++6 Pin
Jijo.Raj28-Aug-08 2:51
Jijo.Raj28-Aug-08 2:51 
GeneralRe: Visual C++6 Pin
susanne128-Aug-08 3:17
susanne128-Aug-08 3:17 
QuestionRe: Visual C++6 Pin
David Crow28-Aug-08 3:27
David Crow28-Aug-08 3:27 
GeneralRe: Visual C++6 Pin
Jijo.Raj28-Aug-08 3:29
Jijo.Raj28-Aug-08 3:29 
AnswerRe: Visual C++6 Pin
super_ttd28-Aug-08 7:33
super_ttd28-Aug-08 7:33 
GeneralRe: Visual C++6 Pin
susanne128-Aug-08 21:26
susanne128-Aug-08 21:26 
GeneralRe: Visual C++6 Pin
super_ttd30-Aug-08 23:29
super_ttd30-Aug-08 23:29 
QuestionCListCTrl Hyperlink Problem Pin
Dhiraj kumar Saini28-Aug-08 2:03
Dhiraj kumar Saini28-Aug-08 2:03 
AnswerRe: CListCTrl Hyperlink Problem Pin
Nibu babu thomas28-Aug-08 2:40
Nibu babu thomas28-Aug-08 2:40 
QuestionKeyboard and Mouse State Pin
Alan Chambers28-Aug-08 1:58
Alan Chambers28-Aug-08 1:58 
Hi all

I'm wanting to retrieve the current keyboard and mouse state without having to wait for an event message.

I basically have a main thread and a window thread. The window thread handles the windows message pump so that if my app locks up, it can still process close messages etc. The main thread is where I am wanting to do the device state reads.

Everything I've looked at so far (RAWINPUT, SetWindowsHookEx) rely on an event message being posted before I am able to read the state from the device. This is no good to me.

I've also looked at GetKeyboardState(..) but that only retrieves the keyboard state in the thread that is handling the windows messages, so calling it from the main thread does not work (but calling it from the window thread does).

I'm starting to think the only way is to get access to the device driver and directly read from the device.

Anyone know any decent articles on this?

Thanks,
Alan.

"When I left you I was but the learner, now I am the master" - Darth Vader

AnswerRe: Keyboard and Mouse State Pin
Nibu babu thomas28-Aug-08 2:38
Nibu babu thomas28-Aug-08 2:38 

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.