COMMON CONTROLS A control is a child window that an application uses in conjunction with another window to enable user interaction. Controls are most often.

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

What is a Dialog box? A Dialog box is a window or “form” that contains other child windows or “controls” that have a specific appearances and pre-defined.
PRIMARY, SECONDARY & QUANTITATIVE RESEARCH TASK HYPERLINK APPLICATION PROCEDURE 1.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Printing and Page Formatting ITSW 1401, Intro to Word Processing Instructor: Glenda H. Easter.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Lesson 5: Using Tasks, Notes and the Journal
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Advanced User Guide to Outlook and all its features.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Introduction to Matlab & Data Analysis
In the next step you will enter some data records into the table. This can be done easily using the ‘Data Browser’. The data browser can be accessed via.
Basic User Training for PACS
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
CIS—100 Chapter 7—Headers and Footers 1. Chapter Objectives 2 After successful completion this chapter you should be able to:  Add page numbers.  Add.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA.
Lecture 7 Menu, controls, scroll bars. Menu Menu item sends WM_COMMAND message to the application window Menu is attached to window when the window is.
line.net/ okpop.com/bar elythereflashin dex.html.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
CS 281 – Fall 2010 Lab 4 Parametric Query and Forms in MS Access.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Section 10.1 Define scripting
Dive Into® Visual Basic 2010 Express
Excel Tutorial 8 Developing an Excel Application
Core LIMS Training: Project Management
Chapter 1 Managing Messages with Outlook
Working in the Forms Developer Environment
Chapter 1: An Introduction to Visual Basic 2015
Chapter 8: Writing Graphical User Interfaces
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Java Look-and-Feel Design Guidelines
Administrator Training
Mail Merge And Macros in MS WORD
Program and Graphical User Interface Design
Working with Dialogs and Controls
Understand Windows Forms Applications and Console-based Applications
Using Procedures and Exception Handling
Chap 7. Building Java Graphical User Interfaces
Repeating Program Instructions
Graphical User Interfaces -- Introduction
Exploring the Basics of Windows XP
Program and Graphical User Interface Design
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
MODULE 7 Microsoft Access 2010
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 2 – Introduction to the Visual Studio .NET IDE
Final Project Deliverables
Facebook: Getting Started
Web Development Using ASP .NET
6. WinForms 2003 C# GUI - Basics.
Guidelines for Microsoft® Office 2013
Creating Additional Input Items
Chapter 4 Enhancing the Graphical User Interface
Using Microsoft Outlook: Outlook Support Number
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2011
Chapter 8 Using Document Collaboration and Integration Tools
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

COMMON CONTROLS A control is a child window that an application uses in conjunction with another window to enable user interaction. Controls are most often used within dialog boxes, but they can also be used in other windows. Controls within dialog boxes provide the user with a way to type text, choose options, and initiate actions. Controls in other windows provide a variety of services, such as letting the user choose commands, view status, and view and edit text.

Standart controls Standart Windows Controls (user32.dll): buttons edit field listbox combobox static scrollbar We can differ controls I two part – first one is simple windows controls which were implemented by user32.dll and which we have already talk about oday. There you can see some examples of simple controls.

COMMON CONTROLS Animation Progress bar ComboboxEx Status bar Date/time picker Tab Header Toolbar Hotkey Tooltip Hyperlink Trackbar Windows 95 came with several user-interface enhancements. They make the GUI richer. Several of them were in widely used before Windows 95 hit the shelf, such as status bar, toolbars etc. But you had to code them yourself.

How to START use them TheInitCommonControlsEx() comctl32.lib #include <commctrl.h> If we want to use one of the common controls we need to add comctl32.lib to our linker settings if it is not already there. You must call InitCommonControls() function BEFORE you try and use them. The function InitCommonControls() does nothing but ensures that the library is loaded when you don't link to any other Common Controls library function (like CreateToolBar()). You will need to #include <commctrl.h> in order to use this function and to get the functions and declarations necessary for use of the Common Controls.

