Author Topic: The Derivator  (Read 2680 times)

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
The Derivator
« on: October 14, 2016, 12:20:22 PM »
Hi!

This is a project that is evolving very slow, but begin to acomplish some objetives:
  • derivation of equation
  • Interface with an improved GridW object
  • a simple coloring subclass of Richedit

The rework of solution still is very bad   :biggrin: , but it's posible make some test (at least interface). And perhaps Rui could detect some miscalculation. For every variable there is 2 lines: the raw derivative and the reworked solution.

Of course will be more interesting with the code, but that will take me some time (it's a mess now).

Regards.HSE   

Nothing importat, I forget the instructions:
Variables are lower case letters except "e", letters between angle brackets are constant, numbers without point are integer, with point are floating, the functions now are ln, log2, log10, sin, cos, tg, arcsin, arccos, arctg and exp.


------------------------------------------------
Updated file 10/06/2017 (build BN10A222) :
------------------------------------------------

The file include interface sources and .res file.
(Still not correctly running the cleanner  8) )
Ml or AsmC. Use makeIt.bat
« Last Edit: June 11, 2017, 05:23:48 AM by HSE »

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 113
  • ObjAsm32
    • ObjAsm32
Re: The Derivator
« Reply #1 on: October 14, 2016, 05:04:56 PM »
Impressive, really cool  :t

Btw, there is a minor glitch on the upper inner window (blue) when you resize the app main window. A white horizontal strip appears on the lower half of the equation window.

Regards, Biterider

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #2 on: October 14, 2016, 11:33:56 PM »
Thanks Biterider!!

Is good to know that the problem is not only here. I think the line is related with the margins I increased, surelly the scroll in Richedit don't manage automatically that.  Something to investigate!

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: The Derivator
« Reply #3 on: October 15, 2016, 03:01:32 AM »
The white ribbon occurs only occasionally here (W7-64). But there is a lot of flicker. Style is only WS_CHILD? What about ws_clip* etc?

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #4 on: October 15, 2016, 04:07:33 AM »
Good point JJ!!

Code: [Select]
WS_CHILD or WS_VISIBLE or ES_MULTILINE or WS_VSCROLL or WS_BORDER or WS_TABSTOP
 These styles in Richedit allow wordwrap. I remember now there was an extended topic about flickering. I will try to find it. :t

The "white" ribbon is some error using EM_SETRECTNP when scroll is activated. I don't saw in the "dark" machine but perhaps is there.

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: The Derivator
« Reply #5 on: October 15, 2016, 04:55:31 AM »
You need or WS_CLIPCHILDREN when creating the main window, and
or WS_CLIPSIBLINGS when creating the controls.

invoke SendMessage, hRichEdit, EM_SETTARGETDEVICE, 0, 0 sets word wrap on.

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #6 on: October 15, 2016, 08:54:59 AM »
Thanks JJ!

WS_CHILD style was alone. :(

There are main, sub-main, sub-sub-main and control window  :biggrin:.

  • EquAsm32
    • EquAsm    <-----   here intercepting WM_ERASEBKGND make a big difference
      • GridW                      <-----------  no problem here because WS_EX_TRANSPARENT
        • Controls

The "white" ribbon disappear if there is no bottom margin.

Updated file is in first post.
« Last Edit: October 16, 2016, 01:26:28 AM by HSE »

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 113
  • ObjAsm32
    • ObjAsm32
Re: The Derivator
« Reply #7 on: October 15, 2016, 05:11:30 PM »
Hi Hector
This new update seems to solve the problem of the white band. I tested it on Win10.  :icon14:
Biterider

jj2007

  • Member
  • *****
  • Posts: 7558
  • Assembler is fun ;-)
    • MasmBasic
Re: The Derivator
« Reply #8 on: October 15, 2016, 08:32:12 PM »
Perfect, no more flicker, no white band :t

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #9 on: October 16, 2016, 01:27:07 AM »
Thanks  :t

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The Derivator
« Reply #10 on: October 16, 2016, 09:03:10 AM »
Hi HSE,
              Very well  :t
              Now you need to test it writing a lot of expressions.
              Go on !

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #11 on: October 21, 2016, 09:34:50 AM »
Hi! Still with interface  :icon_eek: !!

   Now it's posible to change colors. Modifications are stored in a ".ini" file when application exit. (Binary in updated in first post)

  In making a new dialog, I found Resguard alert a leak in ColorButton . With minor modification there is  no more leak, but surely need to be more evaluated.

Regards. HSE

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 113
  • ObjAsm32
    • ObjAsm32
Re: The Derivator
« Reply #12 on: October 21, 2016, 06:14:49 PM »
Thanks, I'll look into it.

Biterider

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #13 on: November 29, 2016, 11:42:24 AM »
Just a little better the cleaner.

There are some... insignificant... crashes  :biggrin: Curiously don't happen when ObjAsm32 debug mode is activated  ::)

Update in first post. Regards.

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: The Derivator
« Reply #14 on: December 30, 2016, 12:22:59 AM »
I think now it's working correctly, at least better.

But I still not finded what was wrong with the debug system.

Update in first post. Regards.