Referencing a Button in a Panel from onTick() function?

 

I want to reference a button in a panel from the onTick() function. Just do not know how to ask for example for a button state.

I just have an ExtDialog reference, I have not CAppWindowThreeButtons reference.

class CAppWindowThreeButtons : public CAppDialog
  {
protected:
   CPositionInfo     m_position;                      // trade position object
   CTrade            m_trade;                         // trading object
   CAccountInfo      m_account;                       // account info wrapper

private:
//public:
   CButton           m_button1;                       // the button object
   CButton           m_button2;                       // the button object
   CButton           m_button3;                       // the button object

If I create an instance of the class in onTick() 

CAppWindowThreeButtons caw;

it does not work.

Anybody has an idea how to ask for a button state in a panel from onTick() function?


 
OBJPROP_STATE
 
https://www.mql5.com/en/docs/standardlibrary/controls/cbutton/cbuttonpressed
Documentation on MQL5: Standard Library / Panels and Dialogs / CButton / Pressed
Documentation on MQL5: Standard Library / Panels and Dialogs / CButton / Pressed
  • www.mql5.com
Standard Library / Panels and Dialogs / CButton / Pressed - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: