Download MetaTrader 5

#Resources problem

To add comments, please log in or register
fly7680
657
fly7680  

Hello, I'm using the #Resources command to import my logo and it works. The problem is in file ex4 because it is not embedded during compilation and if the logo is not in its folder it does not work.

         // Global scope
         #resource "\\Images\\Logo2.bmp"


         // int OnCalculate(....){...
         ObjectCreate    (0,"logo", OBJ_BITMAP_LABEL,0,0,0);
         ObjectSetString (0,"logo", OBJPROP_BMPFILE, "\\Images\\Logo.bmp");
         ObjectSetInteger(0,"logo",OBJPROP_XDISTANCE,5); 
         ObjectSetInteger(0,"logo",OBJPROP_YDISTANCE,1160); 
         ObjectSetInteger(0,"logo",OBJPROP_XSIZE,216);
         ObjectSetInteger(0,"logo",OBJPROP_YSIZE,55);
Taras Slobodyanik
18740
Taras Slobodyanik  

try to replace the backslashes with a double colon

ObjectSetString (0,"logo", OBJPROP_BMPFILE, "::Images\\Logo.bmp");
fly7680
657
fly7680  
Thanks works!
To add comments, please log in or register