Create Windows-like custom context menus

 
Hello, guys!

I have been searching without any result about this topic and hope some of you, more experienced programmers in MQL (4/5) can just answer this question?

Can I create a custom context menu in c++ to handle the right mouse click when selecting an object?
I know I can create a rectangle label and populate it with some CBmpButtons and create the same functionality but.. can that be done with a c++ dll?

I have tried but without any result. And the problem is with TrackPopupMenu which always returns 0.

Thanks in advance for any advice you can provide.
Best regards!
 

I think you can disable the default right click context menu from the chart integer properties .

What is the desired outcome of this ?

 
Lorentzos Roussos #:

I think you can disable the default right click context menu from the chart integer properties .

What is the desired outcome of this ?

I tried in MQL4 but without any results. Perhaps in MQL5 it works.

I am creating an easy way to edit lines, rectangles, text, labels, etc & find more easy to create a context menu. But if don't, I'll have to create a rectangle label with some buttons and that's all.
Thanks anyway, Lorentzos.

 
Genaro Cancino #:

I tried in MQL4 but without any results. Perhaps in MQL5 it works.

I am creating an easy way to edit lines, rectangles, text, labels, etc & find more easy to create a context menu. But if don't, I'll have to create a rectangle label with some buttons and that's all.
Thanks anyway, Lorentzos.

Np.

Just anticipate where you spawn that menu pertinent to the screen bounds as it may become unusable 

 
Lorentzos Roussos #:

Np.

Just anticipate where you spawn that menu pertinent to the screen bounds as it may become unusable 

Yes, thanks for your help. I'll have to do it with rectangles and buttons.
Have a great trading week!

Reason: