- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am using a call to PEEKCHARQQ in a DLL function (that's called from Delphi) inside of a DO WHILE loop to, hopefully, trap a keystroke such as ESC to end the loop, yet the call ALWAYS returns false, as if nothing is ever in the keyboard buffer. Should PEEKCHARQQ not be used inside of a DLL?
Bill
Bill
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
According to docs, PEEKCHARQQ Checks the keystroke buffer for a recent console keystroke . My reading is that it will work only for applications with console (either real or "overloaded" as in QuickWin). A better way would be to use PeekMessage(...WM_KEYDOWN), or, still better, to use synchronization objects and let the caller decide how to interrupt the calculation if necessary. See ThreadDlg sample for an illustration of the technique.
HTH
Jugoslav
HTH
Jugoslav
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Right! thanks. PeekMessage is the answer. As a Fortran "old timer" I can't get used to there not being a console all the time.
BILL
BILL
