Gallery of UIs written in MQL - page 46

 
Edgar Akhmadeev #:
...

7. One more thing. Your dynamic window is a peer window that can be expanded and minimised. I would like not a window, but a desktop. Like your constructor. So that it

a) open immediately expanded, covering the entire chart

b) not have a header and frame (only a taskbar)

c) could not be collapsed

d) allowed to place elements like a normal window

That is, replace DINAMIC with FULLSCREEN or DESKTOP. You already have the basis for this.


After the release of dynamic window I will think about this option, as I understand that it is reasonable in conditions of small laptop screen.
 
Реter Konow #:
I will continue a little later.

KIB-code of windows included in the release (continued):

//----------------------------------------------------------------------------------
//DECLARE A NEW WINDOW
//----------------------------------------------------------------------------------
NEW_WINDOW,  
//------------------------------------------------------
/*SET WINDOW TYPE*/               W_TYPE, SETTINGS,  
//------------------------------------------------------
/*WRITE WINDOW'S NAME*/           W_NAME, "Settings example 2",
//------------------------------------------------------
/*POINT TO WINDOW'S ICON*/        W_ICON, "::Images\\16x16\\Application.bmp",  
//------------------------------------------------------
/*PLACE THE NAME IN THE MIDDLE*/  NIM,
//------------------------------------------------------
//------------------------------------------------------
/*SET WINDOW'S ADDITIONAL PROPERTIES*/   
//----------------------------------------------------------------------------------
/*WINDOW OPENS AT START*/   OPEN_ON_INIT,  /*(OOI)*/

/*MARGINS OF THE WINDOW*/   MARGINS, 20,20,/*Х, Y*/
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,

//----------------------------------------------------------------------------------------------------------
__,  BOARD, "Choose between few options:",      GAP, 65,              BOARD, "Insert text for each option:",
//----------------------------------------------------------------------------------------------------------
GAP, 10,
//---------------------------------------------------------------------------------------------------------- 
__, H_SEP,A,   W,355,    
//----------------------------------------------------------------------------------------------------------
__, R_BUTTON,"Choose option 1", ON,    _,A_TEXT, "Option 1 is chosen.",     EDIT, "Comment 1",  W,140,

__, R_BUTTON,"Choose option 2",        _,A_TEXT, "Option 2 is chosen.",     EDIT, "Comment 2",  W,140,

__, R_BUTTON,"Choose option 3",        _,A_TEXT, "Option 3 is chosen.",     EDIT, "Comment 3",  W,140,                 
//---------------------------------------------------------------------------------------------------------- 
__, H_SEP,A,    W,355,    
//---------------------------------------------------------------------------------------------------------- 

GAP, 20,
//----------------------------------------------------------------------------------------------------------
__,  BOARD, "Choose between given options:",  GAP, 40,     BOARD, "Choose your or given options:",                 
//----------------------------------------------------------------------------------------------------------
GAP, 10,
//----------------------------------------------------------------------------------------------------------
__, C_LIST, "C_LIST 1",  H,150,                            D_LIST, "D_LIST 1",  H,150,            
//---------------------------------------------------------------------------------------------------------- 
//---------------------------------------------------------------------------------------------------------- 
__, H_SEP,A,    W,355,    
//---------------------------------------------------------------------------------------------------------- 
//----------------------------------------------------------------------------------------------------------
END_GROUP,
//----------------------------------------------------------------------------------------------------------
i, AT, _X2X, "MF", 20, _Y2Y, "MF", 20,
//---------------------------------------
i, X_GAP, 55,
i, Y_GAP, 10,
//---------------------------------------
SWITCH, "Choose option 1", "Choose option 2", "Choose option 3",    END,
//---------------------------------------
//------------------------------------------------------ 
GROUP, A,
__,L_ITEM, "L_ITEM  1",ON,
__,L_ITEM, "L_ITEM  2",
__,L_ITEM, "L_ITEM  3",
__,L_ITEM, "L_ITEM  4",
__,L_ITEM, "L_ITEM  5",
__,L_ITEM, "L_ITEM  6",
__,L_ITEM, "L_ITEM  7",
__,L_ITEM, "L_ITEM  8",
__,L_ITEM, "L_ITEM  9",
__,L_ITEM, "L_ITEM  10",
__,L_ITEM, "L_ITEM  11",
__,L_ITEM, "L_ITEM  12",
__,L_ITEM, "L_ITEM  13",
__,L_ITEM, "L_ITEM  14",
__,L_ITEM, "L_ITEM  16",
__,L_ITEM, "L_ITEM  17",
__,L_ITEM, "L_ITEM  18",
__,L_ITEM, "L_ITEM  19",
__,L_ITEM, "L_ITEM  20",

