When EA is starting you can choose which image to be placed ( enum with 1,2,3 options) and obj bitmap label will be created.
I have custom obj bitmap function like this made from standard BitmapLabelCreate function.
bool BitmapImagePlace(conststring filename)
{
BitmapLabelCreate
(
0, //const long chart_ID, // chart's ID
"Bitmap", //const string name, // label name
0, //const int sub_window, // subwindow index
10, //const int x, // X coordinate
10, //const int y, // Y coordinate
filename, //const string file, // image in On mode
0, //const int width, // visibility scope X coordinate
0, //const int height, // visibility scope Y coordinate
0, //const int x_offset, // visibility scope shift by X axis
0, //const int y_offset, // visibility scope shift by Y axis
0, //const bool state, // pressed/released
CORNER_LEFT_UPPER, //const ENUM_BASE_CORNER corner, // chart corner for anchoring
ANCHOR_LEFT_UPPER, //const ENUM_ANCHOR_POINT anchor, // anchor type
clrRed, //const color clr, // border color when highlighted
STYLE_SOLID, //const ENUM_LINE_STYLE style, // line style when highlighted
1, //const int point_width, // move point size
false, //const bool back, // in the background
false, //const bool selection, // highlight to move
false, //const bool hidden, // hidden in the object list
0 //const long z_order) // priority for mouse click
);
return(true);
}
I have different bitmap files which need to be placed on the chart.
For each bitmap I created #resource and #define, like
When EA is starting you can choose which image to be placed ( enum with 1,2,3 options) and obj bitmap label will be created.
I have custom obj bitmap function like this made from standard BitmapLabelCreate function.
I need something like
if enum is 1, then filename = bmp1
if enum is 2, then filename = bmp2
if enum is 3, then filename = bmp3