Grid32Ex and FireFly

Started by Jean-pierre Leroy, June 30, 2015, 12:57:39 PM

Previous topic - Next topic

Jean-pierre Leroy

Dear FF users,

Probably some of you have seen that Dominic has released a new grid control called Grid32Ex.

http://www.powerbasic.com/support/pbforums/showthread.php?t=59499

I would like to try it with FireFly for PowerBASIC (and why not later with FireFly for FreeBasic).

As mentionned by Dominic, before using the grid in code, call its initialization function first InitGridControl; no problem on that.
Then to create for SDK use CreateWindowEx; the class name for the grid is "Phnx_Grid_Class32".

Here are my questions:

- What is the minimal code/syntax of CreateWindowEx ?
- Can I create it manually in the FireFly editor ?

Thanks for your help.
Jean-Pierre

Jean-pierre Leroy

Dear all,

It seems to work with this minimal code:


%ID_GRID32EX = %WM_USER + 100
'--------------------------------------------------------------------------------
Function FORM1_WM_CREATE ( _
                         hWndForm As Dword, _      ' handle of Form
                         ByVal UserData As Long _  ' optional user defined Long value
                         ) As Long

    InitGridControl   
    Local hWndGrid32Ex As Dword         
    hWndGrid32Ex = CreateWindowEx( %WS_EX_LEFT Or %WS_EX_LTRREADING Or %WS_EX_RIGHTSCROLLBAR , _
                              ByCopy "Phnx_Grid_Class32", _
                              ByCopy "", _
                              %WS_CHILD Or %WS_VISIBLE Or %WS_TABSTOP, _
                              20, 20, 400, 200, _
                              hWndForm, _
                              %ID_GRID32EX, _
                              App.hInstance, _
                              ByVal %Null )                               

End Function


I put also in FF_AppStart:


#INCLUDE "Grid32Ex.inc"


I don't know why but I had to rename the demo version of the grid from Grid32Ex.dll to Grid32.dll.

Any comments ?

Jean-pierre Leroy

With these 3 lines of code I can see a real grid ...

SendMessage hWndGrid32Ex, %GCM_SETHEADERDISPLAYBASE, 0, 1                             
SendMessage hWndGrid32Ex, %GCM_INSERTCOLUMN, 1, 3
SendMessage hWndGrid32Ex, %GCM_INSERTROW   , 1, 6               


Petrus Vorster

Holy Heck, what a job he did there!!!
Yes, that would be a real nice tool to use in FF!
-Regards
Peter

Jim Dunn

Hey, I've been away from all forums for 6 months, just came back today, noticed that http://phnxthunder.com/ is gone...

Haven't been over to PowerBasic.com yet...

Shocked that Paul has a 3.74 out...
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."