FBGUI library for Windows 2

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
enform
Posts: 177
Joined: Apr 24, 2011 12:57
Location: France

Re: FBGUI library for Windows 2

Postby enform » May 01, 2020 14:54

Hi VANYA !

Yes I'm ok with your code , i already made the same thing in the past , but i expected a possibility with PM_REMOVE in order to
clean up a bit the messages queue .
it may be impossible to tame Windows.
Makoto WATANABE
Posts: 196
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FBGUI library for Windows 2

Postby Makoto WATANABE » May 05, 2020 7:26

Dear VANYA;

"libz.a" was included in the previous version of the Window9 library "LIBFB".
However, it is not included in the new package, so please include it.
If possible, I would appreciate including also "libzlib.a" in the Window9 package.
VANYA
Posts: 1427
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for Windows 2

Postby VANYA » May 05, 2020 8:34

Makoto WATANABE wrote:Dear VANYA;

"libz.a" was included in the previous version of the Window9 library "LIBFB".
However, it is not included in the new package, so please include it.
If possible, I would appreciate including also "libzlib.a" in the Window9 package.


Hi Makoto WATANABE!
I put the libz.a files from the old archive into the window9.zip archive, but I did not check the performance. I almost do not use windows, only in very rare cases. If there are problems with these files, please write about it.
Makoto WATANABE
Posts: 196
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FBGUI library for Windows 2

Postby Makoto WATANABE » May 05, 2020 10:50

Dear VANYA;

Thanks for your quick action.
With the library included in the package, new users of Window9 can easily get started.
Imortis
Moderator
Posts: 1738
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: FBGUI library for Windows 2

Postby Imortis » May 05, 2020 13:45

I took the time to search out the zlib binaries a while ago. Here is 32 and 64bit for windows:
zlib.zip
Makoto WATANABE
Posts: 196
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: FBGUI library for Windows 2

Postby Makoto WATANABE » May 05, 2020 23:17

Dear Imortis;

Thank you for telling me.
libz.a is required to use Window9.
SARG
Posts: 1186
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FBGUI library for Windows 2

Postby SARG » Dec 31, 2020 16:19

Hi VANYA,

I'm thinking about porting fbdebugger on Linux so I'm looking at cross-platform GUI libraries. Some years I began to code using IUP but why not trying Windows9 :-) Do you continue to support it ?

However I just did a test with the demo of tree and ADDTREEVIEWITEM is not found in the .a file error when linking.

By the way addtreeviewitem is doubled in the list on the first page maybe another function is missing in that list.
VANYA
Posts: 1427
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for Windows 2

Postby VANYA » Jan 01, 2021 6:37

SARG wrote:Do you continue to support it ?


Hi SARG!

Yes, the library is supported, but at the moment it is compiled for compiler version 1.07.1. You can rebuild it for the new version that you have installed. Very often errors can occur if the version of the library and the compiler do not match.

SARG wrote:However I just did a test with the demo of tree and ADDTREEVIEWITEM is not found in the .a file error when linking.

By the way addtreeviewitem is doubled in the list on the first page maybe another function is missing in that list.


I do not understand. What operating system? Have you used the version of the library from this page? What example did you run?
SARG
Posts: 1186
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FBGUI library for Windows 2

Postby SARG » Jan 01, 2021 10:01

Hi VANYA,

VANYA wrote:I do not understand. What operating system? Have you used the version of the library from this page? What example did you run?

Yes from this page
zip : 2020/05/05
lib WIN : 2020/03/02

I tried the 64bit version with this code from the chm file (addtreeviewitem page) :

Code: Select all

#Include "window9.bi"
Dim As Integer event
Dim As HWND hwnd,tree
hwnd=OpenWindow("TreeView",10,10,180,200) : CenterWindow(hwnd)
Var hbmp = load_Icon("1.ico")
Var hbmp1 = load_Icon("2.ico")
#Ifdef __FB_WIN32__
Dim As Long iStyle = TVS_HASLINES or TVS_HASBUTTONS or TVS_LINESATROOT
#Else
Dim As Long iStyle = 0
#EndIf
tree=TreeViewGadget(4,10,10,140,140, iStyle,,32)
Var Pos_=AddTreeViewItem(4,"1",hbmp,hbmp1,TVI_FIRST)
AddTreeViewItem(4,"1-1",hbmp,hbmp1,TVI_FIRST,Pos_)
Pos_=AddTreeViewItem(4,"2",hbmp,hbmp1,Pos_)
AddTreeViewItem(4,"2-1",hbmp,hbmp1,TVI_FIRST,Pos_)
Do
event=waitevent
If event=EventClose Then end
Loop


And this example (openwindows page) works fine but the values W and H are a bit too small better with 300/200.

Code: Select all

