Author Topic: MIN MAX  (Read 94 times)

jcfuller

  • Full Member
  • ***
  • Posts: 146
    • View Profile
Re: MIN MAX
« Reply #15 on: July 27, 2020, 06:03:00 PM »
Robert,
  In Pauls WinFBE:

C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-8.4\inc\win\windef.bi

Code: [Select]
#define max(a, b) iif((a) > (b), (a), (b))
#define min(a, b) iif((a) < (b), (a), (b))

min or max found in these
C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-8.4\inc\Afx\

AfxCtl.inc
AfxGslComplex.inc
AfxPrinter.inc
CLayout.inc
CMaskedEdit.inc
CWindow.inc


After more research and testing I don't think it really matters. I can live with BCX MIN/MAX. One of the issues I was having was not related to the Afx library but to TCLib;which I was testing in relation the the Afx library

Thank you for your insight and research.

James

Robert

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: MIN MAX
« Reply #16 on: July 27, 2020, 06:20:46 PM »
Robert,
  In Pauls WinFBE:

C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-8.4\inc\win\windef.bi

Code: [Select]
#define max(a, b) iif((a) > (b), (a), (b))
#define min(a, b) iif((a) < (b), (a), (b))

min or max found in these
C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-8.4\inc\Afx\

AfxCtl.inc
AfxGslComplex.inc
AfxPrinter.inc
CLayout.inc
CMaskedEdit.inc
CWindow.inc


After more research and testing I don't think it really matters. I can live with BCX MIN/MAX. One of the issues I was having was not related to the Afx library but to TCLib;which I was testing in relation the the Afx library

Thank you for your insight and research.

James

Hi James:

That's good news.

Have you given any thought to using Paul's editor for your project?

Robert

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: MIN MAX
« Reply #17 on: July 27, 2020, 07:47:05 PM »
  If Robert is writing a Josť Afx BCX port then never mind.
I mentioned mine was from 2016. Would be really nice for an updated version for BCX

James

Hi James:

The only thing that I did was modify Use_Form to size from the client window using code from  AfxSetWindowClientSize. Nothing else.

You can revisit the drama and its pathetic failure here.


https://bcxbasiccoders.com/smf/index.php?topic=66.msg238#msg238


Going forward, I still think that sizing from the client window is the best and most logical idea and for my programs I revise Use_Form whenever a new version of BCX is out.

I am going to have to restudy AfxSetWindowClientSize and adapt the improvements for Use_Form. And see if there is any effect on DPI changes.

Artists paint on the canvas, not the frame. Except for Banksy ...



The code I have been using to calculate the size of a BCX_FORM from the client window was from Patrice Terrier not from AfxSetWindowClientSize which is copyrighted. Josť Roca never used max in the AfxSetWindowClientSize procedure.

jcfuller

  • Full Member
  • ***
  • Posts: 146
    • View Profile
Re: MIN MAX
« Reply #18 on: July 28, 2020, 05:18:23 AM »
Robert,
  Pauls WinFBE editor is written in and for FreeBasic only. I thought about approaching him on a port to BCX but he is not coding during the summer. Besides I really do prefer resource dialogs. With the right manifest no worry about dpi. Until BCX 7.5.1 I was using RadAsm3 but now I am using a new FbEdit hack. Well not really new because I can't find the hacked source. I probably couldn't remember how I did it anyway :)

James