Page 112 - DCAP408_WEB_PROGRAMMING
P. 112
Windows Programming
Notes
Example: Ernployee name and job joined together, length of the employee name, and
the numeric position of the letter A in the employee name, for all employees who are in sales.
SELECT ename, CONCAT( ename, job),
LENGTH(ename),
INSTR(ename, ‘A’)
FROM emp
WHERE SUBSTR(job, 1, 5) = ‘SALES’ ;
Ename Concat(ename,job) Length(ename) Instr(ename,'a')
Allen Allensalesman 5 1
Ward Wardsalesman 4 2
Martin Martinsalesman 6 2
Turner Turnersalesman 6 0
Self Assessment
Fill in the blanks:
2. ......................... function converts mixed case or uppercase character string lo lowercase.
3. ......................... function locates numeric position of a named character.
7.3 Keyboard Message Processing
A window obtains keyboard input as keystroke messages and character messages. Keystroke
messages handle window behavior and character messages verify the text that is exhibited in a
window.
Windows Embedded CE produces a WM_KEYDOWN or a WM_SYSKEYDOWN message when
the user presses a key. If the user holds a key down long enough to begin automatic repeat
functionality, the system produces repeated WM_KEYDOWN or WM_SYSKEYDOWN messages.
When the user releases a key, the system produces a WM_KEYUP or a WM_SYSKEYUP message.
The system creates a dissimilarity between system keystrokes and nonsystem keystrokes. System
keystrokes generate system keystroke messages, like WM_SYSKEYDOWN and WM_SYSKEYUP.
Nonsystem keystrokes generate nonsystem keystroke messages, like WM_KEYDOWN and
WM_KEYUP.
A system keystroke message is produced when the user types a key in amalgamation with the
ALT key or when the user types a key and the focus is NULL. If the focus is NULL, the keyboard
event is transported to the active window. A system keystroke message has the WM_SYS prefix
in the message name. A system keystroke message is used chiefly by the system rather than by
an application. The system uses such a message to offer its incorporated keyboard interface to
menus and to allow the user to manage which window is active. If a window procedure processes
a system keyboard message, the window procedure should pass the message to the
DefWindowProc function. Or else, all system operations that include the ALT key are disabled
whenever that window has the keyboard focus.
The window procedure of the window that has the keyboard focus obtains all keystroke messages.
Though, an application that reacts to keyboard input usually processes WM_KEYDOWN messages
only.
106 LOVELY PROFESSIONAL UNIVERSITY