PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: Paul Squires on June 23, 2016, 10:58:19 PM

Title: WinFBE using CWindow #10
Post by: Paul Squires on June 23, 2016, 10:58:19 PM
Latest source and binaries are attached. A fair amount of new functionality in this new release.

- Updated all code to replace literal value 255 with MAX_PATH.

- Change between 32 and 64 compiler easily by (1) Selecting it from the top menu; (2) Accelerator keys Ctrl+1, Ctrl+2; or (3) Clicking on the displayed compiler version in the first panel of the statusbar.

- frmGoto, frmFind, and frmReplace windows and code implemented.

Title: Re: WinFBE using CWindow #10
Post by: José Roca on June 24, 2016, 03:48:54 PM
> or (3) Clicking on the displayed compiler version in the first panel of the statusbar.

Maybe something like that for gui and console?
Title: Re: WinFBE using CWindow #10
Post by: Paul Squires on June 24, 2016, 04:41:45 PM
Quote from: Jose Roca on June 24, 2016, 03:48:54 PM
> or (3) Clicking on the displayed compiler version in the first panel of the statusbar.

Maybe something like that for gui and console?


That's a pretty good idea as well :)
Title: Re: WinFBE using CWindow #10
Post by: Paul Squires on June 24, 2016, 05:03:58 PM
....and probably another good one would be "debug" or "release".
Title: Re: WinFBE using CWindow #10
Post by: José Roca on June 24, 2016, 05:06:58 PM
There are some FB keywords, such sleep or inkey, that cause the program to hang if compiled as a gui by mistake. It would be nice if before compiling to gui, the editor will check if the program uses them and either ignore the gui option and compile it as a console application or display a warning message. Unfortunately there is not a compile gui or compile console metastatement.

Title: Re: WinFBE using CWindow #10
Post by: Paul Squires on June 25, 2016, 12:18:24 AM
Quote from: Jose Roca on June 24, 2016, 03:48:54 PM
> or (3) Clicking on the displayed compiler version in the first panel of the statusbar.

Maybe something like that for gui and console?


This is now implemented. I will upload the new source tomorrow.
Title: Re: WinFBE using CWindow #10
Post by: José Roca on June 25, 2016, 03:12:33 PM
An small modification in modCBColor.inc:


'               RoundRect lpdis->hDC, rc.Left, rc.Top, rc.Right, rc.Bottom, AfxScaleY(3), AfxScaleY(3)
               RoundRect lpdis->hDC, rc.Left, rc.Top, rc.Right, rc.Bottom, pWindow->ScaleX(3), pWindow->ScaleY(3)

Title: Re: WinFBE using CWindow #10
Post by: José Roca on June 25, 2016, 03:35:19 PM
In frmOptions.inc add code to reflect the changes


      Case IDC_FRMOPTIONS_CMDOK
         If codeNotify = BN_CLICKED Then
            SaveEditorOptions()
            Dim pDoc As clsDocument Ptr = gTTabCtl.GetActiveDocumentPtr()   ' --> added code
            IF pDoc THEN pDoc->ApplyProperties   ' --> added code
            SendMessageW HWnd, WM_CLOSE, 0, 0
            Exit Function
         End If


Would also be nice to see if there are other files loaded in the editor and also apply the changed properties to them.
Title: Re: WinFBE using CWindow #10
Post by: Paul Squires on June 25, 2016, 04:59:26 PM
Quote from: Jose Roca on June 25, 2016, 03:35:19 PM
In frmOptions.inc add code to reflect the changes


      Case IDC_FRMOPTIONS_CMDOK
         If codeNotify = BN_CLICKED Then
            SaveEditorOptions()
            Dim pDoc As clsDocument Ptr = gTTabCtl.GetActiveDocumentPtr()   ' --> added code
            IF pDoc THEN pDoc->ApplyProperties   ' --> added code
            SendMessageW HWnd, WM_CLOSE, 0, 0
            Exit Function
         End If


Would also be nice to see if there are other files loaded in the editor and also apply the changed properties to them.


Thanks Jose,

This is the code that added that will apply the properties to all loaded Scintilla windows.


         If codeNotify = BN_CLICKED Then
            SaveEditorOptions()
            ' Apply the newly saved options to all open Scintilla windows
            Dim As Long nCount = gpApp->GetDocumentCount
            Dim As Long i
            For i = 0 To nCount - 1
               gpApp->GetDocumentPtr(i)->ApplyProperties
            Next
            SendMessageW HWnd, WM_CLOSE, 0, 0
            Exit Function
         End If

Title: Re: WinFBE using CWindow #10
Post by: José Roca on June 25, 2016, 05:32:53 PM
Quote
The benefits of using that class is that the application is not fully Hight DPI aware (extremely important)

http://www.freebasic.net/forum/viewtopic.php?f=8&t=11533&p=221212#p221212

Be careful with the typos :)
Title: Re: WinFBE using CWindow #10
Post by: Paul Squires on June 25, 2016, 05:39:27 PM
LOL!  I meant to say "now" rather than "not". I edited the post and corrected it. Oops.