• Welcome to PlanetSquires Forums.
 

WinFBE using CWindow #10

Started by Paul Squires, June 23, 2016, 10:28:19 PM

Previous topic - Next topic

Paul Squires

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.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

> or (3) Clicking on the displayed compiler version in the first panel of the statusbar.

Maybe something like that for gui and console?

Paul Squires

Quote from: Jose Roca on June 24, 2016, 03:18: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 :)
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

....and probably another good one would be "debug" or "release".
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

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.


Paul Squires

Quote from: Jose Roca on June 24, 2016, 03:18: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.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

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)


José Roca

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.

Paul Squires

Quote from: Jose Roca on June 25, 2016, 03:05: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

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

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 :)

Paul Squires

LOL!  I meant to say "now" rather than "not". I edited the post and corrected it. Oops.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer