PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Jean-pierre Leroy on April 04, 2016, 06:00:37 AM

Title: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 04, 2016, 06:00:37 AM
ZeeGrid has been made by David Hillard and is completely free.

The DDL and the C header (ZeeGrid.h) are available on his web site :

http://www.kycsepp.com (http://www.kycsepp.com)

For those of you that would like to test ZeeGrid with PowerBASIC and/or FireFly you will find below ZeeGrid.inc (my translation of the ZeeGrid.h); I hope there is no error.

I will try to create a .ctl file in order to have it fully integrated within FireFly.

Regards,
Jean-Pierre

PS: the ZeeGrid.inc has been updating; thanks to Jose.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Eddy Van Esch on April 04, 2016, 06:24:52 AM
Thanks for letting us know and for your .inc file, Jean-Pierre.
Too bad there is not (yet) a complete documentation of all the Messages/Commands.

Kind regards
Eddy
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Petrus Vorster on April 04, 2016, 07:05:16 AM
Sounds very cool indeed. If someone has a few screenshots of this in action it would be very nice indeed if one can have a visual idea of what this looks like!
People creating cool controls for both Powerbasic and Firefly are great to have around for those of us who cant make them ourselves!
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 04, 2016, 07:06:48 AM
The translation of the ZGNOTIFYSTRUCT structure is incorrect. It must be:

Code: [Select]
' // Size = 28 bytes
Type ZGNOTIFYSTRUCT DWORD
ZGHeader  As NMHDR
ZGControl As Byte
ZGShift   As Byte
ZGAlt     As Byte
ZGvKey    As Long
End Type
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 04, 2016, 08:46:09 AM
Thank you Jose.

I've just uploaded a corrected version of ZeeGrid.inc

Regards,
Jean-Pierre
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 17, 2016, 06:33:43 AM
Thanks for letting us know and for your .inc file, Jean-Pierre.
Too bad there is not (yet) a complete documentation of all the Messages/Commands.

Kind regards
Eddy
Eddy, for your information David Hillard has just published complete documentation about ZeeGrid's messages and notifications.

http://www.kycsepp.com/ZeeGrid_Docs/ZeeGrid_index.html
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 17, 2016, 06:41:11 AM
Sounds very cool indeed. If someone has a few screenshots of this in action it would be very nice indeed if one can have a visual idea of what this looks like!
People creating cool controls for both Powerbasic and Firefly are great to have around for those of us who cant make them ourselves!

Petrus, for your information I've translated into PowerBASIC DDT code a C demo that David Hillard sent me.

The PowerBASIC DDT code is here:

http://forum.powerbasic.com/forum/user-to-user-discussions/third-party-addons/29100-zeegrid-any-experience?p=747001#post747001
 (http://forum.powerbasic.com/forum/user-to-user-discussions/third-party-addons/29100-zeegrid-any-experience?p=747001#post747001)
I will prepare a PowerBASIC SDK demo as well as a FireFly demo
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Paul Squires on April 17, 2016, 09:57:57 AM
Thanks Jean-Pierre,

I am going to work on a FreeBasic version as well. Nice to have another option for Grid controls. Maybe this grid will allow me not to have to finish the one that I started to create.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 17, 2016, 11:28:25 AM
But apparently it's only 32-bit, isn't it?
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Paul Squires on April 17, 2016, 12:24:17 PM
Yes, it may very well be only 32-bit. It appears that Jean-Pierre has been in contact with the author. I wonder if the author will also compile the source for 64-bit.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Paul Squires on April 17, 2016, 12:25:28 PM
Attached is a simple FreeBasic FireFly project showing a demo of the grid.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 17, 2016, 04:56:51 PM
@Paul
Thank you for the demo with FreeBASIC

@Jose, @Paul
I've just sent an email to David Hillard asking him if he can compile a 64 bits version of ZeeGrid.DLL.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 17, 2016, 07:08:59 PM
@Paul,

I saw this line of code in the FreeBASIC demo:

Code: [Select]
SendMessage hWndControl, ZGM_SETCELLTEXT, 1, Cast(LPARAM, @("First" & Chr(13) & "Column"))

How do you translate this line of code in PowerBASIC (my question is on the Cast operator) ?
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 17, 2016, 07:20:16 PM
> How do you translate this line of code in PowerBASIC (my question is on the Cast operator) ?

You can't. You have to fill a variable and pass the address of the string text (VARPTR for ASCIIZ, STRPTR for STRING)
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 17, 2016, 07:30:16 PM
Sorry, but I'm not going to use it. I have made a test and isn't adequate for High DPI applications.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Paul Squires on April 17, 2016, 07:39:09 PM
lol!  Well, I guess I will have to continue writing the grid after all.  :)
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 18, 2016, 04:58:08 AM
> How do you translate this line of code in PowerBASIC (my question is on the Cast operator) ?
You can't. You have to fill a variable and pass the address of the string text (VARPTR for ASCIIZ, STRPTR for STRING)
Jose, thank you for your answer.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 18, 2016, 05:06:02 AM
Sorry, but I'm not going to use it. I have made a test and isn't adequate for High DPI applications.
@Jose : Thank you for the test.