Controls classes ICC_ANIMATE_CLASS Load animate control class. ICC_BAR_CLASSES Load toolbar, status bar, trackbar, and tooltip control classes. ICC_COOL_CLASSES Load rebar control class. ICC_DATE_CLASSES Load date and time picker control class. ICC_HOTKEY_CLASS Load hot key control class. ICC_INTERNET_CLASSES Load IP address class. ICC_LINK_CLASS Load a hyperlink control class. ICC_LISTVIEW_CLASSES Load list-view and header control classes. ICC_NATIVEFNTCTL_CLASS Load a native font control class. ICC_PAGESCROLLER_CLASS Load pager control class. ICC_PROGRESS_CLASS Load progress bar control class. ICC_STANDARD_CLASSES Load one of the intrinsic User32 control classes. The user controls include button, edit, static, listbox, combobox, and scroll bar. ICC_TAB_CLASSES Load tab and tooltip control classes. ICC_TREEVIEW_CLASSES Load tree-view and tooltip control classes. ICC_UPDOWN_CLASS Load up-down control class. ICC_USEREX_CLASSES Load ComboBoxEx class. ICC_WIN95_CLASSES Load animate control, header, hot key, list-view, progress bar, status bar, tab, tooltip, toolbar, trackbar, tree-view, and up-down control classes. As we already know, controls are windows too. They are created using the CreateWindow() functions. Controls have their specific predefined window class names; therefore, we do not call the RegisterClassW() when we create controls. There you can see common controls classes.

Examples A progress bar is a control that is used when we process lengthy tasks. It is animated so that the user knows that our task is progressing. In our example, we have a progress bar and a button. The button starts a timer which updates the progress bar. We create a progress bar control with PROGRESS_CLASS class name and PBS_SMOOTH style. A combo box is a combination of an edit box or static text and a list. A combo box is used when we need to select an item from a list of available options. To create a combo box, we use the L"Combobox" window class. The CBS_DROPDOWN flag creates a drop-down list.

Tab control joins multiple windows with corresponding tabs Tab control joins multiple windows with corresponding tabs. We use the WC_TABCONTROL window class to create a tab control. A List Box contains a simple list from which the user can generally select one or more items. Selected items are marked. The LBS_NOTIFY flag causes the list box to send a notification code to the parent window whenever the user clicks a list box item , double-clicks an item, or cancels the selection.

Messages Types: System-Defined Messages Application-Defined Messages Before talking next about controls, I would like to remind you about messages in Windows. Windows-based applications are event-driven. They do not make explicit function calls (such as C run-time library calls) to obtain input. Instead, they wait for the system to pass input to them. Each window has a function, called a window procedure, that the system calls whenever it has input for the window. The window procedure processes the input and returns control to the system. There are two messages types: First - The system sends or posts a system-defined message when it communicates with an application. It uses these messages to control the operations of applications and to provide input and other information for applications to process. General window messages cover a wide range of information and requests, including messages for mouse and keyboard input, menu, dialog box input, window creation and so on. Second - Application can create messages to be used by its own windows or to communicate with windows in other processes. If an application creates its own messages, the window procedure that receives them must interpret the messages and provide appropriate processing.

Control messages Controls are child windows that send notification messages to the parent window when events, usually triggered by input from the user, occur in the control. The application relies on these notification messages to determine what action the user wants it to take. Each common control has its own message. For example, there is messages list available for progress bar. We can directly send messages with function SendMessage - it sends the specified message to a window. This function calls the window procedure for the specified window and does not return until the window procedure has processed the message. A handle to the window whose window procedure will receive the message. The message to be sent. Additional message-specific information. The return value specifies the result of the message processing; it depends on the message sent. In this example we set the range of the progress bar and its step.

Main Points TheInitCommonControlsEx() comctl32.lib #include <commctrl.h> Control classes Control messages To sum up, main points you should while talking about common controls are these. Yu have to have commcontrol library, the initcommoncontrolex function and include common control headear file. When creating control, you should know control class. When sending messages, you should what message

Questions?