END_GROUP,
//-------------------------
i, AT, LEFT_TOP, 0,0,
//-------------------------
i, IN,"D_LIST 1",
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, "V2 group",

__, L_ITEM,"Times_New_Roman",
__, L_ITEM,"Arial",
__, L_ITEM,"Tahoma",
__, L_ITEM,"Dali",
__, L_ITEM,"BatangChe",
__, L_ITEM,"Consolas",
__, L_ITEM,"Courier",
__, L_ITEM,"Courier_New",ON,
__, L_ITEM,"DFKai_SB",
__, L_ITEM,"DotumChe",
__, L_ITEM,"FangSong",
__, L_ITEM,"Fixedsys",
__, L_ITEM,"GulimChe",
__, L_ITEM,"GungsuhChe",
__, L_ITEM,"KaiTi",


END_GROUP,
//--------------------
i, IN,"C_LIST 1",
//--------------------
i, AT, LEFT_TOP, 1,1,
//--------------------

//----------------------------------------------------------------------------------
GROUP, A,
//----------------------------------------------------------------------------------------------------------
__, D_BUTTON, "Confirm", N_FRAME_COLOR, (int)C'51,153,255', _,CWIP, GAP,7,  D_BUTTON, "Cancel", _,CWIP, 
//---------------------------------------------------------------------------------------------------------- 
END_GROUP,
//--------------------------
i, AT, _X2X, "MF", 230, _Y2H, "D_LIST 1",  20,
//----------------------------------------------------------------------------------
//------------------------------------------------------
//FINISH THE WINDOW BY KEYWORDS END_WINDOW,
//------------------------------------------------------
END_WINDOW,
//----------------------------------------------------------------------------------
 



//----------------------------------------------------------------------------------
//DECLARE A NEW WINDOW
//----------------------------------------------------------------------------------
NEW_WINDOW,  
//------------------------------------------------------
/*SET WINDOW TYPE*/               W_TYPE, SETTINGS,  
//------------------------------------------------------
/*WRITE WINDOW'S NAME*/           W_NAME, "Input parameters:",
//------------------------------------------------------
/*POINT TO WINDOW'S ICON*/        W_ICON, "::Images\\16x16\\Tune.bmp", 
//------------------------------------------------------
/*PLACE THE NAME IN THE MIDDLE*/  NIM,
//------------------------------------------------------
/*SET COLOR OF THE BACKGROUND*/   "MF", N_COLOR,(int)C'255,255,255',
//------------------------------------------------------
/*SET WINDOW'S ADDITIONAL PROPERTIES*/   
//----------------------------------------------------------------------------------
/*WINDOW OPENS AT START*/         OPEN_ON_INIT,  /*(OOI)*/

/*MARGINS OF THE WINDOW*/         MARGINS, 15,15,/*Х, Y*/
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,
//-------------------------------------------------
__,V_BOX, "V1", W,272, _,H,200, _,N_FRAME,1,
//-------------------------------------------------
END_GROUP,
//-----------------------------------
 i, AT, _X2X, "MF", 3, _Y2Y, "MF", 5,
//-----------------------------------

