drWinFBE_Tools

Windows specific questions.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

Paul wrote:I don't know how much interest there is for such a thing.
That is a problem for anyone writing code for a peer support forum and I don't have an answer to it.
What are your thoughts on this type of approach?
I went over your comments a few times and reckon that the status panel approach sounds good. Of course, a "fast access to different toolchains", as UEZ wrote, cannot be faster than clicking on a radio button, which is what we do with SetCompilerPathsII. A toolchain configuration dialog also sounds good and better than editing the ini file in the Tools folder. However, that task will rarely be done and since WinFBE was not written for the great unwashed but for programmers then editing an ini file should not be intimidating.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

In another thread I found an issue using gcc (any version) in 32-bit mode with the X87. The issue seemed to be the accumulation of truncation error. How it managed to do that with an 80-bit X87 truncating to 64-bit I don't know. The problem was solved by using SSE. How that managed to solve the problem is something I don't know either.

I am still looking into this but decided not to use the X87 in 32-bit mode. It is worth noting that PowerBASIC uses the X87 and gives us no choice. Having said that, PowerBASIC cannot have a choice because it has Extended Precision available and that is 80-bit arithmetic. Of course SSE could be used for the 'lesser' data types but Bob Zale probably decided to keep life simple and use only the X87 for everything. For all I know PowerBASIC may have a problem but I cannot test it against 64-bit, there isn't one, or another 32-bit compiler, there isn't one.

Now SetCompilerSwitchesII does not know if we are going to compile source code in 32-bit mode or 64-bit mode, so I decided to use SSE across the board. Both myself and srvaldez found that 64-bit mode didn't seem concerned whether we used the X87 or SSE. It may well be that 64-bit mode does not use the X87 so requesting it by default may get ignored. Requesting SSE when it isn't required won't do any harm as it will simply be surplus to requirements so using SSE across the board should be OK. What we will get is 32-bit mode using SSE and that is what we want.

Enter SetCompilerSwitchesII (V1.04) which inserts '-fpu sse' for us.

So if we choose 32-bit, an indeterminate -arch and '-gen gcc -Wc -O2' this is what we get

Code: Select all

-fpu sse -arch 686 -gen gcc -Wc -O2
SetCompilerSwitchesII.zip

I need to edit the Help file but I have run out of my writing Help file medication and need a new prescription. I wouldn't dare attempt an edit without my pills.
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: drWinFBE_Tools

Post by UEZ »

@deltarho[1859]: Any chance to see the source code?
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

UEZ wrote:@deltarho[1859]: Any chance to see the source code?
No.
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: drWinFBE_Tools

Post by UEZ »

deltarho[1859] wrote:
UEZ wrote:@deltarho[1859]: Any chance to see the source code?
No.
No problem, actually I didn't want to reinvent the wheel, just add a few things I had posted in this topic, but the wheel is now reinvented.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

Assuming Cswitches and Cpaths are invoked immediately after WinFBE starts then WinFBE ceases to be the foreground window with either Cswitches or Cpaths in the foreground whichever loads last.

UEZ has had an issue with Cswiches and Cpaths remaining Topmost when WinFBE ceases to be the foreground window.

SetCompilerSwitchesII and SetCompilerPathsII have been updated.

This is the new protocol.

If none of WinFBE or Cswitches or Cpaths is the foreground window then both Cswitches and Cpaths cease to be Topmost. If WnFBE becomes the foreground window again then both Cswitches and Cpaths becme Topmost again.

Even just emptying the Recycle Bin, or clicking on another monitor, among others, will see Cswitches and Cpaths cease being Topmost. Clicking on WinFBE will see both Cswitches and Cpaths become Topmost again. If we open a web browser, for example, on top of WinFBE then on closing the web browser both Cswitches and Cpaths become Topmost again automatically.

SetCompilerSwitchesII.zip V1.05
SetCompilerPathsII.zip V1.04
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

The new code was working but it was inefficient. Topmost was being executed even when Topmost was true. That was easily corrected by introducing a Static Boolean IsTopmost in the WndProc function so Topmost is now only executed if IsTopmost is false.

Kept the versions the same in the last post's links.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

I have WinFBE running on a secondary monitor. FB's Help also runs on the secondary monitor. Previously, on opening Help, I had to close the two tools and open them again on returning to WinFBE. Now I did not regard that as a pain.

Now on opening Help the two tools are no longer visible. If I minimize Help I am back at WinFBE with the two tools topmost. Restoring Help and the two tools are gone again. I can quickly switch between Help and WinFBE without getting involved with the two tools.

If I had to go back to the previous versions of the two tools then that would be a pain. Image
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: drWinFBE_Tools

Post by UEZ »

Thanks for the updates.

My solution is to hook my GUI as child to WinFBE's main GUI. When I minimize WinFBE then my GUI will be minimized, too. I don't need to check if WinFBE's GUI is active or not.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

UEZ wrote:My solution is to hook my GUI as child to WinFBE's main GUI.
Sounds good.
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: drWinFBE_Tools

Post by UEZ »

deltarho[1859] wrote:
UEZ wrote:My solution is to hook my GUI as child to WinFBE's main GUI.
Sounds good.
The hooking code can be found here: viewtopic.php?f=6&t=28488&start=15#p272265
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

It's good to have options but I will stay with mine. I have both tools displaying all the time at the right-hand side of the screen and I don't code that far. Both close when WinFBE closes and now both untop & top as required.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

Funny thing happened on the way to a messagebox. Image

I was trying out a new switch in WinFBE's Compiler Setup and left it in. Next time I opened WinFBE Cswitches told me there was no string match and what it found. This is intentional, obviously, but when I clicked on OK the messagebox did not close and I had to use the Close button. This now leaves Cswitches with no radio button selected. If we click on Apply then we are told that no radio button has been selected. I had to use the Close button again.

Disabling the untopping code solves the problem. I thought returning that and then using MB_TASKMODAL would work but it didn't. What was happening was the messagebox became the foreground window so WinFBE and the two tools were not the foreground window signalling that the two tools should have their topmost status revoked. Well, Windows clearly took gross exception to that whilst it was displaying a messagebox. So, I created a global variable called BlockUntop which is set to true just before displaying a messagebox and set to false after the messagebox was given the OK. Needless to say the untopping code was stepped over until the messagebox closed. Windows is now a happy sausage and all is well again.

I have kept the version numbers as the functionality hasn't changed.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

If you have the Registers tool on board and executed it the Cswitches and Cpaths windows 'disappear'; their z-order was mistakenly set to the bottom. Corrected versions uploaded.
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: drWinFBE_Tools

Post by deltarho[1859] »

drWinFBE_Tools.chm updated to take account of recent updates to SetCompiler* user tools.

drWinFBE_Tools.chm
Post Reply