странный баг с bitmap label

 

В одном индикаторе под МТ4 (последний билд) использую класс CCanvas для отрисовки текста. Это нужно для поддержки мультиязычности и юникода, т.к. где-то с 600 билда в МТ4 поломалось отображение текста в объектах на графиках для языков отличных от системных (в региональных настройках опция - language for non-unicode programs), а с помощью CCanvas и его функций CreateBitmapLabel, TextOut юникодный текст отображается при любых региональных настройках правильно.

Но некоторые пользователи сообщают о проблеме "невидимых" bitmap label - в списке объектов они есть, но текст не видно.

Поиск по форуму ничего не дал, вот, думаю, спрошу - может еще кто-то сталкивался с подобной проблемой и знает пути решения?

Мои попытки воспроизвести этот баг у себя на аналогичных конфигурациях в виртуалке были безуспешными.

Для примера - используемый код:

#property copyright ""
#property link      ""

#property indicator_separate_window
#property indicator_buffers 0
#property indicator_minimum 0
#property indicator_maximum 1

#include <Canvas\Canvas.mqh>

CCanvas canvas_legend;


int OnInit() {
    EventSetMillisecondTimer(1000);
    return (INIT_SUCCEEDED);
}


void OnDeinit(const int reason) {
    EventKillTimer();
    canvas_legend.Destroy();
    Comment("");
}

int OnCalculate (const int rates_total,      // size of input time series
                 const int prev_calculated,  // bars handled in previous call
                 const datetime& time[],     // Time
                 const double& open[],       // Open
                 const double& high[],       // High
                 const double& low[],        // Low
                 const double& close[],      // Close
                 const long& tick_volume[],  // Tick Volume
                 const long& volume[],       // Real Volume
                 const int& spread[]         // Spread
                 ) {
    return (0);
}

void OnTimer() {
   displayLegend();
   WindowRedraw();
}


void displayLegend() {

   int subwindow=ChartWindowFind();
   if(!canvas_legend.CreateBitmapLabel(ChartID(),subwindow,"canvas_legend",30,30,500,500,COLOR_FORMAT_ARGB_NORMALIZE))
     {
      //Print("Error creating canvas: ",GetLastError());
      return;
     }
     
   canvas_legend.FontSet("Arial",20,FW_MEDIUM,0); 
   
   color backgr = ChartBackColorGet();
   uchar alpha=0;                //alpha channel managing color transparency
   //alpha=255;
   canvas_legend.Erase(ColorToARGB(backgr,alpha));
    
    string text1 = "R1, R2, R3: green_lines";
    string text2 = "S1, S2, S3: red_lines";
    string text3 = "Pivot: blue_line";
    int x=30;
    int y=30;

     canvas_legend.TextOut(x,y,text1,ColorToARGB(clrGreen,255),TA_LEFT|TA_VCENTER);
     y+=20;
     canvas_legend.TextOut(x,y,text2,ColorToARGB(clrRed,255),TA_LEFT|TA_VCENTER);
     y+=20;
     canvas_legend.TextOut(x,y,text3,ColorToARGB(clrBlue,255),TA_LEFT|TA_VCENTER);

    canvas_legend.Update();

    WindowRedraw();
}

color ChartBackColorGet(const long chart_ID=0)
  {
//--- prepare the variable to receive the color
   long result=clrNONE;
//--- reset the error value
   ResetLastError();
//--- receive chart background color
   if(!ChartGetInteger(chart_ID,CHART_COLOR_BACKGROUND,0,result))
     {
      //--- display the error message in Experts journal
      Print(__FUNCTION__+", Error Code = ",GetLastError());
     }
//--- return the value of the chart property
   return((color)result);
  }