Interfacing Key pressed Kernel get it Signal translated
- Slides: 15
Interfacing
Key pressed Kernel get it Signal translated to ASCII Message sent to window and to Caret
Cursor vs Caret • Cursor – graphical image to indicate position • Caret – flashing object for text input
Keys messages • WM_KEYDOWN LPARAM bits Meaning 0 -15 Times a key was pressed 16 -23 Key code 29 Context code 30 Previous key state 31 Transition state • WM_KEYUP
Caret • System provides one caret per message queue (read more about message queue) • Window creates a caret only when it has the keyboard focus or is active • Only one active caret at the moment! – WM_SETFOCUS – WM_KILLFOCUS
Cursor (mouse) Mouse can send a lot of messages. In addition LPARAM and WPARAM variables stores additional information.
Mouse messages (standart) • • • WM_LBUTTONDBLCLK WM_LBUTTONDPWN WM_LBUTTONUP WM_MBUTTONDOWN WM_MBUTTONUP WM_MOUSEMOVE WM_MOUSEWHEEL WM_RBUTTONDOWN WM_BUTTONUP
LPARAM stores information about X-Y coordinates, and WPARAM – SHIFT and CTRL state. System provides support for mouse tracking, but program can interfere into mouse movement or messages sent.
Timer • Used to interrupt program’s workflow – Message queue • Though timer isn’t input device, but it can send input messages to window, thus it can be considered as one. • Native timer’s time function isn’t accurate enough to use with games or time response (Direct. X API)
How to use? • Set. Timer – create a timer • Kill. Timer – destroys a timer • WM_TIMER – message sent to window after the set time is run out
Two ways. . . • It is possible to process WM_TIMER message inside window procedure • It is possible to define feedback function Timer. Proc to process message
Timer. Proc
Timer message(s) • Timer sends only one message – WM_TIMER • Variable WPARAM keeps timers ID
- Get in get on get off get out
- Idioms in one thing by one direction
- Baseband signal and bandpass signal
- Baseband signal and bandpass signal
- Digital signal as a composite analog signal
- The product of two odd signals is:
- Sectional steel reservoirs
- Though we are hard pressed
- Pressed cookies examples
- One-verse evangelism
- Used to pick up or hold hot objects
- Pressed fiber pad chemistry
- Pressed fiber pad
- Moving and holding a hot beaker
- Get up get moving quiz
- Get up get moving quiz