FBGUI library for windows 2

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
VANYA
Posts: 1272
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for windows 2

Postby VANYA » Apr 04, 2018 6:57

enform, thanks for the kind words. Your translation I introduced sf.net

Joshy , I added a link to your project 32 \ 64 bit to the first page of the library description: viewtopic.php?f=14&t=17058 and added a project to sf.net
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » Apr 05, 2018 16:23

I made a massive upgrade last night.

I removed all alias declarations from functions and subs.
I renamed MessBox in MsgBox
I renamed and added a prefix to all "private" internal stuff also.

for example GGF() is win9GetGadgetFont() now and more meaningful.

Joshy

this old stuff:

Code: Select all

Declare Function GadgetClass(ByVal gadget As HWND) As Long
Declare Sub      GetAcceleratorInfo(ByVal aa As ACCELERATOR ptr)
Declare Function GETGURRENTAL Alias "GETGURRENTAL" () As HWND
Declare Function ADDIN9999 Alias "ADDIN9999" (ByVal gadget As Integer, ByVal hhh As HWND) As Integer
Declare Function GGF() As Integer
Declare Function ColorAdd Alias "ColorAdd" (byval hwnd as HWND,ByVal colorBKD_ as Integer,ByVal colorText_ as Integer ) As Integer
Declare Function GetFbGuiWinProc() As Integer
Declare Function GetfbguiMSG() As Integer
Declare Sub      SETDCPrint(pHdc As HDC)
Declare Function DSGC(ByVal gadget As HWND,ByVal COLBND As integer,ByVal COLText As Integer,ByVal flag As byte) As byte
Declare Function ERR_(ByVal bk As Integer) As Integer
Declare Function COOLOOR(ByVal bk As Integer, ByVal te As integer) As Integer
declare Sub      MDISUB(ByVal hMDI As HWND)
Is now:

Code: Select all

Declare Function win9GetGadgetClass(ByVal hWin As HWND) As Long
Declare Sub      win9GetAcceleratorInfo(ByVal a As ACCELERATOR ptr)
Declare Function win9GetCurrent() As HWND
Declare Function win9AddNewGadget(ByVal gadget As Integer, ByVal hWin As HWND) As Integer
Declare Function win9GetGadgetFont() As Integer
Declare Function win9AddColor(byval hWin as HWND, ByVal colorBKD_ as Integer, ByVal colorText_ as Integer) As Integer
Declare Function win9GetGuiWinProc() As Integer
Declare Function win9GetGuiMSG() As Integer
Declare Sub      win9SetDCPrint(byval pHdc As HDC)
Declare Function win9SetGadgetColor(ByVal hWin As HWND,ByVal colorBKD_ As integer,ByVal colorText_ As Integer,ByVal flag As byte) As byte
Declare Function win9SetErrorColor(ByVal colorBKD_ As Integer) As Integer
Declare Function win9SetCurrentColors(ByVal colorBKD_ As Integer, ByVal colorText_ As integer) As Integer
Declare Sub      win9SetMDIClient(ByVal hWin As HWND)
srvaldez
Posts: 1628
Joined: Sep 25, 2005 21:54

Re: FBGUI library for windows 2

Postby srvaldez » Apr 05, 2018 16:48

thank you :-)
VANYA
Posts: 1272
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for windows 2

Postby VANYA » Apr 05, 2018 17:20

D.J.Peters wrote:I renamed MessBox in MsgBox


Compatibility with existing source codes written with window9 will be lost. Can not it be more correct to delete, but simply add an extra declaration?

Something like:

Code: Select all


window9.bi
.....
.....
Declare Function MessBox Alias "MESSBOX" (ByVal Caption As String,ByVal Message As String,ByVal flag As Integer=0) As Integer
Declare Function MSGBOX Alias "MESSBOX" (ByVal Caption As String,ByVal Message As String,ByVal flag As Integer=0) As Integer
....
....
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » Apr 05, 2018 18:58

I don't know why you will name it MessBox how ever I added a define to solve this tiny problem.
It's -gen gcc compatible now.

Joshy

Code: Select all

#define MessBox MsgBox
Declare Function MsgBox(ByVal Caption As String, ByVal Message As String, ByVal flag As Integer=0) As Integer
VANYA
Posts: 1272
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for windows 2

Postby VANYA » Apr 05, 2018 19:22

D.J.Peters wrote:I don't know why you will name it MessBox


messbox = MESSageBOX
enform
Posts: 155
Joined: Apr 24, 2011 12:57
Location: France

Re: FBGUI library for windows 2

Postby enform » Apr 07, 2018 21:32

Joshy ,
Can you provide the 2 versions , old stuff and new one ? We will choose depending of our experience (7 years with w9) ,compatibility
or needs , gas ,gcc ...
Thank you .
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » Apr 08, 2018 6:35

@enform I created libWindows9 it's in the *.zip file it works for 32 and 64-bit Windows.

link is the same: libWindow9.zip

Joshy
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » Apr 08, 2018 17:27

@enform I have no time to test it all self.

Would be great if you can compile all your source code and report the problems if any.

Thank you.
enform
Posts: 155
Joined: Apr 24, 2011 12:57
Location: France

Re: FBGUI library for windows 2

Postby enform » Apr 10, 2018 6:36

@Joshy, if i see well , only 'win9SetGadgetColor.bas' is new as external/user kwd ? why 'win9' ?
I hope i will recompile soon , with a lot of courage ...
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » Apr 10, 2018 17:22

enform wrote:@Joshy, if i see well , only 'win9SetGadgetColor.bas' is new as external/user kwd ? why 'win9' ?
I hope i will recompile soon , with a lot of courage ...


SetGadgetColor.bas is the exported user command

the prefix win9 means win9SetGadgetColor.bas it's for internal usage

Only new are "FastCRC16.bas"

Joshy

new vs old internal names:

Code: Select all

win9GetAcceleratorInfo GetAcceleratorInfo
win9GetCurrent GETGURRENTAL
win9AddNewGadget ADDIN9999
win9GetGadgetFont GGF
win9AddColor ColorAdd
win9GetGuiWinProc GetFbGuiWinProc
win9GetGuiMSG GetfbguiMSG
win9SetDCPrint SETDCPrint
win9SetGadgetColor DSGC
win9SetErrorColor ERR_
win9SetCurrentColors COOLOOR
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: FBGUI library for windows 2

Postby D.J.Peters » May 06, 2018 20:19

fixed some bugs in:
FindItemComboBox
Grab_imageA
Resize_imageA

changed all:
BYVAL as string to BYREF as string

added x86_64 assembler code to:
fast_copy
fast_crc32

Joshy
RNBW
Posts: 172
Joined: Apr 11, 2015 11:06
Location: UK

Re: FBGUI library for windows 2

Postby RNBW » Aug 26, 2018 16:29

Those who have been following my thread in Tips & Tricks for Numeric Entry Into a Textbox may be interested in my first attempt to convert it to use the FBGUI for windows 2 library https://www.freebasic.net/forum/viewtopic.php?f=7&t=26816&start=60.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest