Libraries: EasyAndFastGUI library for creating graphical interfaces - page 8
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Compiling the ExampleEAF.mq5 did the trick.
I was assuming I had to compile a library when I want to create own things with it.
However, thanks a lot!
Oh and I was stumbling across this line of code at the top of most library files:
class CWindow;Is the creation of a "fake class" some trick to avoid an #include nightmare? How can the compiler later on actually link the correct class that is really being used?
First, I'd like to finalise what we have... After all, there are still a lot of deficiencies.
I have some remarks on the architecture. The specified object properties and the displayed picture live their own lives, independently of each other. And a mandatory call to Update() is required, otherwise they will remain in parallel realities. I think this is wrong, considering that we have an event-based model.Manual updating (redrawing) should not be a prerequisite, it only allows you to display changes immediately, but all changes should be displayed anyway. For this purpose, a message (event) should be sent to redraw this object, which will be processed later.
I.e. roughly like this:
Using ChangeWindowWidth, I change the window width so that it goes outside the current chart. After that, when I try to move this window, it automatically sticks to the left edge of the chart. How to disable this? I can't find a place in the code.
Using ChangeWindowWidth, I change the window width so that it goes outside the current chart. After that, when I try to move this window, it automatically sticks to the left edge of the chart. How to disable this? I can't find a place in the code.
You need to rewrite the CWindow::UpdateWindowXY() method. It is currently implemented in such a way that the edges of the window cannot go outside the chart when the window is moved.
By the way, about changing the window width
m_window1.ChangeWindowWidth(NEW_WIDTH); m_window1.Update(true);In MT5 everything is fine, but in MT4 it's like this
After clicking on the header, the buttons move to their proper place. Can you tell me which way to look? Where is the movement of these buttons implemented?
By the way, about changing the width of the window
In MT5 everything is fine, but in MT4 it is like this
After clicking on the header, the buttons move to their proper place. Can you tell me which way to look? Where is the movement of these buttons implemented?
Look at the Moving() method.
Try to access the window buttons via pointers and call this method.
Yes, you need either a proportional increase in the width of all columns or just the last column. The latter is preferable.
But in the current version it is problematic to implement this even by yourself, because I have not found a method in your class to get the current column width, and all fields are private. In general, at least this method should be added.
This is how you can try to implement what you need now:
Look at the Moving() method.
Try to access window buttons via pointers and call this method.
Yes, that's it :) Thanks!
I thought I had already looked through everything and missed the most obvious :)
This is how you can try to realise what you need now:
It's just a fixed column width, but we were talking about dynamically changing the width of columns based on their previous width. However, I have already completed the class by adding the int ColumnWidth(int i) method there
Good afternoon.
The problem is bigger :)
We create a dynamic object, for example a label
But how to delete it?
I delete it this way.
But after deleting it, it crashes, it says that the access to the pointer is incorrect.
As far as I understood, CWndContainer::AddToElementsArray adds the object to the common arrays, but Delete() does not delete it from there, and the window tries to access the object. I can't find any other similar to Delete().
How to delete an object correctly?