@Jose, @Paul
I will create another thread about yet another grid called Simple Grid (32 bits, 64 bits, Unicode and C source code available).
I've compiled the source with PellesC and created the 32 bits and 64 bits DLL (they are not available on CodeProject.com).
More info about Simple Grid : http://www.codeproject.com/Articles/681771/Simple-Grid-A-Win-message-based-grid-control
I hope Simple Grid will be High DPI aware.

Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 19, 2016, 09:50:44 AM
Attached is a simple FreeBasic FireFly project showing a demo of the grid.
Hi Paul,

David sent me a 64 bits version of the DLL for test; I swith your FireFly for FreeBASIC demo project to 64 bits.
I get this error message when I try to compile the project.
Any ideas how to solve it ?
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 19, 2016, 11:02:21 AM
Change

CAST(HMENU, IDC_FRMMAIN_ZEEGRID)

to

CAST(HMENU, CAST(LONG_PTR, IDC_FRMMAIN_ZEEGRID))
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Josť Roca on April 19, 2016, 11:04:50 AM
If you're going to use FreeBasic, learn how CAST works, because you're going to have to use it more often that any other FB function.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 19, 2016, 12:21:37 PM
If you're goign to use FreeBasic, learn how CAST works, because you're going to have to use it more often that any other FB function.
@Jose, thank you for your help; it works now. And yes I will probably use more and more often FireFly for FreeBASIC. I will learn how to use CAST. I promise you.

@Paul,  in this specific case the code in the FRMMAIN_ZEEGRID_INIT handler is generated directly by FireFly ... so I think that you should adapt this code (if possible) depending on the mode 32 bits and/or 64 bits. Is-it possible ?
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 19, 2016, 12:28:02 PM
But apparently it's only 32-bit, isn't it?
@Jose: As mentioned earlier, David sent me a 64 bits version of the DLL for test. I use it with FireFly for FreeBASIC 64 bits ... and so far so good.
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Paul Squires on April 19, 2016, 05:39:18 PM
@Paul,  in this specific case the code in the FRMMAIN_ZEEGRID_INIT handler is generated directly by FireFly ... so I think that you should adapt this code (if possible) depending on the mode 32 bits and/or 64 bits. Is-it possible ?

Thanks Jean-Pierre, I have now corrected the code generation for Custom Controls to eliminate this compile error. The code is the same for both 32 and 64 bits.

Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 20, 2016, 08:22:53 AM
But apparently it's only 32-bit, isn't it?
David Hillard has officially released a 64 bits version of his grid ZeeGrid.

Announcement on his website:
http://www.kycsepp.com/ZeeGrid_Docs/zeegrid_build_37.html
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: James Fuller on April 20, 2016, 04:19:39 PM

One item I found missing is a combo box cell.
I used the old FarPoint Spread DLL (2.5/3.0) as my primary data input device with PowerBASIC back in my contracting days and most of the data forms I designed had at at least one static data item that the user selected via a cell combo box.

James


Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 20, 2016, 04:55:23 PM
James,

I will take a look at FarPoint Spread DLL (2.5/3.0).

Regarding ZeeGrid it is possible to set a combo box at the cell level; there is a notification message called %ZGN_LOADCOMBO that allow to do that at cell level;you can have a look at the screenshot below.


Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: James Fuller on April 21, 2016, 08:24:12 AM
Is it possible to do this with zeegrid?
This uses the row number col as a label to what is wanted in a one col grid.

James
Title: Re: ZeeGrid a new and free grid available for PowerBASIC and Firefly users
Post by: Jean-pierre Leroy on April 21, 2016, 01:16:50 PM
Is it possible to do this with zeegrid?
This uses the row number col as a label to what is wanted in a one col grid.
James
I will try to do this kind of Grid with ZeeGrid; at least it is possible with MLG (MyLittleGrid) :