• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

custom controls

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
sa9813
Asked:
sa9813
  • 2
1 Solution
 
NorbertCommented:
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
 
sa9813Author Commented:
a custom control does not have to be a active x, there are other types of custom controls..or?
0
 
NorbertCommented:
I don't know other kinds of Custom Controls.

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

0
 
3rsrichardCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now