Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
5Activity

Table Of Contents

Chapter 1: Operating Systems History and overview
About MS-DOS
MS-DOS Programs
Features of DOS programming
Windows History
Features of Windows Programming
Difference between MS-DOS and Windows programming
Tips
Summary
Chapter 2: Basic C Language Concepts
Random Access Memory
Pointer Definition
How to assign a value to the pointer?
Pointers Arithmetic
Example: pointers increment and decrement
Example: pointers addition and subtraction
Arrays as Pointers
Array name is a const pointer
A pointer can point to element of an array
Example: Pointer De-referencing
Example: Pointer arithmetic
Example:
Pointer Advantages
Pointer Disadvantages
What's wrong here?
Chapter 3: Arrays and Pointers
Arrays
Subscripts start at zero
Array variables as parameters
Operator Precedence
Initializing array elements
Multi-dimensional arrays
Array of C-strings
Function Pointers
Define a Function Pointer
// define a function pointer
Chapter 4: Structures and Unions
User Defined or Custom Data types
1.Structures
Declaring struct variables
Initializing Structures
Accessing the fields of a structure
Operations on structures
2.Unions
Using a Union
Example
3.Enumeration
Advantages and Disadvantages of Enumerations
4.Typedef
Advantages of typedef
What's the difference between these two declarations?
Chapter 5: Preprocessor Directives
Preprocessor
Preprocessor directives: #ifdef and #ifndef
Prevent multiple definitions in header files
Turning debugging code off and on
Some Preprocessor directives
Example: macro #defines
•#ifdef and #ifndef
The # and ## Preprocessor Operators
Standard Predefined Macros
•Macros can be used for writing clear and easily comprehensible code
Chapter 6: Bitwise Operators and Macros
Bitwise Operators
List of bitwise operators
Example -- Convert to binary with bit operators
Problems
Typedef
Macros
Macro Arguments
Typecasting
Types of Typecasting
Assertions
Assertions and error-checking
Turning assertions off
The switch and case keywords
Chapter 7: Calling Conventions, Storage classes, and Variables Scope
Calling Convention
Difference between __stdcall and __cdecl calling convention
Default Calling Convention for C programmes
Default Calling Convention for Windows Programmes
Storage Class Modifiers
1. Auto storage class
2. Register - Storage Class
Initialization
3. Static Storage Class
Storage Allocation
Block Scope Usage
File Scope Usage
4. Extern Storage Class
Scope, Initialization and Lifetime of Variable
Points to be considered:
Stack
Note
Application of Stacks
Const Access Modifier
Constant Variables
Command Line Arguments
Chapter 8: Windows Basics
Brief History of Win32
Windows Components
Kernel
GDI (Graphics Device Interface)
User
Handles in Windows
Our first Win32 Program
Chapter 9: Windows Creation and Message Handling
Multiple Instances
Window Class
Elements of a Window Class
Class Name
Window Procedure Address
Instance Handle
Class Cursor
Class Icons
Class Background Brush
Class Menu
Class Styles
Using Window Class (Example)
About Windows
Client Area
Nonclient Area
Prototype of CreateWindow
Class Name (lpClassName)
Window Name (lpWindowName)
Window Styles (dwStyle)
Bitwise Inclusive-OR Operator ‘|’
Horizontal Position of the Window (x)
Vertical Position of the Window (y)
Width of the Window (nWidth)
Height of the Window (nHeight)
Parent of the Window (hWndParent)
Menu of the Window (hMenu)
Instance Handle (hInstance)
Long Param (lpParam)
Return Value
Using Windows (Example)
Messages in Windows
Message Queuing
Message Routing
Handle to Window(hWnd)
Message Type(uMsg)
Message’s WPARAM(wParam)
Message’s LPARAM(lParam)
Getting message from Message Queue
Message Dispatching
Exercises
Chapter 10: Architecture of Standard Win32 Application
Creating Window Application
Step 1 (Registering a Window Class)
Step 2 (Creating Window)
About Messages
Windows Messages
Message Types
System-Defined Messages
Application-Defined Messages
Queued Messages
Nonqueued Messages
Message Handling
Message Loop
Window Procedure
Message Filtering
Posting and Sending Messages
Posting Messages
Sending Messages
Message Deadlocks
Broadcasting Messages
Step 3 (Fetching messages and Message Procedure)
Step 4 (WinMain Function)
Chapter 11: User Interfaces
Hierarchy of Windows
Threads
User-Interface Thread
Worker Thread
Windows
Desktop Window
Application Windows
Window Attributes
Window Name
Window Style
Extended Window Style
Position
Size
Parent or Owner Window Handle
Menu Handle or Child-Window Identifier
Application Instance Handle
Creation Data
Window Handle
Multithread Applications
Controls and Dialog Boxes
Edit Control
Static controls
Scroll Bar
Common Controls
Other user Interface Elements
Windows Messages (brief description)
WM_SYSCOMMAND
Exercise
Chapter 12: Window Classes
System classes
Styles of System Classes
Creating Button Window Class (Example)
Get and Set Window Long
Sub-Classing
The Basics
Types of Subclassing
Win32 Subclassing Rules
Instance Subclassing
Get or Set ClassLong
Difference between SetWindowLong and SetClassLong
Sub-Classing (Elaboration)
Supper-Classing
Super-Classing (Example)
New Window Procedure
Chapter 13: Graphics Device Interface
GDI Objects and its API’s
GDI objects Creation
What Happens During Selection
Memory Usage
Creating vs. Recreating
Stock Objects
Error Handling
Deletion of GDI Objects
UNREALIZEOBJECT
Special Cases
GDI from the Driver’s Perspective (for advanced users)
Device Context (DC)
Display Device Context Cache
Display Device Context Defaults
Common Display Device Context
Private Display Device Context
Class Display Device Context
Window Display Device Context
Parent Display Device Context
Window Update Lock
Accumulated Bounding Rectangle
Steps involved in output of a text string in the client area of the application
Printing Text String (Example)
GetDC
hWnd
TextOut
ReleaseDC
WM_PAINT
BeginPaint
EndPaint
WM_SIZING
CS_HREDRAW and CS_VREDRAW
Chapter 14: Painting and Drawing
Painting in a Window
DrawText
TabbedTextOut
Primitive Shapes
Lines
Rectangle
Polygon
GetStockObject Function
SelectObject
Chapter 15: Windows Management
Z-Order
Windows Review
CreateWindow
Child Windows
Notification code
WM_COMMAND Notification code
Example Application
Description
Objectives
Windows Management Functions
Windows management function - I
Windows management function - II
Window classes
Creating Main Windows
Creating Child Windows
User defined Messages
Application’s Main Window Procedure
Informing back to Main Window
Quit Application via control in Popup window
Chapter 16: Input Devices
Keyboard
Keyboard Input Model
Keyboard Focus and Activation
Keystroke Messages
System and non system keystrokes
Virtual key codes Described
Keystroke Message Flags
Character Messages
Non-system Character Messages
Dead-Character Messages
Key Status
Key Stroke and Character Translations
Hot-key Support
Languages, Locals, and Keyboard Layouts
Keyboard Messages (brief)
Key down message format
Character message format
Getting Key State
Character Message Processing
Caret
Caret Visibility
Caret Blink Time
Caret Position
Removing a Caret
Caret Functions
Mouse
Mouse Cursor
Mouse Capture
Mouse Configuration
Mouse Messages
Client Area Mouse Messages
Message Parameters
Double Click Messages
Non Client Area Mouse Messages
The WM_NCHITTEST Message
Screen and Client Area Coordinates
Chapter 17: Resources
17.1Types of windows resources
17.2Resource Definition Statements
17.3.rc files (resource files)
17.4Resource Statements in Resource File
17.5Using Resource Compiler (RC)
17.6Loading an Icon from the resource table
17.7String table in a resource file
17.8Loading String
17.9Keyboard Accelerator
17.10Defining an Accelerator
17.11Loading Accelerator Resource
17.12Translate Accelerator
17.13Translate Accelerator at Work
17.14Handling Accelerator Keys
17.14.1Windows Procedure
Chapter 18: String and Menu Resource
18.1.1Menu bar and Menus
18.1.1.1Short cut Menus
18.1.1.2The Window Menu
18.1.2Menu Handles
18.1.3State of Menu Items
18.2Menu Resource Definition Statement
18.3Loading Menu
18.4Specify default class Menu
18.5Specify Menu in CreateWindow
18.6Example Application
18.6.1Resource Definition strings
18.6.2Resource Definition Icon
18.6.3Application Menus
18.6.4Application Window Class
18.6.5CreateWindow
18.6.6Window Procedure
18.6.7Keyboard Accelerator
18.6.8Message Loop
Chapter 19: Menu and Dialogs
19.2Menu Items
Command Items and Items that Open Submenus
Menu-Item Identifier
Menu-Item Position
Default Menu Items
Selected and Clear Menu Items
Enabled, Grayed, and Disabled Menu Items
Highlighted Menu Items
Owner-Drawn Menu Items
Menu Item Separators and Line Breaks
19.3Drop Down Menus
19.4Get Sub Menu
19.5Example Application
19.5.1Popup Menu (Resource File View)
19.5.2The WM_RBUTTONDOWN message
19.5.3Structure to represent Points
19.5.4Main Window Procedure
19.5.5Set Menu Item Information
19.5.6System Menu
19.5.7System Menu Identifiers
19.6Time Differences
19.7Time Information in Windows
19.8Clock Example (Window Procedure)
19.9.1Modal Dialog Boxes
19.9.2Modeless Dialog Boxes
19.9.3Message Box Function
19.9.4Modal Loop
19.9.5Dialog Resource Template
19.9.6Creating a Modal Dialog
Chapter 20: Dialogs
20.1Dialog Box Templates
20.1.1Dialog Box Templates Styles
20.1.2Dialog Box Measurements
20.5Dialog Procedure
20.6The WM_INITDIALOG Message
20.7Using Dialog Procedure
20.8Screen Shot of About Modal Dialog
20.9Dialog Box Messages and functions
20.9.1Retrieve handle of the control
20.9.2Set Window Text
20.9.3Retrieve the identifier of the specified control
20.9.4Retrieve the text associated with the specified control in Dialog
20.9.5Sends a message to the specified control in a dialog box
20.9.6Setting or getting text associated with a window or control
20.9.7Set or retrieve current selection in an edit control
20.10Creating Modeless Dialog
20.10.1Showing Modeless Dialog
20.10.2Processing Dialog Messages
20.10.3Message Loop to dispatch messages to a modeless dialog
20.11Windows Common Dialogs
20.11.1Open File Dialog
20.11.2Choose Font Dialog
20.11.3Choose Color Dialog
20.11.4Print Dialog
Chapter 21: Using Dialogs and Windows Controls
21.1Windows Common Dialogs
21.2Dialog Units
21.3Groups and Focus
21.4Edit Control
21.4.1Edit Control Features
21.4.2Edit Control Notification Messages
21.4.3Edit Control Default Message Processing
21.5.1Button Types and Styles
Check Boxes
Group Boxes
Owner Drawn Buttons
Push Buttons
Radio Buttons
21.5.2Notification Messages from Button
21.5.3Button Default Message Processing
21.6List Box
21.6.1List Box types and styles
21.6.2Notification Messages from List Boxes
21.6.3Messages to List Boxes
21.7Example Application
21.7.1Modeless Dialogs
21.7.2Choose Color Dialogs
21.7.3About Dialogs
21.7.4Creating Windows used in Application
21.7.5Creating Dialogs
21.7.6Message Loop
21.7.7Menu Command
21.7.8Command Dialog Procedure
21.7.9Messages Used in Our Application
21.7.10The WM_CTRLCOLORSTATIC Message
Chapter 22: Using Common Dialogs and Windows controls
22.1Dialogs (Continue from the Previous Lecture)
22.2Command Dialog Procedure
22.3Choose Color Dialog
22.4Our own defined function ShowChooseColorDialog
22.5Command Dialog Procedure (Drawing)
22.6The About Box (Main Window Procedure)
22.7About Box Dialog Procedure
Chapter 23: Common Controls
23.1Overview of Windows Common Controls
23.2Common control Library
DLL Versions
23.3Common control Styles
23.4Initialize Common Controls
23.4.1InitCommonControls Function
23.4.2InitCommonControlsEx Function
23.4.2.1INITCOMMONCONTROLSEX Structure
23.5List View
23.6Today’s Goal
23.7Image List
23.8ImageList_Create Function
23.9ImageList_AddIcon Function
23.10ImageList_ReplaceIcon Function
23.11Screen Shot of an Example Application
23.12Creating List View Control
Creating Image List
23.13Windows Default Folder Icon
23.14Add Image List
23.15Add column to List View
23.16Add an Item
23.17Add Sub Item for this Item
24.4.1Multitasking
24.5Linking the Compiled Code
24.6Dynamic Link Libraries
24.7DLL Entry Point
24.8DLL Exports and DLL Imports
24.9DLL Function and calling function from in it
Chapter 25: Threads and DLL’s
25.1Import Libraries (.lib)
25.2Calling Conventions
25.3Variable Scope in DLL
25.4Resource Only DLL
25.5DLL Versions
25.6Get File Version Info
25.7.1Threads and Message Queuing
25.7.2Creating Secondary Thread
25.7.3Thread Advantages
25.7.4Thread Disadvantages
Chapter 26: Threads and Synchronization
26.1Thread’s Creation
Registered Wait Functions
Wait Functions and Synchronization Objects
Wait Functions and Creating Windows
26.5Synchronization Objects
26.5.1Mutex Object
26.6Thread Example Using Mutex Object
26.7Checking if the previous application is running
26.8Event Object
26.8.1Using Event Object (Example)
26.9Semaphore Object
26.10Thread Local Storage (TLS)
API Implementation for TLS
Compiler Implementation for TLS
Chapter 27: Network Programming Part 1
27.1Introduction
27.2Well known Protocols
27.3DNS (Domain Name Systems)
27.4Well known host names on the internet
27.5Windows Sockets
27.6Basic Sockets Operations
27.7Windows Socket Library
27.8WinSock Initialization
Chapter 28: Network Programming Part 2
28.1WinSock Server Socket Functions
Bind:
Sockaddr
gethostbyname
Connect
28.2Sending or receiving from server
Send
Recv
28.3Difference between server and client socket calls
28.6WinSock Example Application
28.7Example Application
Chapter 29: Network Programming Part 3
29.1Lecture Goal
29.2Uniform Resource Locator (URL)
29.4Web Browser
29.8Encoding and Decoding
29.9Encoding Example Escape Sequence
29.10Virtual Directory
29.11Web Browser Fetches a pages
29.12HTTP Client Request
29.13File Extension and MIME
29.14MIME Encoding
29.15HTTP Status codes
29.16HTTP Redirection
29.17HTTP Request per 1 TCP/IP Connection
29.18Server Architecture
Chapter 30: Network Programming Part 4
30.1Server Architecture
30.2HTTP Web Server Application
30.3Variable Initialization
30.4Initialize WinSock Library
30.5Win32 Error Codes
30.6HTTP Web Server Application
0 of .
Results for:
No results containing your search query
P. 1
Handouts CS410

Handouts CS410

Ratings: (0)|Views: 496 |Likes:
Published by Muhammad Wajid

More info:

Published by: Muhammad Wajid on Jan 25, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

12/12/2012

pdf

text

original

You're Reading a Free Preview
Pages 8 to 163 are not shown in this preview.
You're Reading a Free Preview
Pages 171 to 250 are not shown in this preview.
You're Reading a Free Preview
Pages 258 to 312 are not shown in this preview.
You're Reading a Free Preview
Pages 320 to 333 are not shown in this preview.
You're Reading a Free Preview
Pages 341 to 394 are not shown in this preview.

Activity (5)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
adddata liked this
aryanali17 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->