How to bring up the Object Properties dialog box programmatically?

 

I have a lot of charts on my terminal and each chart has a lot of objects like trendlines and channels. I get very tired of double clicking each object to select it, right clicking it and then selecting Object Properties to bring up the Object Properties dialog box, every time I want to change something about the object. What I'd like to do is write some code in an event handler in my indicator which, when I press a hotkey, will automatically select the object and send an instruction to MT4 to show the object's Object Properties dialog box. I can figure out how to select an object which is close to the mouse pointer. But how do I instruct MT4 to show the object's Object Properties dialog box programmatically? This gets into the guts of MT4 itself and seems beyond the scope of MQL4. Can user32.dll be used in any way?

Any help appreciated...

 
shoxie:

I have a lot of charts on my terminal and each chart has a lot of objects like trendlines and channels. I get very tired of double clicking each object to select it, right clicking it and then selecting Object Properties to bring up the Object Properties dialog box, every time I want to change something about the object. What I'd like to do is write some code in an event handler in my indicator which, when I press a hotkey, will automatically select the object and send an instruction to MT4 to show the object's Object Properties dialog box. I can figure out how to select an object which is close to the mouse pointer. But how do I instruct MT4 to show the object's Object Properties dialog box programmatically? This gets into the guts of MT4 itself and seems beyond the scope of MQL4. Can user32.dll be used in any way?

Any help appreciated...

Hello,

I would suppose that there could be some means to do it via the Windows API, but it should probably be too much work: hooks maybe, subclass, superclass and that stuff in general. But in the mean time, I assume it could be easier to create your own panel with MQL buttons to change object properties ; not only that, by using DLLs you are locked off the MQL Market (IIRC).

greets

 
Demos Stogios:

Hello,

I would suppose that there could be some means to do it via the Windows API, but it should probably be too much work: hooks maybe, subclass, superclass windows procedures and that stuff in general. But in the mean time, I assume it could be easier to create your own panel with MQL buttons to change object properties ; not only that, by using DLLs you are locked off the MQL Market (IIRC).

greets

That's just what I was thinking on further reflection. I looked into GUI programming in MQL4. Though it seems daunting at first, it's conceptually very simple. But if there is a simple instruction to bring up the object properties dialog box, it will save me the trouble of building a whole new separate GUI panel. But then again, the GUI will be purpose built for my intentions, so maybe it's worth the stretch.