Skip to content

Commit

Permalink
Code upload 1.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSquires committed Sep 4, 2018
1 parent 26bf16f commit cda0ca0
Show file tree
Hide file tree
Showing 25 changed files with 114 additions and 75 deletions.
Binary file modified Help/freebasic_manual.chm
Binary file not shown.
Binary file modified Languages/LangEdit.exe
Binary file not shown.
Binary file modified Languages/LangEditSource/LangEdit.wfbe
Binary file not shown.
Binary file modified Languages/LangEditSource/frmMain.inc
Binary file not shown.
Binary file modified Languages/english.lang
Binary file not shown.
Binary file modified Sample_Projects/VisualDesigner/FormTest.wfbe
Binary file not shown.
Binary file modified Sample_Projects/VisualDesigner/frmLogon.inc
Binary file not shown.
Binary file modified Sample_Projects/VisualDesigner/logon.exe
Binary file not shown.
Binary file modified WinFBE.wfbe
Binary file not shown.
Binary file modified WinFBE32.exe
Binary file not shown.
Binary file modified WinFBE64.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions _compile32bit.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set FBLIBDIR=win32
set FBCPATH=x:\FB\WinFBE_Suite-Editor\FreeBASIC-1.06.0-win32
set FBCPATH=x:\FB\WinFBE_Suite-Editor\FreeBASIC-1.06.0

cd src
%FBCPATH%\fbc WinFBE.bas -x ..\WinFBE32.exe WinFBE.rc -s gui
%FBCPATH%\fbc32 WinFBE.bas -x ..\WinFBE32.exe WinFBE.rc -s gui
cd ..

@if ErrorLevel 1 goto compileerror
Expand Down
4 changes: 2 additions & 2 deletions _compile64bit.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set FBLIBDIR=win64
set FBCPATH=X:\FB\WinFBE_Suite-Editor\FreeBASIC-1.06.0-win64
set FBCPATH=X:\FB\WinFBE_Suite-Editor\FreeBASIC-1.06.0

cd src
%FBCPATH%\fbc WinFBE.bas -x ..\WinFBE64.exe WinFBE.rc -s gui
%FBCPATH%\fbc64 WinFBE.bas -x ..\WinFBE64.exe -O 2 WinFBE.rc -s gui
cd ..

@if ErrorLevel 1 goto compileerror
Expand Down
12 changes: 12 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Version 1.7.8 (September 4, 2018)
- Added: Resulting file size of successful compiled EXE now shows in the status bar.
- Fixed: Compile error output not correctly parsed in cases where filenames contain embedded parenthesis.
- Fixed: Situation where editing property and switching to different control could cause the property value to transfer to that control incorrectly.
- Changed: FB 32/64 compilers updated to Sept 2, 2018, nightly build.
- Changed: GCC compiler updated to version 8.1.
- Changed: Merged both 32 and 64 bit FB compilers into one folder.
- Changed: Updated code (WinFBE, WinFormsX, WinFBX) to prevent warnings due to stricter CAST type checking in latest FB nightly build compiler.
- Changed: Successful compile popup messagebox will now display in cases where only compiler warnings (and no errors) exist.
- Changed: Environment option "Hide successful compile results message" changed to "Hide compile results message (popup)". Non-English language files will need to be updated.

Version 1.7.7 (August 27, 2018)
- Added: Merged pull request from skyfish4tb for additional top tab control closing options. Thanks!
- Added: OptionButton and Frame codetips.
- Added: Form Initialize event.
- Changed: Control refresh/repaint called when Text property changed.
- Fixed: Regression: Ctrl/Shift Arrow keys not moving/resizing controls in designer.
- Fixed: Regression: GPF when ListBox row selection changed.
Expand Down
2 changes: 1 addition & 1 deletion src/WinFBE.bas
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Using Afx

#Define APPNAME WStr("WinFBE - FreeBASIC Editor")
#Define APPNAMESHORT WStr("WinFBE")
#Define APPVERSION WStr("1.7.7")
#Define APPVERSION WStr("1.7.8")

