Menu

Stingray Calculator

Soren Bro
2018-09-29
2018-09-30
  • Pete Maclean

    Pete Maclean - 2018-09-29

    Even as a 20+ year user of Eudora, I would not be surprised if the program has a few features that I have not happened upon. Indeed, in my work on Hermes, I have already found a couple of .ini-file keys that are not documented. However, if Eudora had a calculator I do think I would know about it. And I do not know of such a thing. So, to be absolutely sure it might be wise to ask on one of the Eudora mailing lists, but I feel sure enough that I would make Hermes calculator-less.

     
    • Soren Bro

      Soren Bro - 2018-09-29

      /////////////////////////////////////////////////////////////////////////////
      // SecCalc.h : header file for the SECCalculator and SECPopupCalculator
      // custom controls
      //
      // Stingray Software Extension Classes
      // Copyright (C) 1996-1997 Stingray Software Inc,
      // All rights reserved.
      //
      // This source code is only intended as a supplement to the
      // Stingray Extension Classes
      // See the Stingray Extension Classes help files for
      // detailed information regarding using SEC classes.
      //
      // Author: Don 20/01/97
      //

      ifndef SECCALC_H

      define SECCALC_H

      ifdef WIN32

      // SEC Extension DLL
      // Initialize declaration context
      //

      ifdef _SECDLL

      undef AFXAPP_DATA

      define AFXAPP_DATA AFXAPI_DATA

      undef AFX_DATA

      define AFX_DATA SEC_DATAEXT

      endif //_SECDLL

      // SECCalculator styles

      define SEC_CS_RAISEDEDGE 0x0001L // Same look as WS_EX_WINDOWEDGE

      // except compatible with Win 3.

      define SEC_CS_DIVIDER 0x0002L // Divider at top of calculator

      // SECPopupCalculator style

      define SEC_PCS_DESTROY_ON_EQUALS 0x0010L // Popup calculator destroyed

      // everytime equals is pressed.

      // Forward references ...
      class SECCalcBtn;

      /////////////////////////////////////////////////////////////////////////////
      // SECCalculator window
      //
      class SECCalculator : public CWnd
      {
      DECLARE_DYNAMIC(SECCalculator)

      // Construction
      public:
      SECCalculator();

      BOOL Create(DWORD dwStyle, int x, int y, CWnd pParentWnd, UINT nID,
      CCreateContext
      pContext = NULL);

      BOOL CreateEx(DWORD dwExStyle, DWORD dwStyle, int x, int y,
      CWnd pParentWnd, UINT nID, CCreateContext pContext = NULL);

      // Attributes
      public:
      // List of calculator functions/buttons
      enum SECCalcOp
      {
      OpNull = 0, // No operation
      OpMultiply = 1, // Multiply operator
      OpPlus = 2, // Plus operator
      OpMinus = 3, // Minus operator
      OpDivide = 4, // Divide operator
      OpPercent = 5, // Percentage operator
      OpEquals = 6, // Equals operator
      OpC = 7, // Clear function
      OpCE = 8, // Clear error function
      Op0 = 9, // Decimal digit 0
      Op1 = 10, // Decimal digit 1
      Op2 = 11, // Decimal digit 2
      Op3 = 12, // Decimal digit 3
      Op4 = 13, // Decimal digit 4
      Op5 = 14, // Decimal digit 5
      Op6 = 15, // Decimal digit 6
      Op7 = 16, // Decimal digit 7
      Op8 = 17, // Decimal digit 8
      Op9 = 18, // Decimal digit 9
      OpDP = 19, // Decimal place
      OpBack = 20, // Delete last character

      // Operations not yet implemented
      OpMPlus = 21, // Memory add
      OpMMinus = 22, // Memory subtract
      OpM = 23, // Places current number into memory
      OpMRecall = 24, // Memory recall
      OpSqrt = 25, // Square root

      // Operations for user use only
      OpUser1 = 100,
      OpUser2 = 101,
      OpUser3 = 102,
      OpUser4 = 103,
      OpUser5 = 104,
      OpUser6 = 105,
      OpUser7 = 106,
      OpUser8 = 107
      };

      // Operations
      public:
      // Invalidates the button at the given index.
      void InvalidateBtn(int nIndex, BOOL bErase = FALSE);

      // Invalidates the LCD panel
      void InvalidatePanel(BOOL bErase = FALSE);

      // Resets the calculator back to a "zero" state
      void ResetCalc();

      // Returns the index of the button under the given point
      int HitTest(CPoint point) const;

      // Set/Get the current calculator value
      void SetValue(double val);
      double GetValue() const;

      // Set the maximum number of decimal places to be displayed
      void SetDecimalPlaces(int nDP);
      int GetDecimalPlaces() const;

      // Overrides
      protected:
      virtual BOOL CreateBtns(CWnd pParentWnd);
      virtual BOOL CreatePanel(CWnd
      pParentWnd);
      virtual BOOL HandleEvent(SECCalcOp op);

      // ClassWizard generated virtual function overrides
      //{{AFX_VIRTUAL(SECCalculator)
      //}}AFX_VIRTUAL

      // Implementation

      ...
      etc...
      ....

      Also,CalcBtn.h

      Ican\t find references to these files. Perhaps maybe except AccountWizard.
      But Im not entirely sure. Which may sound a little strange. How hard can it
      be to "Find in files...", right?
      But there you are.

      Regards.

      On Sat, Sep 29, 2018 at 1:13 PM Pete Maclean petemaclean@users.sourceforge.net wrote:

      Even as a 20+ year user of Eudora, I would not be surprised if the program
      has a few features that I have not happened upon. Indeed, in my work on
      Hermes, I have already found a couple of .ini-file keys that are not
      documented. However, if Eudora had a calculator I do think I would know
      about it. And I do not know of such a thing. So, to be absolutely sure it
      might be wise to ask on one of the Eudora mailing lists, but I feel sure
      enough that I would make Hermes calculator-less.


      Stingray Calculator
      https://sourceforge.net/p/hermesmail/discussion/general/thread/b7ca8a9c44/?limit=25#df0c


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/hermesmail/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.