BCGSuite for MFC
void CBCGPEdit::EnableCalculatorButton ( const CStringList *  plstAdditionalCommands = NULL,
const CList< UINT, UINT > *  plstExtCommands = NULL,
LPCTSTR  lpszDisplayFormat = NULL 

Enables browse button and puts the edit control in "calculator mode".

Use this method to put the edit control in "calculator browse mode". In this mode a popup calculator appears when the user clicks on the browse button.

Use EnableBrowseButton(FALSE); in order to remove the browse button.

You can provide a list of strings containing commands (names) related to additional buttons to be displayed by the popup calculator control. You'll need to override OnCalculatorUserCommand() method in order to process these custom commands.

You can provide a list of extended (advanced) commands to be displayed in the calculator control:

  • CBCGPCalculator::idCommandAdvSin
  • CBCGPCalculator::idCommandAdvCos
  • CBCGPCalculator::idCommandAdvTan
  • CBCGPCalculator::idCommandAdvX2
  • CBCGPCalculator::idCommandAdvX3
  • CBCGPCalculator::idCommandAdvExp
  • CBCGPCalculator::idCommandAdv10x
  • CBCGPCalculator::idCommandAdvLn
  • CBCGPCalculator::idCommandAdvLog
  • CBCGPCalculator::idCommandAdvPi
plstAdditionalCommandsSpecifies the list of additional buttons.
plstExtCommandsA pointer to a list of extended commands to be used in Calculator control.
lpszDisplayFormatA display format. The default format is: "%.16lf"