FireFly Visual Designer for FreeBASIC (Updated March 8, 2016)

User projects written in or related to FreeBASIC.
Post Reply
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by PaulSquires »

VANYA wrote:Hi PaulSquires!
It would be nice to FireFly generates something like this:

#ifndef GCLP_HBRBACKGROUND
#define GCLP_HBRBACKGROUND GCL_HBRBACKGROUND
#endif
Hi VANYA, you could try putting your #idndef block in the FF_AppStart code area. You can access FF_Appstart from the "FireFly Workspace", "Explorer", "Special Functions".

The goal of FireFly will always to be able to use the latest FB compiler and the latest WinAPI include files. This is especially important in order to ensure compatibility with 32 and 64 bit code. There are several areas of the WinAPI documentation where Microsoft urges the developer to use one api over another. For example, the GCL_HBRBACKGROUND equate is part of the GetClassLong api which should be deprecated in favor of GetClassLongPtr. Here is the link: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Note To write code that is compatible with both 32-bit and 64-bit versions of Windows, use GetClassLongPtr. When compiling for 32-bit Windows, GetClassLongPtr is defined as a call to the GetClassLong function.
Hope that helps :-)
VANYA
Posts: 1867
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by VANYA »

Thank you very much, FF_AppStart - really what you need

Another question: The code editor supports only English?
My Russian distorts the Editor:
Must be:
messagebox(0,"Это первая кнопка","",0)
And it turns out:
messagebox(0,"Ýòî ïåðâàÿ êíîïêà","",0)
Of course the final application displays all right.
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by PaulSquires »

VANYA wrote: Another question: The code editor supports only English?
I wrote the code editor from scratch using winapi. In hindsight I probably should have used a pre-built control like Scintilla. My control does not handle unicode. The FireFly code generation is also not unicode based. Sorry.
VANYA
Posts: 1867
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by VANYA »

PaulSquires wrote:
VANYA wrote: Another question: The code editor supports only English?
I wrote the code editor from scratch using winapi. In hindsight I probably should have used a pre-built control like Scintilla. My control does not handle unicode. The FireFly code generation is also not unicode based. Sorry.
As you realized load font ?
What is the parameter fdwCharSet in the function CreateFont ?
Must be: DEFAULT_CHARSET
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by PaulSquires »

Hi VANYA,

The font creation uses the results from a call EnumFontFamilies. I have now modified the call to hard code it as DEFAULT_CHARSET. I have uploaded a new Firefly exe for you to test for me (if you don't mind). Thanks!
http://www.planetsquires.com/files/FireFly_FB_Font.zip
VANYA
Posts: 1867
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by VANYA »

PaulSquires wrote:Hi VANYA,

The font creation uses the results from a call EnumFontFamilies. I have now modified the call to hard code it as DEFAULT_CHARSET. I have uploaded a new Firefly exe for you to test for me (if you don't mind). Thanks!
http://www.planetsquires.com/files/FireFly_FB_Font.zip
Hi PaulSquires! Now everything is fine. Thank you!

P.S. You do not want to in the future hard-coded strings to make a text file that users had the opportunity to translation interface FireFly ?
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by PaulSquires »

VANYA wrote:Hi PaulSquires! Now everything is fine. Thank you!
You are very welcome. I'm happy that the font is working correctly for you now.
P.S. You do not want to in the future hard-coded strings to make a text file that users had the opportunity to translation interface FireFly ?
I am not sure what you mean. Are you saying that you would like a user editable configuration file whereby each language could be stored? For example, a language file for English, one for French, one for Russian, etc... and that file would be read by Firefly in order to change the text displayed in Firefly's interface?
VANYA
Posts: 1867
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FireFly Visual Designer for FreeBASIC (Updated June 6, 2

Post by VANYA »

I am not sure what you mean. Are you saying that you would like a user editable configuration file whereby each language could be stored? For example, a language file for English, one for French, one for Russian, etc... and that file would be read by Firefly in order to change the text displayed in Firefly's interface?
Yes.

I understand that part of the strings (the menu) is the resource and can be edited with the help of Resource Editor, but there is not all strings. It is much more convenient if all the strings will be in a separate text file. Then translate the interface is simple and convenient. This is if you want to make this feature.
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 14, 2

Post by PaulSquires »

Updated the first post in this thread. New version is available for download.
FireFly3 - 3.76 (Released 2015-08-14)
=====================================
- 0000919: [New Feature Request] FB: Added project option to automatically generate code for GDI Plus (GDI+) support (Paul Squires) - closed.
- 0000918: [Change] FB/PB: Modified FireFly's code editor to create fonts using DEFAULT_CHARSET. Better for Russian, etc. (Paul Squires) - closed.
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 14, 2

Post by PaulSquires »

FireFly Visual Designer 3.76.1 uploaded today. Very small fix to correct code generation for Win 64 bit projects using the new GDI Plus option.
josnan petrel
Posts: 24
Joined: Jan 03, 2013 19:02

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 15, 2

Post by josnan petrel »

Hello, you can not use
zlib.bi

Image
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 15, 2

Post by PaulSquires »

From your screenshot it looks like you are using the #Include from inside a Function/End Function block. I imagine that is why the compiler is throwing and error.

Try moving your #Include to the top of the Form or put it in FF_APPSTART.
josnan petrel
Posts: 24
Joined: Jan 03, 2013 19:02

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 15, 2

Post by josnan petrel »

the program is stopped

Image
PaulSquires
Posts: 1012
Joined: Jul 14, 2005 23:41

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 15, 2

Post by PaulSquires »

Do you have the necessary dll files in the release folder? I compiled a test program and because I do not have the dll's, I was given this error by the linker:

[quote]
E:\FB\FreeBASIC-1.03.0-win32\bin\win32\ld.exe: cannot find -lzip
E:\FB\FreeBASIC-1.03.0-win32\bin\win32\ld.exe: cannot find -lz
linking failed: 'E:\FB\FreeBASIC-1.03.0-win32\bin\win32\ld.exe' terminated with exit code 1
[/code]

Sometimes FF will not display an error message from a failed compile. I should probably be parsing the _project1_compilelog.txt file for the phrase "linking failed". If you ever compile your program from inside FireFly and the resulting messagebox says that the file size of the resulting exe is 0 bytes, then more than likely there was a linking error.
josnan petrel
Posts: 24
Joined: Jan 03, 2013 19:02

Re: FireFly Visual Designer for FreeBASIC (Updated Aug 15, 2

Post by josnan petrel »

and that?
zlib not in include

Image
Post Reply