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

To add comments, please log in or register
Terence Gronowski
5652
Terence Gronowski  

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?


Marco vd Heijden
Moderator
9574
Marco vd Heijden  
OBJPROP_STATE
nicholi shen
2394
nicholi shen  
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
To add comments, please log in or register