Professional Documents
Culture Documents
SEMESTER / DEPT : V IT
UNIT - I
WINDOWS PROGRAMMING
2.What is Multitasking ?
WM_PAINT
WM_COMMAND
WM_DESTROY
WM_CREATE
6.What is the Use of WM_PAINT Message ?
The Paint Message prepares the application’s client area for updating and
obtains a display context for the Window.It repaints the client area.It is invoked
by the following conditions.
When resizing a Window
When the portion of a client area as been hidden by a menu or
Dialog box that just been closed.
When using the ScrollWindow( ) function.
When forcing a WM_PAINT message with a call to the
InvalidateRect( ) Or InvalidateRgn( ) function.
SYNTAX :
CreateWindow(class name,window name, window style , x position , y position,
Width,height , Window handle , Menu handle, Instance handle , 32 bits
information )
•UpdateWindow( ) :
The final step in displaying a window requires a call to UpdateWindow ( )
Function.
10. What is the use of WM_DESTROY Message ?
When the close option is selected by the user from an application’s system
menu, the WM_DESTROY Message is invoked.It is used to stop the application.
The PostQuitMessage( ) function is used to terminate the operations.
The graphics and text commands send to the Device context are always
the same , regardless of whether the physical output is showing up on a VGA
screen,IBM 8514 video device , printer etc.
The Part of the Windows that converts the Windows graphic function calls
to the actual commands sent to the hardware is the Graphics Device Interface
(GDI ) .
The GDI is a program file called GDI.EXE that is stored in the Windows
System Directory.The Windows environment will load GDI.EXE into memory when
it is needed for graphical output.
1.WinMain( )
2.WndProc( )
When the user use the mouse , Windows automatically moves the mouse cursor
on the Screen.The updating of the cursor position on the screen is done by low-level
logic within Windows.
The lParam data passed with WM_MOUSEMOVE contains the mouse
cursor’s Position in the client area.The low order word contains the X
position and the high order word contains the Y position.
MK_CONTROL
MK_LBUTTON
MK_RBUTTON
MK_MBUTTON
MK_SHIFT
WM_LBUTTONDOWN
WM_RBUTTONDOWN
WM_MBUTTONDOWN
WM_LBUTTONUP
WM_LBUTTONUP
WM_LBUTTONUP
IDC_ARROW
IDC_CROSS
IDC_IBEAM
IDC_ICON
21. What is Character Set ?
The Computers store and transmit letters and digits using coding systems.
Each Character is given a number code.A collection of characters, all the given
number codes are called “Character Set”.
The Virtual Key Codes are one of the ways Windows make sure that a
program written for one type of computer Keyboard will function properly on
another type. The Virtual Key codes are defined in WINDOWS.H.
The Only Key which does not have a Virtual key code is ALT Key.
**********************************************
END
***********************************************