Dear guest !

Welcome to Team Developer Community Forum. A place created by the community, for the community !

This is a resource for Q & A and discussion about everything related to OpenText Gupta Team Developer, SqlBase, TD Mobile and Report Builder.
It is the alternative for the OpenText customer forums which can only be accessed with an active support contract.

Please register your account now. It will make you part of the active community.
Also, this guest message will not be displayed for registered users.

As a bonus, registered users have access to the 'Newsgroups' subforum, holding 10 years worth of posts from the good old Gupta newsgroups.

Having an account gives you the opportunity to ask questions and get help from others.
We hope this free gathering will help you and the community getting forward!

Best regards,
The forum site admins.

Are there any CNUI samples in the wild

Post your tools and samples or ask for them.
Post Reply
Igor Ivanovic
Site Admin
Croatia
Posts: 65
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Are there any CNUI samples in the wild

Post by Igor Ivanovic » 29 Mar 2017, 12:58

I must admit I have never used CNUI :oops: , but now it seems interesting.
Are there any samples (or documentation) how to use it?
Is it still useable with TD7.0?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Netherlands
Posts: 209
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands
Contact:

Re: Are there any CNUI samples in the wild

Post by Dave Rabelink » 29 Mar 2017, 13:10

I have to admit too never having used it !

Searching on TD Samples, this are the hits:

http://tdsamples.daverabelink.net/index ... rch_mode=f

I have updated the archive last year adding TD70 support, but did not test it.
Regards,
Dave Rabelink

Image
Join & participate on Team Developer Tips & Tricks Wiki
Download samples from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Croatia
Posts: 65
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Are there any CNUI samples in the wild

Post by Igor Ivanovic » 29 Mar 2017, 15:24

Dave,

That was the first place I looked :D, but there is no sample app for it, just the include apl.
Maybe someone actually using it could jump in.
Is it worth using it with TD7.x?
Igor Ivanovic
Image

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:21

How to get the hIcon of a ctd ressource icon file.



It's very easy to do it. Just get the library CNUI.DLL from
http://geos.sniff.ru and use ResourceToHBITMAP() function.

Format for loading HICON handle is:

Code: Select all

HANDLE ResourceToHBITMAP(
        TEMPLATE imgTemplate,  // CTD resource identifier
        DWORD dwWidth,  // Width of the icon
        DWORD dwHeight, // Height of the icon
        LPINT lpiType, // Type of the image ( must be IMAGE_ICON  = 1)
        LONG lRsrvd, // Always must be 0
        LPVOID *lpRsrd2 // Always must be 0
)
If the functions succeeds, the return value is the handle of the loaded icon
(HICON)
If the function fails, the return value is 0.

Don't forget to destroy icon with DestroyIcon () function!

ResourceToHBITMAP could be also used for loading HBITMAPS and HCURSORS as
well.
Format for loading cursors is the same as for icons but lpiType should be =
IMAGE_CURSOR (IMAGE_CURSOR = 2). Use DestroyCursor() to destroy cursors.

Format of the function for loading bitmaps is :

Code: Select all

HANDLE ResourceToHBITMAP(
        TEMPLATE imgTemplate,  // CTD resource identifier
        DWORD crColorToSearch,  // COLORREF value to search and change to
crColorToReplace color ( use -1 to specify a color of the first (top/left)
pixel of the bitmap)
        DWORD crColorToReplace, // COLORREF value to replace with
crColorToSearch. Use GetSysColor () to specify system colors.
        LPINT lpiType, // Type of the image ( must be IMAGE_BITMAP = 0)
        LONG lRsrvd, // Always must be 0
        LPVOID *lpRsrd2 // Always must be 0
)
If the functions succeeds, the return value is the handle of the loaded icon
(HBITMAP). Use DeleteObject () to delete bitmaps.
If the function fails, the return value is 0.

---

You could get additional information from my samples. This function works
fine with CTD1.x and CTD2.0. I hope, this will work with CTD2.1 as well.

HTH
George
:)

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:22

I have a picture class which acts like a flat toolbar toggle button. I am
currently passing the file names for the on/off bitmaps, which works ok,
but having to rely on files being present when all my other images are held
as resources goes against the grain for me. What I really, really want is to
be able to pass the handle to a pair of resources to the initialisation
function of the class. I have tried declaring the input parameters as
numbers - no luck, I have tried casting the handles to numbers as if they
were Window handles - ditto. I can, of course, pass them as VisPic handles,
but couldn't figure a way of using these handles for a picture class - they
only seem to be usable within the context of outlines.

