I am new to the Panel. I tried the documentation but failed to find reference to make it work.
Here I am trying to add an icon to the caption area before Dialogue box name with bitmap image control. But failed to move it above the clientback area. How to get access to that area.
#include <Controls\Dialog.mqh>
#include <Controls\Picture.mqh>
//+------------------------------------------------------------------+//| Global parameters |//+------------------------------------------------------------------+int panelXX = 20;
int panelYY = 20;
int panelWidth = 300;
int panelHeight = 300;
//+------------------------------------------------------------------+//| Global variabels |//+------------------------------------------------------------------+//--- Panel itself
CAppDialog m_panel;
CPicture ic;
//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
m_panel.Create(0,"TEST PANEL",0,panelXX,panelYY,panelWidth,panelHeight);
ic.Create(0,"Icon",0,0,0,20,20);
ic.BmpName("icobmp.bmp");
m_panel.Add(ic);
//--- Run panel
m_panel.Run();
//--- succeedreturn(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime &time[],
constdouble &open[],
constdouble &high[],
constdouble &low[],
constdouble &close[],
constlong &tick_volume[],
constlong &volume[],
constint &spread[])
{
//---//--- return value of prev_calculated for next callreturn(rates_total);
}
//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
//--- Destroy panel
m_panel.Destroy(reason);
//--- Delete all objectsObjectsDeleteAll(0,0);
Comment("");
}
//+------------------------------------------------------------------+//| Expert chart event function |//+------------------------------------------------------------------+voidOnChartEvent(constint id, // event IDconstlong& lparam, // event parameter of the long typeconstdouble& dparam, // event parameter of the double typeconststring& sparam) // event parameter of the string type
{
//--- Move the panel with the mouse
m_panel.ChartEvent(id,lparam,dparam,sparam);
}
//+------------------------------------------------------------------+//+------------------------------------------------------------------+
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello Members,
I am new to the Panel. I tried the documentation but failed to find reference to make it work.
Here I am trying to add an icon to the caption area before Dialogue box name with bitmap image control. But failed to move it above the clientback area. How to get access to that area.
Thank you in advance.