//-------------------------------------------------
GROUP, A, 
//-------------------------------------------------
IS_TABLE, "Input parameters table",
//-------------------------------------------------
__, T_HEADER, "Variable",           C_HEADER,"Value",
//-------------------------------------------------
__, R_HEADER,"MAGICB",              EDIT,"MAGICB:", 
//-------------------------------------------------
__, R_HEADER,"MAGICS",              EDIT,"MAGICS:",
//-------------------------------------------------
__, R_HEADER,"s9",                  EDIT,"s9:",
//-------------------------------------------------
__, R_HEADER,"Hours_to_GMT_Offset", EDIT,"Hours_to_GMT_Offset:",
//-------------------------------------------------
__, R_HEADER,"Hours",               C_LIST,"Hours:",
//-------------------------------------------------
__, R_HEADER,"Begin_hour",          EDIT,"Begin_hour:",
//-------------------------------------------------
__, R_HEADER,"End_hour",            EDIT,"End_hour:",
//-------------------------------------------------
__, R_HEADER,"Comments",            EDIT,"Comments:",
//-------------------------------------------------

END_GROUP,
//------------------------------------
 i, AT, LEFT_TOP,1,1,
//------------------------------------
 i,IN,"V1",
//------------------------------------
 i,Y_GAP,-1,
//------------------------------------
 i,X_GAP,-1,
//------------------------------------

//------------------------------------
 i, IS_ZEBRA_STYLE,
//------------------------------------

//-----------------------------------------------------------------------------------------------------------------------------
 i, T_HEADERS,  FONT_SIZE,9, W,180,  text,_A1_,_X2X,  text,_C1_,10,                               END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, R_HEADERS,  FONT_SIZE,9, H,22,   text,_A1_,_X2X,  text,_C1_,10, text,_C2_,1,                  END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, C_HEADERS,  FONT_SIZE,9, W,90,   text,_A1_,_X2X,  text,_C1_,10, N_COLOR,(int)C'155,255,255',  END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, EDITS,      FONT_SIZE,9, W,90,   text,_C2_,1,   POINTED,0,                                    END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, C_LISTS,   FONT_SIZE,9, 
               //-----------------------------
               W,90,   
               //-----------------------------
               text,_C2_,1,   
               //-----------------------------
               POINTED,0,  
               //-----------------------------
               bar,NG_LINES,0, 
               //-----------------------------
               bar,NG_STEP,0,  
               //-----------------------------
               bar,AG_LINES,0, 
               //-----------------------------
               bar,AG_STEP,0,    
               //-----------------------------
               END,
//-----------------------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
GROUP, A,
//-------------------------------------------------
__,V_BOX, "V2", W,272, _,H,200, _,N_FRAME,1,
//-------------------------------------------------
END_GROUP,
//-----------------------------------
 i, AT, _X2W, "V1", 10, _Y2Y, "MF", 5,
//-----------------------------------

//-------------------------------------------------
GROUP, A, IS_TABLE, "Input parameters table 2",
//-------------------------------------------------
//-------------------------------------------------
__, T_HEADER, "Variable ",     C_HEADER,"Value ",
//-------------------------------------------------
//-------------------------------------------------
__, R_HEADER,"SELL",           C_LIST,  "SELL:",
//-------------------------------------------------
__, R_HEADER,"BUY",            C_LIST,  "BUY:",
//-------------------------------------------------
__, R_HEADER,"s7",             EDIT,    "s7:",
//-------------------------------------------------
__, R_HEADER,"LotMax",         EDIT,    "LotMax:",
//-------------------------------------------------
__, R_HEADER,"OnOffLock",      C_LIST,  "OnOffLock:",
//-------------------------------------------------
__, R_HEADER,"LockLevel",      EDIT,    "LockLevel:",
//-------------------------------------------------
__, R_HEADER,"AxelOption",     C_LIST,  "AxelOption:",
//-------------------------------------------------
__, R_HEADER,"LimLossMoney",   EDIT,    "LimLossMoney:",
//-------------------------------------------------

