WinFBE on GitHub (November 12, 2016)

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

Previous topic - Next topic

Paul Squires

Quote from: Jose Roca on November 28, 2016, 02:26:48 PM
The font used in the Compile Log File window is not scaled.

My fault. I was using AfxCreateFont rather than pWindow->CreateFont.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Jose Roca on November 28, 2016, 08:45:18 PM
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

I think this was a by-product of the problem with the drag/drop code that I just fixed. I will let you see if you can reproduce it once I upload the new code. My quick test did not show a problem.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Jose Roca on November 28, 2016, 08:22:25 PM
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.

This was an interesting scenario. I have it fixed now.
Paul Squires
PlanetSquires Software

José Roca

In this function


' ========================================================================================
' Checks if the program that we are going to compile is already running
' ========================================================================================
Function IsProcessRunning( ByVal pwszExeFileName As WString Ptr ) As BOOLEAN

   Dim hSnapShot As HANDLE
   Dim pe32w As PROCESSENTRY32W

   Dim wszExeFileName As WString * MAX_PATH = Ucase(*pwszExeFileName)
   Dim wszExeProcessName As WString * MAX_PATH

   pe32w.dwSize = Sizeof(pe32w)
   hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)

   If hSnapShot <> INVALID_HANDLE_VALUE Then
      If Process32First(hSnapShot, @pe32w) Then
         GetProcessImageName( @pe32w, @wszExeProcessName )
         If Ucase(wszExeProcessName) = wszExeFileName Then
            Function = True
         Else
            Do While Process32Next(hSnapShot, @pe32w) > 0
               GetProcessImageName( @pe32w, @wszExeProcessName )
               If Ucase(wszExeProcessName) = wszExeFileName Then
                  Function = True
                  Exit Do
               End If
            Loop
         End If
      End If
   End If
   CloseHandle hSnapShot

End Function


CloseHandle hSnapShot should go before the End If, not after.


      CloseHandle hSnapShot
   End If


Paul Squires

Thanks Jose - code changed and will be uploaded shortly.
Paul Squires
PlanetSquires Software

Paul Squires

Changes uploaded to GitHub:

- Fixed: Correct font for Compiler Log output to be HighDPI aware.
- Fixed: Dropping of files onto editor (frmMain_OnDropFiles) now correctly opens regular files or projects.
- Fixed: Problem with "Utitled.bas*" files persisting in Project Explorer list even when untitled source file is closed.
- Added: Change cursor to hourglass during compile process.

Changing the cursor to hourglass is not 100% working. If mouse clicked on compile icon in toolbar then cursor does not seem to change. Maybe toolbar automatically switches the cursor back to an arrow. Elsewhere if compile is initiated then the hourglass seems to appear. Need to figure out a simple way to ensure that hourglass always appears when compile initiated.

Paul Squires
PlanetSquires Software

José Roca

#66
I have written some small projects to suplement templates. Need to be projects because they use resources.

José Roca

The explorer window has not scrollbars when displaying recent files and projects. Is it intentional?

Paul Squires

Quote from: Jose Roca on November 29, 2016, 07:06:01 PM
The explorer window has not scrollbars when displaying recent files and projects. Is it intentional?

Yes, intentional because I thought visually it would look better.... however, from a usability standpoint they should be there. I will add them in to see what they look like.
Paul Squires
PlanetSquires Software

Paul Squires

Yup, looks horrible. If I keep the scrollbars then I may as well resort back to the traditional Treeviews and not use the custom draw at all. Wish I could have implemented the custom vertical toolbar for the project explorer. It would have made that look so much nicer as well.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Jose Roca on November 29, 2016, 07:01:02 PM
I have written some small projects to suplement templates. Need to be projects because they use resources.


Wow! I just noticed your post. Awesome! Are you okay with me adding it to the download?
Paul Squires
PlanetSquires Software

José Roca

> Are you okay with me adding it to the download?

Of course.

I have noticed that when I drag and drop a project, sometimes the main file is opened in the editor and sometimes not.

Paul Squires

Quote from: Jose Roca on November 29, 2016, 07:58:02 PM
> Are you okay with me adding it to the download?

Of course.

Excellent! Thanks.

I have noticed that when I use your *.wfbe projects that the files do not open. This is because (of course) my folder structure on my computer is different than yours.

File={CURDRIVE}:\Users\Pepe\FreeBasic64\AfxTests\WinFBE_Projects\MenuWithIcons\MenuWithIcons.bas

What I need to do is save the file locations to the *.wfbe project file as relative filenames to the project file rather than absolute file names. Sounds like a interesting job and will require some work for sure.

Paul Squires
PlanetSquires Software

Paul Squires

Paul Squires
PlanetSquires Software

Paul Squires

...and of course Jose already has it in his Afx routines:  AfxPathRelativePathTo
Paul Squires
PlanetSquires Software