var hwnd=OpenWindow("test",10,10,100,100) 'hwnd=OpenWindow("test",10,10,300,200)
Var event=0
Do
event=WaitEvent()
If Event=EventClose Then End
Loop
VANYA
Posts: 1427
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for Windows 2

Postby VANYA » Jan 01, 2021 11:16

addtreeviewitem....


Error in the Window9.Bi file during declaration. It should be like this:

Code: Select all

Declare Function AddTreeViewItem OverLoad(ByVal gadget As long, ByRef string_ As String, ByVal IDImage_0 As HBITMAP, ByVal IDImage_Selected As HBITMAP, ByVal pos_ As integer, ByVal parent As Integer=0) As Integer
Declare Function AddTreeViewItem(ByVal gadget As Long, ByRef string_ As String,ByVal IDImage_0 As HICON,ByVal IDImage_Selected As HICON,ByVal pos_ As integer,ByVal parent As Integer=0) As Integer


I allowed this error when I combined the Linux and Windows versions


And this example (openwindows page) works fine but the values W and H are a bit too small better with 300/200.


Yes, I see the problem. I have not written for a long time under Windows, therefore I did not notice. And so far I do not even know because of what reason it happens. After all, even in a simple example, the same problem:

Code: Select all

#INCLUDE "windows.bi"
Dim msg As MSG
Dim As WNDCLASSEX wc
Dim As String NameClass="MyClass"
Dim As HINSTANCE Hinst=GetModuleHandle(0)

Function wndproc(hwnd As HWND, msg As Uinteger,_
       wparam As WPARAM, lparam As LPARAM) As Integer
    Select Case msg
        Case WM_DESTROY
            PostQuitMessage(0)
    End Select
    Return DefWindowProc(hwnd,msg,wparam,lparam)
End Function

With wc
    .cbSize=SizeOf(WNDCLASSEX)
    .style=CS_HREDRAW Or CS_VREDRAW
    .lpfnWndProc=@WndProc
    .hInstance=Hinst
    .hIcon=LoadIcon(0,IDI_QUESTION)
    .hCursor=LoadCursor(0,IDC_HELP)
    .hbrBackground=Cast(HBRUSH,COLOR_WINDOWFRAME)
    .lpszClassName=StrPtr(NameClass)
    .hIconSm=.hIcon
End With

If RegisterClassEx(@wc)=0 Then
    Print "Register error, press any key"
    Sleep
    End
Endif

CreateWindowEx(0,NameClass,"Header",_
WS_VISIBLE Or WS_OVERLAPPEDWINDOW,100,100,300,300,0,0,Hinst,0)

While GetMessage(@msg,0,0,0)
    TranslateMessage(@msg)
    DispatchMessage(@msg)
Wend


Perhaps this is due to the visual style of Windows 10. I will look for the cause, thanks for bug reports
VANYA
Posts: 1427
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for Windows 2

Postby VANYA » Jan 01, 2021 14:14

The windows 10 style for windows creates transparent pixels on the sides of the window.

You can check this if you set the "x" coordinate to the value "0":

Code: Select all

OpenWindow("",0,0,300,300)


On the left you will see that the window does not adjoin the beginning of the screen. The same will be in height, but at the bottom of the screen

In the case of operating systems windows xp, windows 7, there were no such pixels with the standard theme and the sizes were the same. I don’t think there is anything to be done here, because different topics can change this quality. In any case, the gadgets in the window take their count from the zero coordinates of the client side of the window. The total window size is an approximate value and is most often indicated with a small margin (a little more than necessary).
SARG
Posts: 1186
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FBGUI library for Windows 2

Postby SARG » Jan 01, 2021 17:21

The result on the left is after W and H increased a bit. On the right you can't move the window and the title is not visible due to the buttons taking all the place. I'm not sure that under XP or 7 a width of 100 is enough.

It was just a comment, the display could appear weird for some users testing the example.

Image

Just testing it, AddtreeView example is working. Thanks.
finchley
Posts: 1
Joined: Jan 08, 2021 17:10

Re: FBGUI library for Windows 2

Postby finchley » Jan 11, 2021 15:06

I have been learning to use the window9 library over the last few days but I am having difficulty with two things: setting tab order and giving a gadget the focus.

I've scoured the help file (and a big thank you for providing an English version), searched this forum topic, and grepped the source code but to no avail.

Any help would be greatly appreciated. Thanks in advance...

finchley
VANYA
Posts: 1427
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FBGUI library for Windows 2

Postby VANYA » Jan 11, 2021 17:22

finchley wrote:I have been learning to use the window9 library over the last few days but I am having difficulty with two things: setting tab order and giving a gadget the focus.


Hi finchley!

Please clarify the question.

1) What operating system?
2) Are you having a problem with PanelGadget? Or are you talking about switching gadgets using the TAB key?
3) Source code of what doesn't work

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 4 guests