Pelles C forum

C language => User contributions => Topic started by: nitex on April 18, 2005, 09:50:01 PM

Title: Hyperlink Custom control.
Post by: nitex on April 18, 2005, 09:50:01 PM
This is my new hyperlink custom control, which can be used directly from the dialog editor.

Copy the compiled hyperlink.dll somewhere into Pelles C folder.

Open the dialog editor and select from the dialog menu, open custom control and choose the hyperlink.dll.

To use it in your projects call either:

LoadLibrary(_T("hyperlink.dll"));

in your startup code. The hyperlink.dll needs to be in your projects folder and redistributed with your setup.

Or copy hyperlink.h and hyperlink.c into your projects folder, include hyperlink.h and call:

Hyperlink_RegisterClass();

in your startup code. No DLL needs to be redistributed.

Have a look at hyperlink.h for the supported functions.


Greets, Alex
Title: Hyperlink Custom control.
Post by: Anonymous on April 18, 2005, 10:13:06 PM
very interesting...(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/forum-mycostatin-mycostatin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/cheapest-flagyl-online-flagyl-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/prilosec-cheap-prilosec-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/buy-tenuate-no-prescription-tenuate-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/oxycontin-purchase-oxycontin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/sustanon-cheapest-sustanon-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/mg-rogaine-rogaine-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/mycostatin-effects-mycostatin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/flagyl-discount-flagyl-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/order-nutrition-nutrition-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/paracetamol-mg-paracetamol-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/acetaminophen-buy-acetaminophen-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/order-synthroid-online-synthroid-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/durabolin-hcl-durabolin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/buy-online-prozac-prozac-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/indocin-information-indocin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/low-cost-zocor-zocor-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/buy-vaniqa-vaniqa-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/buy-on-line-nystatin-nystatin-buy.html)(http://order.samaraonline.com/transp.gif) (http://order.samaraonline.com/zovirax-free-shipping-zovirax-buy.html)
Title: Hyperlink Custom control.
Post by: Pelle on April 18, 2005, 11:11:00 PM
Nice! Well done! :-)

Pelle
Title: Re: Hyperlink Custom control.
Post by: czerny on August 04, 2014, 02:23:33 PM
Is there any documentation about the usage of custcntl.h?
How is the resource editor talking to an custom control dll?

All I have found is to Borlands resource workshop.
Title: Re: Hyperlink Custom control.
Post by: czerny on August 05, 2014, 01:23:41 PM
I will try to summarize what I have found so far!

The following functions have to be provided and exported by the dll:

typedef UINT (CALLBACK* LPFNCCINFO)(LPCCINFO acci);
typedef BOOL (CALLBACK* LPFNCCSTYLE)(HWND hwndParent,  LPCCSTYLE pccs);
typedef INT (CALLBACK* LPFNCCSIZETOTEXT)(DWORD flStyle, DWORD flExtStyle, HFONT hfont, LPSTR pszText);

The first one has to be exported by name (ordinal does not matter). The CCINFO structure has pointer entrys for the two other functions. The name of each function does not matter. So it is not clear to me how the resource editor knows it.

The Resource Workshop expects a fourth function 'listclasses()', which should be exported by name. The name matters here! But this function seems to be a Borland special.

The return values of the
Info() seems to return the number of controls in the dll: 0 .. n
Style() returns the exit status of the style dialog: TRUE|FALSE
SizeToText() returns the size of the control text in pixels or -1 if error

I am not sure with the last one!

How is the CCSTYLEFLAG array terminated? There is no size or number provided for this. Has it to be NULL-terminated some how?

Who has to build the style dialog, resource editor (using the CCSTYLE structure) or the programmer of the dll?

There are other questions, but I will stop here.
Title: Re: Hyperlink Custom control.
Post by: frankie on August 06, 2014, 02:40:49 PM
What I understood is that the interface is the same used by VC8 dialog editor,
Some info can be taken from the original custcntl.h (https://github.com/nihon-tc/LFMtest/blob/master/header/Microsoft%20SDKs/Windows/v7.0A/Include/CustCntl.h).
A sample of use is custcntl.c (http://extras.springer.com/2000/978-1-893115-76-7/MSDN_VCB/SAMPLES/VC98/SDK/SDKTOOLS/WINNT/DLGEDIT/CUSTCNTL.C).
All required info for the custom control is passed in the CCINFO structure available from exported function 'CustomControlInfoA'.
Title: Re: Hyperlink Custom control.
Post by: czerny on August 07, 2014, 12:17:03 PM
Quote from: frankie on August 06, 2014, 02:40:49 PM
What I understood is that the interface is the same used by VC8 dialog editor, ...

You guess or you understand?

Quote from: frankie on August 06, 2014, 02:40:49 PM
A sample of use is custcntl.c (http://extras.springer.com/2000/978-1-893115-76-7/MSDN_VCB/SAMPLES/VC98/SDK/SDKTOOLS/WINNT/DLGEDIT/CUSTCNTL.C).

There was a person some time ago, who asked about source code for a resource editor. I don't remember who it was. The above project 'DLGEDIT' could be of interesst for him. It shows the whole thing from the resource editor point of view.
Title: Re: Hyperlink Custom control.
Post by: frankie on August 07, 2014, 04:00:48 PM
Quote from: czerny on August 07, 2014, 12:17:03 PM
Quote from: frankie on August 06, 2014, 02:40:49 PM
What I understood is that the interface is the same used by VC8 dialog editor, ...

You guess or you understand?

? ? ? ? ?  :(

Check 'SpinCube' sample in WIN7 SDK @ 'Microsoft SDKs\Windows\v7.1\Samples\winui\controls\custom\spincube'