#ifdef __FB_64BIT__
#Define APPBITS WStr(" (64-bit)")
Expand Down
1 change: 0 additions & 1 deletion src/clsConfig.inc
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,6 @@ Function clsConfig.LoadConfigFile() as Long
Case "CompilerSwitches":
this.CompilerSwitches = wData
? this.CompilerSwitches, wData
Case "CompilerHelpfile": this.CompilerHelpfile = wData
Case "Win32APIHelpfile": this.Win32APIHelpfile = wData
Case "WinFBXHelpfile": this.WinFBXHelpfile = wData
Expand Down
2 changes: 1 addition & 1 deletion src/frmExplorer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ Function frmExplorer_Show( ByVal hWndParent As HWnd ) As LRESULT
TVS_INFOTIP or TVS_SHOWSELALWAYS Or TVS_FULLROWSELECT Or TVS_TRACKSELECT or _
TVS_HASBUTTONS or TVS_HASLINES or TVS_LINESATROOT, _
WS_EX_LEFT Or WS_EX_RIGHTSCROLLBAR, , _
Cast(WNDPROC, @frmExplorer_Tree_SubclassProc), IDC_FRMEXPLORER_TREE, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmExplorer_Tree_SubclassProc), IDC_FRMEXPLORER_TREE, Cast(DWORD_PTR, @pWindow))
' Use the new style Explorer Treeview (triangles instead of boxes).
' Set an undocumented extended style that enables the treeview glyphs to resize
Expand Down
2 changes: 1 addition & 1 deletion src/frmFnList.inc
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Function frmFnList_Show( ByVal hWndParent As HWnd, _
pWindow->AddControl("LISTBOX", , IDC_FRMFNLIST_LISTBOX, "", 0, 0, 0, 0, _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP Or WS_HSCROLL Or LBS_MULTICOLUMN Or LBS_NOINTEGRALHEIGHT Or _
LBS_OWNERDRAWFIXED Or LBS_HASSTRINGS Or LBS_NOTIFY, WS_EX_CLIENTEDGE Or WS_EX_LEFT Or WS_EX_RIGHTSCROLLBAR, , _
Cast(WNDPROC, @frmFnList_ListBox_SubclassProc), IDC_FRMFNLIST_LISTBOX, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmFnList_ListBox_SubclassProc), IDC_FRMFNLIST_LISTBOX, Cast(DWORD_PTR, @pWindow))
' Can not use a variable height multicolumn listbox because Microsoft says the following:
' " The LBS_MULTICOLUMN and LBS_OWNERDRAWVARIABLE styles cannot be combined. If both are "
Expand Down
17 changes: 13 additions & 4 deletions src/frmMain.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1882,16 +1882,25 @@ End Function
' ========================================================================================
Function frmMain_OnActivateApp(ByVal HWnd As HWnd, ByVal fActivate As BOOLEAN, ByVal dwThreadId As DWORD) As LRESULT
Dim pDoc As clsDocument Ptr
' If the application is losing focus then validate any currently editing peroperty
' in the ToolBox PropertyList.
If fActivate = false Then
pDoc = gTTabCtl.GetActiveDocumentPtr()
DisplayPropertyList(pDoc)
exit function
end if
' If the application is gaining focus then determine if any of the loaded
' documents have been modified by an external application. If yes, then ask
' the user if wish to reload.
If fActivate Then
If fActivate = true Then
' Search all loaded documents
Dim As FILETIME ft
Dim As Long i, idx, nDocumentCount
Dim As Double nSerial
Dim As String sText
Dim pDoc As clsDocument Ptr
for idx = 0 to gApp.GetProjectCount
Expand Down Expand Up @@ -2528,7 +2537,7 @@ Function frmMain_Show( ByVal hWndParent As HWnd, _
IDC_FRMMAIN_TOPTABCONTROL, "", 0, 0, 0, 24, _
WS_CHILD Or WS_TABSTOP Or TCS_SINGLELINE Or TCS_RAGGEDRIGHT Or TCS_HOTTRACK Or _
TCS_TABS Or TCS_FOCUSNEVER Or TCS_FORCEICONLEFT, WS_EX_LEFT Or WS_EX_LTRREADING, , _
Cast(WNDPROC, @frmMain_TabCtl_SubclassProc), IDC_FRMMAIN_TOPTABCONTROL, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmMain_TabCtl_SubclassProc), IDC_FRMMAIN_TOPTABCONTROL, Cast(DWORD_PTR, @pWindow))

