Solved

custom controls

Posted on 2000-02-20
4
217 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
ID: 2541810
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
ID: 2542610
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
ID: 2542695
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
ID: 2543891
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

910 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

25 Experts available now in Live!

Get 1:1 Help Now