I wonder if it is possible to know which window is the active one, the one that has the top priority for mouse clicks Or get the name or anything specific about the top active window?
I've tested all these functions and more but they usually return 0 :
int GetWindow(int hWnd,int uCmd);
int GetWindowTextLengthA(int hWnd);
int GetWindowTextW(int hWnd,string lpString,int nMaxCount);
int GetParent(int hWnd);
int GetActiveWindow();
I found something strange though. The OnChartEvent doesn't work when you right click in the mouse Or when you click on "Draw text label" and the "Label" window appear to create a text label on the chart. But it works fine when there is another window of a different program above MT4 (when the mouse is hovering around the chart). I mean when MT4 window isn't active, it still get OnChartEvent outputs when the mouse coordinates are in on the chart.
I would like to get the top active window in order to stop a function to stop a function from working when MT4 (Chart) isn't in focus or Active.
NOTE: Is there a reference book/article about which WINAPI functions work on MT4 (besides MSDN references which doesn't include Unicode functions).
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.
Hello,
I wonder if it is possible to know which window is the active one, the one that has the top priority for mouse clicks Or get the name or anything specific about the top active window?
I've tested all these functions and more but they usually return 0 :
I found something strange though. The OnChartEvent doesn't work when you right click in the mouse Or when you click on "Draw text label" and the "Label" window appear to create a text label on the chart. But it works fine when there is another window of a different program above MT4 (when the mouse is hovering around the chart). I mean when MT4 window isn't active, it still get OnChartEvent outputs when the mouse coordinates are in on the chart.
I would like to get the top active window in order to stop a function to stop a function from working when MT4 (Chart) isn't in focus or Active.
NOTE: Is there a reference book/article about which WINAPI functions work on MT4 (besides MSDN references which doesn't include Unicode functions).
Thank You very much.