Stanislav Korotky #: See /MQL5/Include/Controls/Defines.mqh file - all constants there are defined as pixels(!), so everything "floats" when changing DPI. If you want to fix it quickly, you need to redefine all these constants in your code.
Thank you. I made in my code like this, it became convenient to drag the window and hit the cross to close the window.
But to scale the icons of the buttons (minimise/close) you need to dig somewhere else, apparently: BmpButton.mqh, ChartObjectsBmpControls.mqh, etc.
#include <Controls\Defines.mqh>
// remove old values#undef CONTROLS_DIALOG_CAPTION_HEIGHT
#undef CONTROLS_DIALOG_BUTTON_OFF
#undef CONTROLS_BUTTON_SIZE
// redefine new values#define CONTROLS_DIALOG_CAPTION_HEIGHT 60// window title height#define CONTROLS_DIALOG_BUTTON_OFF 20// button indentation/position (cross, collapse)//--- BmpButton#define CONTROLS_BUTTON_SIZE 40// default size of button (16 x 16)
Thank you. I made it in my code like this, it became convenient to drag the window and hit the cross to close the window.
But to scale the icons of the buttons (minimise/close) you need to dig somewhere else, apparently: BmpButton.mqh, ChartObjectsBmpControls.mqh, etc.
Icons are bitmap - they are stored as bmp files in the MQL5/Include/Controls/res/ directory - if you enlarge them, they will look bad. Ideally, you need a separate subdirectory (like /hires/) and generate images with good quality for it and direct resource links from sources to it.
Only if you redefine it all rigidly, as they did for macros, then on a normal monitor will be a giant size. That is, the solution is only "for yourself". In a good way, it is necessary to define sizes and images dynamically, i.e. write a MQL5 wrapper that analyses the current DPI.
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.
See /MQL5/Include/Controls/Defines.mqh file - all constants there are defined as pixels(!), so everything "floats" when changing DPI. If you want to fix it quickly, you need to redefine all these constants in your code.
Thank you. I made in my code like this, it became convenient to drag the window and hit the cross to close the window.
But to scale the icons of the buttons (minimise/close) you need to dig somewhere else, apparently: BmpButton.mqh, ChartObjectsBmpControls.mqh, etc.
Thank you. I made it in my code like this, it became convenient to drag the window and hit the cross to close the window.
But to scale the icons of the buttons (minimise/close) you need to dig somewhere else, apparently: BmpButton.mqh, ChartObjectsBmpControls.mqh, etc.
Icons are bitmap - they are stored as bmp files in the MQL5/Include/Controls/res/ directory - if you enlarge them, they will look bad. Ideally, you need a separate subdirectory (like /hires/) and generate images with good quality for it and direct resource links from sources to it.
Only if you redefine it all rigidly, as they did for macros, then on a normal monitor will be a giant size. That is, the solution is only "for yourself". In a good way, it is necessary to define sizes and images dynamically, i.e. write a MQL5 wrapper that analyses the current DPI.