WinFBE on GitHub (November 12, 2016)

Started by Paul Squires, November 12, 2016, 04:30:41 PM

Previous topic - Next topic

José Roca

> Editor now remembers the width of the Explorer pane between sessions.

It does not calculate correctly the size with High DPI. Apparently you are multiplying the saved size by the DPI ratio and the windows becomes bigger than it should each time you restart the editor.

José Roca


   ' Only make the Explorer initially visable if it was already visible
   ' when the most previous instance of the program closed. Also, set the width of
   ' the window to the last used visible width.
   dim as long nWidth = iif(gConfig.ShowExplorer, gConfig.ShowExplorerWidth, 250)

   HWND_FRMEXPLORER = pWindow->Create( hWndParent, "", @frmExplorer_WndProc, 0, 0, nWidth, 0, _
        WS_CHILD Or iif(gConfig.ShowExplorer, WS_VISIBLE, 0) Or WS_CLIPSIBLINGS Or WS_CLIPCHILDREN, _
        WS_EX_CONTROLPARENT Or WS_EX_LEFT Or WS_EX_LTRREADING Or WS_EX_RIGHTSCROLLBAR)


Because pWindow->Create scales the control according to the DPI, you must unscale the saved width:


dim as long nWidth = iif(gConfig.ShowExplorer, pWindow->UnscaleX(gConfig.ShowExplorerWidth), 250)


Paul Squires

Thanks Jose! Change made and uploaded to GitHub  :)
Paul Squires
PlanetSquires Software

José Roca


Paul Squires

Quote from: TechSupport on November 19, 2016, 11:32:28 AM
Quote from: TechSupport on November 19, 2016, 10:16:43 AM
Thanks Jose, I will get that worked out very soon as well.  :)
This is a 64-bit problem. Works on 32-bit. Most likely to do with how the SCNotification TYPE is defined. I will look at that structure to see what needs to be changed.

Still having problems with this. On the 64 bit version, clicking on the bookmark margin does not work and neither does the SCN_CHARADDED for auto indentation. I really need to figure that out that notification structure before starting to publicize this project to the FB community.

Paul Squires
PlanetSquires Software

José Roca

#50

Type SCNotification
   hdr                  As Sci_NotifyHeader
   position             As INTEGER
   ch                   As INTEGER
   modifiers            As INTEGER
   modificationType     As INTEGER
   lpText               As ZString Ptr
   length               As INTEGER
   linesAdded           As INTEGER
   message              As INTEGER
   wParam               As uINTEGER
   lParam               As uINTEGER
   nLine                As INTEGER
   foldLevelNow         As INTEGER
   foldLevelPrev        As INTEGER
   margin               As INTEGER
   listType             As INTEGER
   x                    As INTEGER
   y                    As INTEGER
   token                As INTEGER
   annotationLinesAdded As INTEGER
   updated              As INTEGER
End Type


You are using INTEGER instead of LONG. In FB, INTEGER has a different size in 64-bit, but C++ int data type is 32-bit  always. I always avoid to use FB's INTEGER because it can be confusing.

Try with this one:


Type SCNotification
   hdr                  As Sci_NotifyHeader
   position             As LONG
   ch                   As LONG
   modifiers            As LONG
   modificationType     As LONG
   lpText               As ZString Ptr
   length               As LONG
   linesAdded           As LONG
   message              As LONG
   wParam               As WPARAM
   lParam               As LPARAM
   nLine                As LONG
   foldLevelNow         As LONG
   foldLevelPrev        As LONG
   margin               As LONG
   listType             As LONG
   x                    As LONG
   y                    As LONG
   token                As LONG
   annotationLinesAdded As LONG
   updated              As LONG
End Type



Paul Squires

Thanks Jose, I originally had used LONG but it still failed on 64 bit. I then changed it to INTEGER thinking that the 64 bit version of Scintilla used 64 bit integers. I will try your code just to be 100% sure. I will also download the code for the 64 bit scintilla and see how they are setting up the structure.
Paul Squires
PlanetSquires Software

Paul Squires

Oh my, right you are Jose. Your version seems to work well on 64 bit. Not sure why my LONG version did not. Either way, thanks for the code and I'm happy now it's working  :)
Paul Squires
PlanetSquires Software

José Roca

The font used in the Compile Log File window is not scaled.

José Roca

There are projects mixed with files in "Recent Files". Also, no scrollbar.

José Roca

When compiling starts, you shoud display a Windows wait cursor. Otherwise, if compiling takes some time it looks like if it is doing nothing.

José Roca

Another problem with projects. If while working in a project I load a template file, the resulting Untitled* file is added to the project and can't be removed because when I click the right mouse button to try to remove it, a new Untitled* is added to the list.

José Roca

After working with a project and closing it, I have loaded a bas file draging it to the editor and compiling has failed because it tries to link the resource file of the closed project.

FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win64 (64bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target:       win64, x86-64, 64bit
compiling:    C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.BAS -o C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.c (main module)
compiling C:  C:\Users\Pepe\FreeBasic64\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -masm=intel "C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.c" -o "C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.asm"
assembling:   C:\Users\Pepe\FreeBasic64\bin\win64\as.exe --64 --strip-local-absolute "C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.asm" -o "C:\Users\Pepe\FreeBasic64\AfxTests\CGdiPlus\Bitmap\BitmapCloneArea.o"
compiling rc:               C:\Users\Pepe\FreeBasic64\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "C:\Users\Pepe\FreeBasic64\AfxTests\WinFBE_Projects\ImageCtx_Demo\Resource.obj" "C:\Users\Pepe\FreeBasic64\AfxTests\WinFBE_Projects\ImageCtx_Demo\Resource.rc"

Error!
Line 5 of Resource Script (C:\Users\Pepe\FreeBasic64\AfxTests\WinFBE_Projects\ImageCtx_Demo\Resource.RC):-
Could not find file:-
.\Resources\Manifest.xml

OBJ file not made
compiling rc failed: 'C:\Users\Pepe\FreeBasic64\bin\win64\GoRC.exe' terminated with exit code 1

Paul Squires

Hi Jose, thanks for the reports! I will work on them tomorrow and get all fixes and suggestions posted. Appreciate it!
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Jose Roca on November 28, 2016, 04:31:54 PM
There are projects mixed with files in "Recent Files". Also, no scrollbar.

I wonder if this occurred after you drag/dropped files onto the editor? There was a problem in that code that I have fixed and will upload later.
Paul Squires
PlanetSquires Software