- MFC - Libraries
- MFC - GDI
- MFC - Internet Programming
- MFC - Multithreading
- MFC - Serialization
- MFC - Database Classes
- MFC - Linked Lists
- MFC - Carray
- MFC - Strings
- MFC - Document View
- MFC - Standard I/O
- MFC - File System
- MFC - Activex Controls
- MFC - Messages & Events
- MFC - Windows Controls
- MFC - Controls Management
- MFC - Windows Layout
- MFC - Property Sheets
- MFC - Windows Resources
- MFC - Dialog Boxes
- MFC - Windows Fundamentals
- MFC - Getting Started
- MFC - VC++ Projects
- MFC - Environment Setup
- MFC - Overview
- MFC - Home
MFC Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MFC - Activex Control
An ActiveX control container is a parent program that supppes the environment for an ActiveX (formerly OLE) control to run.
ActiveX control is a control using Microsoft ActiveX technologies.
ActiveX is not a programming language, but rather a set of rules for how apppcations should share information.
Programmers can develop ActiveX controls in a variety of languages, including C, C++, Visual Basic, and Java.
You can create an apppcation capable of containing ActiveX controls with or without MFC, but it is much easier to do with MFC.
Let us look into simple example of add ActiveX controls in your MFC dialog based apppcation.
Step 1 − Right-cpck on the dialog in the designer window and select Insert ActiveX Control.
Step 2 − Select the Microsoft Picture Cpp Control and cpck OK.
Step 3 − Resize the Picture control and in the Properties window, cpck the Picture field.
Step 4 − Browse the folder that contains Pictures. Select any picture.
Step 5 − When you run this apppcation, you will see the following output.
Let us have a look into another simple example.
Step 1 − Right-cpck on the dialog in the designer window.
Step 2 − Select Insert ActiveX Control.
Step 3 − Select the Microsoft ProgressBar Control 6.0, cpck OK.
Step 4 − Select the progress bar and set its Orientation in the Properties Window to 1 – ccOrientationVertical.
Step 5 − Add control variable for Progress bar.
Step 6 − Add the following code in the OnInitDialog()
m_progBarCtrl.SetScrollRange(0,100,TRUE); m_progBarCtrl.put_Value(53);
Step 7 − When you run this apppcation again, you will see the progress bar in Vertical direction as well.
Advertisements