' Create the imagelist for the TopTabControl tabs
cx = 16 * (pWindow->DPI \ 96)
Expand Down Expand Up @@ -2645,8 +2654,8 @@ Function frmMain_Show( ByVal hWndParent As HWnd, _
if GetDlgCtrlID(GetFocus) = IDC_SCINTILLA then
if uMsg.wParam = VK_DELETE then
frmMain_OnCommand(HWND_FRMMAIN, IDM_DELETE, 0, 0)
continue do
end if
continue do
end if
end if
end if
Expand Down
4 changes: 2 additions & 2 deletions src/frmOutput.inc
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Function frmOutput_Show( ByVal hWndParent As HWnd ) As LRESULT
pWindow->AddControl("LISTVIEW", , IDC_FRMOUTPUT_LISTVIEW, "", 0, 0, 0, 0, _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP Or LVS_REPORT Or LVS_SHOWSELALWAYS or LVS_SINGLESEL, _
WS_EX_LEFT Or WS_EX_RIGHTSCROLLBAR, , _
Cast(WNDPROC, @frmOutput_Listview_SubclassProc), IDC_FRMOUTPUT_LISTVIEW, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmOutput_Listview_SubclassProc), IDC_FRMOUTPUT_LISTVIEW, Cast(DWORD_PTR, @pWindow))
' Make the listview header flat
ListView_MakeHeaderFlat(hLV)
Expand Down Expand Up @@ -428,7 +428,7 @@ Function frmOutput_Show( ByVal hWndParent As HWnd ) As LRESULT
pWindow->AddControl("LISTVIEW", , IDC_FRMOUTPUT_LVTODO, "", 0, 0, 0, 0, _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP Or LVS_REPORT Or LVS_SHOWSELALWAYS or LVS_SINGLESEL, _
WS_EX_LEFT Or WS_EX_RIGHTSCROLLBAR, , _
Cast(WNDPROC, @frmOutput_Listview_SubclassProc), IDC_FRMOUTPUT_LVTODO, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmOutput_Listview_SubclassProc), IDC_FRMOUTPUT_LVTODO, Cast(DWORD_PTR, @pWindow))