//-------------------------------------------------
END_GROUP,
//-------------------------------------------------
i, AT, LEFT_TOP,1,1,
//-----------------------
i,IN,"V2",
//-----------------------
i,Y_GAP,-1,
//-----------------------
i,X_GAP,-1,
//-----------------------

//------------------------------------
 i, IS_ZEBRA_STYLE,
//------------------------------------

//-----------------------------------------------------------------------------------------------------------------------------
 i, T_HEADERS,  FONT_SIZE,9, W,180,  text,_A1_,_X2X,  text,_C1_,10,                               END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, R_HEADERS,  FONT_SIZE,9, H,22,   text,_A1_,_X2X,  text,_C1_,10, text,_C2_,1,                  END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, C_HEADERS,  FONT_SIZE,9, W,90,   text,_A1_,_X2X,  text,_C1_,10, N_COLOR,(int)C'155,255,255',  END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, EDITS,      FONT_SIZE,9, W,90,   text,_C2_,1,   POINTED,0,                                    END,
//-----------------------------------------------------------------------------------------------------------------------------
 i, C_LISTS,   FONT_SIZE,9, 
               //-----------------------------
               W,90,   
               //-----------------------------
               text,_C2_,1,   
               //-----------------------------
               POINTED,0,  
               //-----------------------------
               bar,NG_LINES,0, 
               //-----------------------------
               bar,NG_STEP,0,  
               //-----------------------------
               bar,AG_LINES,0, 
               //-----------------------------
               bar,AG_STEP,0,    
               //-----------------------------
               END,
//-----------------------------------------------------------------------------------------------------------------------------

//------------------------------------
GROUP,A,
//----------------------
__,L_ITEM,"true",
//----------------------
__,L_ITEM,"false",
//----------------------
END_GROUP,
//------------------------------------
i, IN, "Hours:",
i, AT, LEFT_TOP, 0,0,
//------------------------------------

//------------------------------------
GROUP,A,
//-------------------
__,L_ITEM,"true ",
//-------------------
__,L_ITEM,"false ",
//-------------------
END_GROUP,
//------------------------------------
i, IN, "GameOn:",
//-------------------
i, AT, LEFT_TOP, 0,0,
//------------------------------------

//------------------------------------
GROUP,A,
//--------------------
__,L_ITEM,"true  ",
//--------------------
__,L_ITEM,"false  ",
//--------------------
END_GROUP,
//------------------------------------
i, IN, "OnOffUnLine:",
//------------------------------------
i, AT, LEFT_TOP, 0,0,
//------------------------------------
END_WINDOW,
//--------------------------------------------------------
 


//------------------------------------------------------ 
//DECLARE A NEW WINDOW
//------------------------------------------------------ 
NEW_WINDOW,  
//------------------------------------------------------
/*SET WINDOW TYPE*/             W_TYPE, DIALOG,  
//------------------------------------------------------
/*WRITE WINDOW'S NAME*/         W_NAME, "Risky managment!", 
//------------------------------------------------------
/*SET WINDOW'S CAPTION*/        CAPTION,"*Warning*", 
//------------------------------------------------------
/*NAME (CAPTION)IN THE MIDDLE*/ NIM,  
//------------------------------------------------------
/*POINT TO WINDOW'S ICON*/      W_ICON, "::Images\\16x16\\Warning.bmp",  
//------------------------------------------------------
/*ONLY CLOSING BUTTON*/         ONLY_CLOSING, 
//------------------------------------------------------
/*WINDOW ALWAYS ON TOP*/        ALWAYS_ON_TOP, 
//------------------------------------------------------
/*OPEN WINDOW WITH A SOUND*/    OPENING_SOUND,"::Sounds\\Windows Critical Stop.wav", 
//------------------------------------------------------ 
/*WINDOW OPENS AT START*/       //OPEN_ON_INIT,  /*(OOI)*/
//------------------------------------------------------
/*LOCK WINDOWS IF OPENED*/      LOCKS_WINDOWS, ALL_WINDOWS,   
//------------------------------------------------------
/*MARGINS OF THE WINDOW*/       MARGINS, 20,20,/*Х, Y*/
//------------------------------------------------------ 

