Anupam Das M.Tech
Faculty of Compter Science & Engineering Amity School of Engineering & Technology
Amity University Kolkata
Dr. Anirban Das
Ph.D., MCP, MCTS
HOD, Department of Compter Science & Engineering Amity School of Engineering & Technology
Amity University Kolkata
SCITECH PUBLICATIONS (INDIA) PVT. LTD.
www.scitechpublications.com
WINDOWS PROGRAMMING USING VISUAL C++
&
ALLIED LANGUAGES
Contents
Chapter 1
Introduction to Visual C++ ... 1.1 - 1.33
1.1 Introduction ... 1.1 1.2 Inclusions of Visual C++ ... 1.1 1.3 Installation of Visual C++ 6.0 ... 1.5 1.4 My First Visual C++ Program ... 1.14 1.4.1 Creation of New Workspace: ... 1.14 1.4.2 Opening an existing workspace ... 1.16 1.4.3 Creation of new project ... 1.16 1.4.4 Addition of new source file to a project ... 1.18 1.4.5 Menus and sub menus in VC++ ... 1.19 1.4.6 My first VC++ program ... 1.30 Summary ... 1.32 Keywords ... 1.32 Review Questions ... 1.32
Chapter 2
Working with Windows ... 2.1 - 2.12
2.1 Introduction ... 2.1 2.2 Microsoft W indows ... 2.2 2.3 Advantages of W indows over Disk Operating System (DOS) ... 2.3 2.4 How W indows Program Works? ... 2.4 2.5 W indows Message Driven Structure ... 2.5 2.6 Structure Frame of a Windows Program ... 2.8 2.6.1 Resource data ... 2.9 2.7 Compilation of a W indows Program ... 2.10 Summary ... 2.11 Keywords ... 2.12 Review Questions ... 2.12
Chapter 3
Windows Concepts and Terminology ... 3.1 - 3.12
3.3 Structure of W indows programming: Event Driven Programming ... 3.3 3.4 Messages ... 3.5 3.4.1 Message queue ... 3.5 3.5 Message Loop ... 3.6 3.6 Types of Messages ... 3.7 3.6.1 Messages defined by system ... 3.7 3.6.2 Messages defined by application ... 3.8 3.6.3 Mouse messages ... 3.9 3.6.4 Keystroke messages ... 3.9 3.6.5 Character messages ... 3.10 Summary ... 3.11 Keywords ... 3.11 Review Questions ... 3.12
Chapter 4
API & DLL
4.1 - 4.7
4.1 Introduction to API ... 4.1 4.2 API in Advantageous Role for Developers ... 4.1 4.3 Networked APIs: A Game Changer ... 4.2 4.4 Introduction to DLL ... 4.2 4.5 Advantages of DLLs ... 4.3 4.6 DLL in Programs ... 4.3 4.6.1 DLL export ... 4.3 4.6.2 Creation of DLL ... 4.4 4.6.3 Calling a DLL ... 4.5 4.7 Registering and Unregistering DLL ... 4.5 Summary ... 4.6 Keywords ... 4.6 Review Questions ... 4.6
Chapter 5
Windows Programming Experience
5.1 - 5.27
5.5 Discussions on Parameters of W inMain () Function5.6
5.6 First W indows Program ... 5.7 5.7 Creation of New W indows Class ... 5.8 5.7.1 WNDCLASS structure ... 5.9 5.7.2 Example program: Creation of new windows class ... 5.12 5.8 WndProc() Function: Message Processing Function ... 5.18 5.9 Incorporation of Resource Files in Windows ... 5.21 5.10 W indows Message Loop ... 5.22 5.11 Translate Message and Dispatch Message ... 5.22 5.12 Message Box ... 5.23 5.12.1 Types of message box ... 5.24 5.12.2 Message box modality ... 5.24 Summary ... 5.25 Keywords ... 5.26 Review Questions ... 5.26
Chapter 6
Handling Text and Graphics in Windowns
6.1 - 6.30
6.7.2 Creation of a module definition file (say, graphicoutput.def) .. 6.17 6.7.3 Creation of a resource script file (say, graphicoutput.rc) ... 6.17 6.7.4 Creation of main VC++ program (say graphicoutput.cpp) ... 6.17 6.8 Some Important Drawing Functions ... 6.23 6.8.1 MoveToEx () and LineTo() ... 6.24 6.8.2 Arc(), Chord() and Pie() ... 6.24 6.8.3 Polyline() and PloylineTo() ... 6.26 6.8.2 RoundRect() ... 6.26 6.9 WM_PAINT Message ... 6.27 Summary ... 6.28 Keywords ... 6.29 Review Questions ... 6.29
Chapter 7
Windows Controls: Child Window Controls
7.1 - 7.38
7.1 Introduction ... 7.1 7.2 W indows Controls ... 7.1 7.3.1 Static control ... 7.2 7.3.2 Button ... 7.10 7.3.3 List boxes ... 7.21 7.3.4 Combo boxes ... 7.30 Summary ... 7.37 Keywords ... 7.37 Review Questions ... 7.38
Chapter 8
Handling Mouse in Windows
8.1 - 8.13
Chapter 9
Dialog Boxes
9.1 - 9.10
9.1 Introduction ... 9.1 9.2 Working of Dialog Boxes ... 9.1 9.3 Types of Dialog Boxes ... 9.2 9.3.1 Modal dialog boxes ... 9.2 9.3.2 Modeless dialog box ... 9.2 9.3.3 System modal dialog boxes ... 9.2 9.4 Creating, Defining and Calling Simple Dialog Boxes ... 9.3 9.4.1 Creation of header file i.e. dlg_id.h ... 9.4 9.4.2 Creation of dialog box definition file i.e. dlgdef.dlg ... 9.4 9.4.3 Creation of header file i.e. dlg_main.h ... 9.5 9.4.4 Creation of resource script file i.e. dlg.rc ... 9.5 9.4.5 Creation of simple dialog box program i.e. dlg_main.cpp ... 9.5 Summary ... 9.9 Keywords ... 9.10 Review Questions ... 9.10