' Make the listview header flat
ListView_MakeHeaderFlat(hLV)
Expand Down
2 changes: 1 addition & 1 deletion src/frmRecent.inc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Function frmRecent_Show( ByVal hWndParent As HWnd ) As LRESULT
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP Or _
TVS_SHOWSELALWAYS Or TVS_FULLROWSELECT Or TVS_TRACKSELECT, _
WS_EX_LEFT Or WS_EX_RIGHTSCROLLBAR, , _
Cast(WNDPROC, @frmRecent_Tree_SubclassProc), IDC_FRMRECENT_TREEVIEW, Cast(DWORD_PTR, @pWindow))
Cast(SUBCLASSPROC, @frmRecent_Tree_SubclassProc), IDC_FRMRECENT_TREEVIEW, Cast(DWORD_PTR, @pWindow))
Dim As HFONT hFont = pWindow->CreateFont("Segoe UI", 9)
SendMessage( hTree, WM_SETFONT, Cast(WPARAM, hFont), CTRUE )
Expand Down
117 changes: 68 additions & 49 deletions src/modCompile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ Function code_Compile( ByVal wID As Long ) As BOOLEAN
pDoc = gTTabCtl.GetActiveDocumentPtr()
if pDoc THEN SciExec( pDoc->hWindow(0), SCI_SETCURSOR, SC_CURSORWAIT, 0 )
' If this is a project then we need to compile all of the modules first
' in order to create the necessary *.o object files
If gApp.IsProjectActive Then
Expand Down Expand Up @@ -730,6 +729,7 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
End If
' Check for any compiler warnings
Error_Start = 0
IsWarning = Instr(wst_ucase, WSTR(") WARNING "))
If IsWarning Then Error_Start = IsWarning
IsError = Instr(wst_ucase, WSTR(") ERROR "))
Expand All @@ -740,16 +740,21 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
'c:\freebasic\test.bas(1394) warning 1(1): Passing scalar as pointer, at parameter 2 (hwndOldFocus) of ONSETFOCUS()
'sample error message
'c:\freebasic\test.bas(17) error 41: Variable not declared, kjljjada in 'kjljjada Error'
Parenthesis_Start = Instr(1, wst, WSTR("("))
Parenthesis_End = Instr(Parenthesis_Start, wst, WSTR(")"))
If (Parenthesis_Start < Parenthesis_End) And _
(Parenthesis_End <= Error_Start) And _
(Error_Start > 0) Then
wst1 = AfxStrParse(wst, 1, WSTR("(")) ' filename
' Determine the line number. Error_Start variable holds the position of the closing
' parenthesis of the line number. We simply need to reverse search from there for the
' opening parenthesis.
' 2018-08-29: Code updated to handle case of embedded parenthesis in file name
Parenthesis_End = Error_Start
Parenthesis_Start = InStrRev(wst, WSTR("("), Parenthesis_End)
If (Parenthesis_Start < Parenthesis_End) Andalso _
(Parenthesis_End <= Error_Start) then
wst1 = left(**wst, Parenthesis_Start-1) ' filename
wst2 = Mid( **wst, Parenthesis_Start + 1, Parenthesis_End - Parenthesis_Start - 1) ' line#
wst3 = Mid( **wst, Error_Start + 1) ' error message
' If this is a visual designer form file then we need to modify the line
' number based on the error offset number.
dim as long idx = gApp.GetActiveProjectIndex()
Expand All @@ -769,7 +774,7 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
FF_ListView_InsertItem( hLV, NumWarnings+NumErrors, 0, wst2 ) ' line#
FF_ListView_InsertItem( hLV, NumWarnings+NumErrors, 1, wst1 ) ' filename
FF_ListView_InsertItem( hLV, NumWarnings+NumErrors, 2, wst3 ) ' error message
If IsWarning Then
NumWarnings = NumWarnings + 1
ElseIf IsError Then
Expand All @@ -779,6 +784,7 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
NumErrors = NumErrors + 1
End If
End If
End If
Next
Expand All @@ -789,40 +795,13 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
' the Output window (log file).
If fGoodCompile = False Then NumErrors = NumErrors + 1
dim as CWSTR cwsCompileMsg = L(193, "Errors:") & " " & NumErrors & " " & _
L(192, "Warnings:") & " " & NumWarnings
dim as CWSTR cwsCompileMsg
If (NumWarnings = 0) AndAlso (NumErrors = 0) Then
' Hide the Output window is already open but there is no longer any warnings
' or errors to show in the listview. Only close if the listview is active. Do not
' close if the user is looking at the logfile textbox.
if bAllowSuccessMessage then ' we are not compiling modules
if IsWindowVisible(HWND_FRMOUTPUT) THEN
if TabCtrl_GetCurSel( GetDlgItem(HWND_FRMOUTPUT, IDC_FRMOUTPUT_TABCONTROL) ) = 0 THEN
ShowWindow( HWND_FRMOUTPUT, SW_HIDE )
frmMain_PositionWindows(HWND_FRMMAIN)
END IF
END IF
cwsCompileMsg = cwsCompileMsg + " [ " + gCompile.OutputFilename + " ]"
SetCompileStatusBarMessage( cwsCompileMsg, ghIconGood )
If gConfig.HideCompile = False Then
wst = wszOutputMsg & vbCrLf & _
L(194,"Primary Source:") & " " & gCompile.MainFilename & vbCrLf & _
L(195,"Target Compilation:") & " " & gCompile.OutputFilename & vbCrLf & _
L(196,"Compile Time:") & " " & Format(gCompile.EndTime-gCompile.StartTime, "###0.0") & " " & L(198,"seconds") & "." & vbCrLf & _
L(197,"File Size:") & " " & FileLen(gCompile.OutputFilename) & " " & L(199,"bytes") & "."
MessageBox( HWND_FRMMAIN, wst, L(191,"Compiler Results"), MB_ICONINFORMATION Or MB_OK)
else
' Simply sound a success
MessageBeep(MB_OK)
End If
end if
Else
' There were errors and/or warnings
If NumErrors > 0 Then gCompile.RunAfterCompile = False
cwsCompileMsg = cwsCompileMsg + " [" + Format(Now, "yyyy-mm-dd h:mm:ss AM/PM") & "]"
' In all cases where warnings and/or errors exist, we will show the Compiler Results listview
If (NumWarnings > 0) orelse (NumErrors > 0) then
cwsCompileMsg = L(193, "Errors:") & " " & NumErrors & " " & _
L(192, "Warnings:") & " " & NumWarnings & _
" [" & Format(Now, "yyyy-mm-dd h:mm:ss AM/PM") & "]"
SetCompileStatusBarMessage( cwsCompileMsg, ghIconBad )
MessageBeep(MB_ICONWARNING)
Expand All @@ -844,13 +823,53 @@ function ParseLogForError( byref wsLogSt as CWSTR, _
frmMain_PositionWindows(HWND_FRMMAIN)
' Set to error line position only after all windows have been shown and resized
SetDocumentErrorPosition(hLV, wID)
' If Errors have occurred then return TRUE. We will allow processing
' tocontinue if only Warnings occurred.
if NumErrors > 0 then return true
End If
end if
' If there were no errors or warnings then close any previously open compiler results listviews
If (NumWarnings = 0) andalso (NumErrors = 0) then
if IsWindowVisible(HWND_FRMOUTPUT) THEN
if TabCtrl_GetCurSel( GetDlgItem(HWND_FRMOUTPUT, IDC_FRMOUTPUT_TABCONTROL) ) = 0 THEN
ShowWindow( HWND_FRMOUTPUT, SW_HIDE )
frmMain_PositionWindows(HWND_FRMMAIN)
END IF
END IF
end if
If NumErrors = 0 Then
' 2018-08-29: Show popup compile message in cases where no errors but warnings may exist.
' Hide the Output window is already open but there is no longer any warnings
' or errors to show in the listview. Only close if the listview is active. Do not
' close if the user is looking at the logfile textbox.
if bAllowSuccessMessage then ' we are not compiling modules
cwsCompileMsg = L(193, "Errors:") & " " & NumErrors & " " & _
L(192, "Warnings:") & " " & NumWarnings & _
" [ " & gCompile.OutputFilename & " " & _
FileLen(gCompile.OutputFilename) & " " & L(199,"bytes") & _
"]"
SetCompileStatusBarMessage( cwsCompileMsg, ghIconGood )
If gConfig.HideCompile = False Then
wst = wszOutputMsg & vbCrLf & _
L(194,"Primary Source:") & " " & gCompile.MainFilename & vbCrLf & _
L(195,"Target Compilation:") & " " & gCompile.OutputFilename & vbCrLf & _
L(196,"Compile Time:") & " " & Format(gCompile.EndTime-gCompile.StartTime, "###0.0") & " " & L(198,"seconds") & "." & vbCrLf & _
L(197,"File Size:") & " " & FileLen(gCompile.OutputFilename) & " " & L(199,"bytes") & "."
MessageBox( HWND_FRMMAIN, wst, L(191,"Compiler Results"), MB_ICONINFORMATION Or MB_OK)
else
' Simply sound a success
MessageBeep(MB_OK)
End If
end if
End if
' If Errors have occurred then return TRUE. We will allow processing
' to continue if only Warnings occurred.
' There were errors then do not allow running the EXE (warnings are okay)
If NumErrors > 0 Then
gCompile.RunAfterCompile = False
return true
end if
function = false
end function
Expand Down
2 changes: 1 addition & 1 deletion src/modRoutines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ Function AfxIFileOpenDialogW( ByVal hwndOwner As HWnd, ByVal idButton As Long) A
Case IDC_FRMOPTIONSCOMPILER_CMDFBWIN32, IDC_FRMOPTIONSCOMPILER_CMDFBWIN64
rgFileTypes(1).pszName = @L(100,"FB Compiler")
rgFileTypes(1).pszSpec = @WSTR("fbc.exe")
rgFileTypes(1).pszSpec = @WSTR("fbc*.exe")
rgFileTypes(2).pszName = @L(230,"Executable")
rgFileTypes(2).pszSpec = @WSTR("*.exe")
rgFileTypes(3).pszName = @L(79,"All files")
Expand Down
2 changes: 1 addition & 1 deletion src/modVDControls.inc
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function CreateToolboxControl( byval pDoc as clsDocument ptr, _
pCtrl->hWindow = pWindow->AddControl( GetControlClassName(pCtrl), , 100, wszDefaultControlName, _
rcDraw.left, rcDraw.top, rcDraw.right-rcDraw.left, rcDraw.bottom-rcDraw.top, _
dwStyle, dwExStyle, , _
CAST(WNDPROC, @Control_SubclassProc), ControlType, CAST(DWORD_PTR, pDoc))
CAST(SUBCLASSPROC, @Control_SubclassProc), ControlType, CAST(DWORD_PTR, pDoc))
end select
END IF

Expand Down
Loading

0 comments on commit cda0ca0

Please sign in to comment.