Just tried to change CButton::CreateCanvas with all available formats without avail:
bool CButton::CreateCanvas(void) { string name=CElementBase::ElementName("button"); if(!CElement::CreateCanvas(name,m_x,m_y,m_x_size,m_y_size, COLOR_FORMAT_XRGB_NOALPHA)) // <--- with COLOR_FORMAT_XRGB_NOALPHA and COLOR_FORMAT_ARGB_RAW it still FAILS return(false); return(true); }
I believe you directly if you say it's a huge library chaotic to edit but I tried and it's alright
Did you try with another version ? There's many.
just there I have four differents archives and I even don't remember which one is the right one, nor which one I'm using - I just tried everything until it worked ;)
Hi Icham,
yes I had pulled the latest updates. Do you create a CComboBox somewhere in your GUI? Something like what I do as shown above:
if (!m_OrderType.CreateComboBox(text, x_gap, y_gap)) return false;
Maybe I'm preparing this ComboBox differently than you do.
I just commented out
//m_OrderType.Alpha(InpTransparency);
but still the same. Looks like setting alpha doesn't make any difference.
Well, looks like I have to dissect this whole library.
Fun!
Hi Icham,
yes I had pulled the latest updates. Do you create a CComboBox somewhere in your GUI? Something like what I do as shown above:
nope unfortunately I'm not using comboboxes. But if you look for the articles where the author is talking of comboboxes you may find the working version for combo
https://www.mql5.com/en/articles/2381#part_07
on the other hand, it may not work for others controls of the lib
you have to implement it, making your own fork
it's not easy but it does worth it - it's a really flexible lib
- www.mql5.com
Just found out that rolling 'Canvas.mqh' back to the previous version makes the Combobox (and other failing components) work again.
Either some of those changes in the Canvas class are bugged or they are incompatible with resource loading used in the EasyAndFastGui.
If you have versioned the sources and use a diff tool you can see there are only a few relevant methods changed and mostly deal with transparency / COLOR_FORMAT_*
Checking in later.

- www.mql5.com
Just found out that rolling 'Canvas.mqh' back to the previous version makes the Combobox (and other failing components) work again.
Either some of those changes in the Canvas class are bugged or they are incompatible with resource loading used in the EasyAndFastGui.
If you have versioned the sources and use a diff tool you can see there are only a few relevant methods changed and mostly deal with transparency / COLOR_FORMAT_*
Checking in later.
Yep, that way. Find a version that works for most of the controls you used in your interface, then patch what you need
Making things work with patches is ok for now, but I would assume here are other fellow coders & traders who'd like to know the FIX and not the patch ;)
It has been released for free, and it's great !
I'm not sure it is supported as a paid product would be. In my opinion, the author will debug it only when he'll need it himself - but who knows ... try :)
or just do with what you have ;)
Making things work with patches is ok for now, but I would assume here are other fellow coders & traders who'd like to know the FIX and not the patch ;)
Hello Marcel, I got the same problem... Don´t have de old Canvas.mqh to make a change. Could you please send to me?
Hi mate,
sure thing. I've uploaded the files (new, old, diff) so you can open/download them:
Canvas_Diff.htm
Canvas_before_build_2265.mqh
Canvas_build_2265.mqh
Cheers!
M.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
the following error occurs (which did not before releasing build 2265) when I create GUI elements with the EasyAndFastGUI library (https://www.mql5.com/de/code/19703):
CElement::CreateCanvas > Failed to create a canvas for drawing the (CButton) control: 4016
Let me first show you the methods of the library that fail. Later on I show code that utilizes these methods.
Obviously, CreateBitmapLabel does not work properly:
Method Create(..) is returning false and when I debug and jump into it it will fail on ResourceCreate(...):
So now my code that uses methods of the EasyAndFastGUI lib:
So that method worked just fine until the update and now fails with
if (!m_OrderType.CreateComboBox(text, x_gap, y_gap))
Debugging that route it enters:
So creating the canvas itself seems not to be the problem, but drawing the button onto it. Entering CreateButton():
The resources are there (again, it all worked fine until the update), stepping down until we get to the failing line:
In the Button.mqh the method CreateButton(...) looks as follows:
InitializePropertoes works, but CreateCanvas() of this Button class does not:
And there we are at the very first code snippet. Know that CElement::CreateCanvas(..) is called with proper name, m_x, m_y and the desired x/y size for the button.
Maybe someone can enlighten me why
makes such trouble. Also, actually I do NOT understand the error. 4016 -> Resource not found? I thought this ResourceCreate() - Method is creating something not finding something!
From the following screenshot you can see the values filled during the debugging run:
Would appreciate any hints and ideas!
I'll also contact @Anatoli Kazharski of EasyAndFastGui. Maybe he can help, too.