Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Simple divison has GONE MAD! Pin
Phil Martin27-Apr-04 13:42
professionalPhil Martin27-Apr-04 13:42 
GeneralRe: Simple divison has GONE MAD! Pin
Selevercin27-Apr-04 14:27
Selevercin27-Apr-04 14:27 
GeneralRe: Simple divison has GONE MAD! Pin
Tim Smith27-Apr-04 14:43
Tim Smith27-Apr-04 14:43 
GeneralRe: Simple divison has GONE MAD! Pin
Paul Ranson28-Apr-04 0:54
Paul Ranson28-Apr-04 0:54 
Generaltesting for <esc> key Pin
RalfPeter27-Apr-04 11:55
RalfPeter27-Apr-04 11:55 
GeneralRe: testing for <esc> key Pin
Selevercin27-Apr-04 12:14
Selevercin27-Apr-04 12:14 
GeneralRe: testing for <esc> key Pin
Christian Graus27-Apr-04 12:21
protectorChristian Graus27-Apr-04 12:21 
GeneralRe: testing for <esc> key Pin
Christian Graus27-Apr-04 12:18
protectorChristian Graus27-Apr-04 12:18 
You need to either run your procedure in a seperate thread or use GetAsyncKeyState. To check for escape, I reckon the constant is VK_ESC, but that's a guess. This function tells you if a key was pressed since it was last called, so call it, then do something like:

if (GetAsyncKeyState(VK_ESC))
{
// finish off and go home
}

Actually, the most significant bit is set if the key is down now, and the least significant MAY be set if it has been pressed, so MSDN tells me. The above is how I always did it, and I'd say it's more efficient than bit mashing over and over inside your process.


Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
GeneralRe: testing for <esc> key Pin
jmkhael28-Apr-04 0:27
jmkhael28-Apr-04 0:27 
GeneralRe: testing for <esc> key Pin
Anonymous28-Apr-04 3:25
Anonymous28-Apr-04 3:25 
GeneralMSDN 2003, to Visual C++ 6 Pin
Dassatar27-Apr-04 11:21
Dassatar27-Apr-04 11:21 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Garth J Lancaster27-Apr-04 11:38
professionalGarth J Lancaster27-Apr-04 11:38 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Roger Wright27-Apr-04 12:49
professionalRoger Wright27-Apr-04 12:49 
GeneralRe: MSDN 2003, to Visual C++ 6 Pin
Prakash Nadar27-Apr-04 18:23
Prakash Nadar27-Apr-04 18:23 
QuestionSetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 11:01
rmnowick27-Apr-04 11:01 
AnswerRe: SetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 11:56
rmnowick27-Apr-04 11:56 
GeneralRe: SetDlgItemText from different thread ? Pin
rmnowick27-Apr-04 12:42
rmnowick27-Apr-04 12:42 
QuestionHow to get Table Names while using ADO Pin
Chauhan Chirag27-Apr-04 10:30
Chauhan Chirag27-Apr-04 10:30 
AnswerRe: How to get Table Names while using ADO Pin
John M. Drescher27-Apr-04 10:49
John M. Drescher27-Apr-04 10:49 
GeneralRe: How to get Table Names while using ADO Pin
Chauhan Chirag27-Apr-04 10:57
Chauhan Chirag27-Apr-04 10:57 
GeneralRe: How to get Table Names while using ADO Pin
John M. Drescher27-Apr-04 16:36
John M. Drescher27-Apr-04 16:36 
GeneralAccessing public variables Pin
Krugger40427-Apr-04 10:25
Krugger40427-Apr-04 10:25 
GeneralRe: Accessing public variables Pin
Joaquín M López Muñoz27-Apr-04 10:46
Joaquín M López Muñoz27-Apr-04 10:46 
GeneralRe: Accessing public variables Pin
Ravi Bhavnani27-Apr-04 11:14
professionalRavi Bhavnani27-Apr-04 11:14 
GeneralWindows Style Pin
Anthony988727-Apr-04 8:30
Anthony988727-Apr-04 8:30 

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.