Any ideas?

Regards, Mark


I think (don´t know exactly) there is a difference between the Centura
picture handles and windoes picture handles.The windows functions in can´t
access the pictures by the handle of vispicload(...) form the centura
ressources. loading a picture with the windows functions loadimage(...)
equal if from file, ddl resource or elswhere gives you the correct handle.
In George Panov´s CNUI-dll there is a function called ResourceToHBITMAP
which converts a Centura recource to HBitmap handle. This is what you need i
think. For more you must ask George Panov at http://geos.sniff.ru

HTH
Thomas L.

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:23

Is this possible?. Need a column with a pushbutton. Currently, user need
to click on a specific row, then click on a button placed on the form window
to take them to the relative screen to show more details. Or else need to
double click, but need to educate a user to do so.

But if there is a push button on the column itself, then they can click on
the button that takes them to the corresponding details.




Hi,
Please, check my sample "Command button"

http://tdsamples.daverabelink.net/index ... button.zip

HTH
George
:)

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:24

Hi,

some other solution for flat button's

- nice but not perfect, enjoy

Regards,
Thomas




Hi, Thomas!

I have solution for creating flat buttons too. Please, look at my
"RollStrip" sample

http://tdsamples.daverabelink.net/index ... rch_mode=f

Best regards,
George
:)

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:24

Hi, Christophe!

Please, take a look at sample "Searching for text in filesystem" at my
homepage http://geos.sniff.ru.
This sample demonstrates how to create searching utility to find files.

http://tdsamples.daverabelink.net/index ... d_file.zip

HTH
George
:)

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:25

Hello,

I want to display 6 Tablewindows on the Display.
First i check the resolution of the Display.
After that i create the windows and (want to) make them the 6th size of the
screen.
But with my code below i have spaces between the Tablewindows.
These Spaces are that great, that i even cant display all those
tablewindows.
Does anybody know where i made the mistake?



I found an example with CNUI.dll.
It is in the attachement.

http://tdsamples.daverabelink.net/index ... litter.zip

NewsgroupServer
United States of America
Posts: 118940
Joined: 30 Mar 2017, 05:16
Location: World wide

Re: Are there any CNUI samples in the wild

Post by NewsgroupServer » 30 Mar 2017, 06:26

Hello,

Is it possible to create a splitterwindow with 6 panes?

I looked at the class but im not sure where to start my experiments...

Hopefully someone tried things like this before...



Thank you all for your help...

I did itwith the help of cnui.dll and an older example from the old
newsgroup.

Here it is:
http://tdsamples.daverabelink.net/index ... neCNUI.zip

Acclaro
Germany
Posts: 2
Joined: 16 Mar 2017, 08:13
Location: Hannover, Deutschland

Re: Are there any CNUI samples in the wild

Post by Acclaro » 31 Mar 2017, 10:38

Hello,

I found some old TD31 samples for cnui in our sample folder.
I hope it helps.
By the way...no guarantee for anything ;)
Attachments
CNUISamplesTD31.ZIP
(1.48 MiB) Downloaded 15 times

Dave Rabelink
Founder/Site Admin
Netherlands
Posts: 209
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands
Contact:

Re: Are there any CNUI samples in the wild

Post by Dave Rabelink » 31 Mar 2017, 11:29

Acclaro wrote:
31 Mar 2017, 10:38
I found some old TD31 samples for cnui in our sample folder.
Great !!!

I have uploaded it to TD samples for keepers:

http://tdsamples.daverabelink.net/index ... rch_mode=f


If you have more samples to share, whatever, which is not yet present in the TD samples, please send them (by email) so I can add them to the repository.
Regards,
Dave Rabelink

Image
Join & participate on Team Developer Tips & Tricks Wiki
Download samples from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Netherlands
Posts: 209
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands
Contact:

Re: Are there any CNUI samples in the wild

Post by Dave Rabelink » 12 May 2017, 09:46

Ha, now the old newsgroups are here, this search query finds these hits:

search.php?keywords=CNUI&terms=all&auth ... mit=Search
Regards,
Dave Rabelink

Image
Join & participate on Team Developer Tips & Tricks Wiki
Download samples from TD Sample Vault
Videos on TDWiki YouTube Channel

Post Reply

Return to “Tools & Samples”

Who is online

Users browsing this forum: No registered users and 1 guest