//----------------------------------------------------------------------------------
GROUP, A,
//--------------------------------------------
__, T_BOX, "T1", TEXT,
                //--------------------------------
                "Risky settings can cause loss.",
                //--------------------------------
                END,
//--------------------------------------------
END_GROUP,
//--------------------------------------------
i, AT, _X2X, "MF", 1, _Y2Y, "MF", 1,
//--------------------------------------------
i, T_BOXES,
            text,X_CORRECTION,55,
            //----------------------------
            text,Y_CORRECTION,10,
            //----------------------------
            text, N_COLOR, (uint)clrRed,
            //----------------------------
            X_SIZE_CORRECTION,15,
            //----------------------------
            Y_SIZE_CORRECTION,20,
            //----------------------------
            TEXT_FONT, "Arial Black",
            //----------------------------
            FONT_SIZE,12,
            //----------------------------
            W, 200,  H, 70,
            //----------------------------
            END,
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,
//---------------------------------------------------
__, LABEL,A, N_LABEL,"::Images\\32x32\\Warning.bmp",
//---------------------------------------------------
END_GROUP,
//--------------------------
i, AT, _X2X, "MF", 10, _Y2Y, "MF", 10,
//--------------------------------------------------- 

//--------------------------------------------------- 
GROUP, A,
//---------------------------------------------------
__,CHECKBOX, "Don't show this warning again.", 
//---------------------------------------------------
END_GROUP,
//---------------------------------------------------
i, AT, _X2X, "MF", 10, _Y2H, "T1", 30,
//--------------------------------------------------- 

//--------------------------------------------------- 
GROUP, A,
//---------------------------------------------------
__, D_BUTTON, "Ok", N_FRAME_COLOR, (int)C'51,153,255',_,CWIP, 
//---------------------------------------------------                       
                   GAP,7, 
//---------------------------------------------------                  
   D_BUTTON, "Cancel", _,CWIP, /*(CLOSE WINDOW IF PRESSED)*/
//---------------------------------------------------
END_GROUP,
//------------------------------------------------------------------
i, AT, _X2X, "MF", 200, _Y2Y, "Don't show this warning again.",  -5,
//------------------------------------------------------------------
END_WINDOW,
//----------------------------------------------------------------------------------
 

I will continue to post the code of several windows per day (to make it easier to understand).

I'm preparing a release for next Friday-Saturday.

Main tasks set:

  • Implement software control of elements and windows from the user application side.
  • Prepare/debug the functionality necessary for the user to work with tables.
  • Fix serious bugs with tabs and taskbar.
  • Fix minor bugs.


  • Make the engine load only selected resources at the moment of "symbiosis" compilation with the user application.

 
Реter Konow #:

I will continue to post the code of several windows per day (to make it easier to understand).

I am preparing a release for next Friday-Saturday.

Main tasks set:

  • Realise software control of elements and windows from the user application side.
  • Prepare/debug the functionality necessary for the user to work with tables.
  • Fix serious bugs with tabs and taskbar.
  • Fix minor bugs.


  • Make the engine load only selected resources at the moment of "symbiosis" compilation with the user application.

Greetings! I have only one question: does your library work under the debugger in visual mode? Specifically, I need only reaction to button presses and dragging of standard horizontal lines. In MT5 by OnChartEvent everything works in the debugger, in MT5 for about 7 years they can't cope with the "terrible problem". Maybe you have managed to bypass these glitches?

 
Alexey Volchanskiy #:

Greetings, I have only one question: does your library work under the debugger in visual mode? Specifically, I only need reaction to button presses and dragging standard horizontal lines. In MT5 by OnChartEvent everything works in the debugger, in MT5 for about 7 years they can't cope with the "terrible problem". Maybe you managed to bypass these glitches?

Unfortunately, no. The interface does not work in Debugging mode on MT5. Couldn't do anything about it.

Thanks for raising this topic. I need to test the debugger on a standard written programme connected to my graphics engine.