Solved

custom controls

Posted on 2000-02-20
4
216 Views
Last Modified: 2010-04-15
I'm using borland c++ 5.0, I guess it works something like this in vc++ to, I have noticed that I can use custom controls in the resource editor when I create dialogs. How are these controls implemented. When trying to add controls I have to add a path to a .dll so I guess they are implemented in a .dll but what I wonder is how...any good resource on the net or does someone have an easy explanation? Maybe an example?
0
Comment
Question by:sa9813
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Norbert
Comment Utility
A Custom Control is an ActiveX Control that is an OCX and an OCX is a DLL with some special functions.
For example to use such a DLL you don't need to have the .H file because all information about the functions and how to call them is inside the OCX.

Using an OCX with VC++ - I don't know BC - you don't need the path to a DLL.
Using MFC and Class wizard you only have to add a member variable to the dialog class. Class wizzard then will create a wrapper class for the DLL(OCX)

You can use the wrapper functions to call the functions inside the Control

0
 

Author Comment

by:sa9813
Comment Utility
a custom control does not have to be a active x, there are other types of custom controls..or?
0
 
LVL 3

Expert Comment

by:Norbert
Comment Utility
I don't know other kinds of Custom Controls.

There also are common controls for file,printer, color dialogs and so on.

0
 
LVL 3

Accepted Solution

by:
3rsrichard earned 50 total points
Comment Utility
A custom control implemented as an ActiveX or dll is an object.  The code in the dll provides everything needed to draw the control and to interact with it.  If you go to MS and look up information on COM, most of what you find will be explaining the workings of a control dll.

You might also look at VB sites, VB uses lots of control objects.

The objects in dll's began life in C as
object libraries, then they became OLE's, dll's, ocx's.  MS policy of a new name every year.

When your program loads a control ( a relocatable object) it gets fixed addresses.  Your program then can link to various procedures in the control, some to instance it ( make it appear) others to set its properties (color etc), some to execute its methods (procedures to perform tasks inside the object), and if the object has events (sends out interrupts) your program can provide service routines.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now