How do I determine whether the scroll button is pressed or depressed and if so, depress it ! - page 5
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
int max = SendMessage ( hwndTaskbar, TB_BUTTONCOUNT, 0, 0);
Please tell me where to see all values of constants like: TB_BUTTONCOUNT, TB_ISBUTTONPRESSED ?!
I want to determine the button and its state !
What toolbar command can be used to scroll through the buttons and find the right one?
Has anyone done this?
The graphics window descriptor has been found:
int deinit() {ObjectsDeleteAll();Comment ("");}int start() { ObjectsDeleteAll(); Comment (""); int hwnd = GetAncestor (WindowHandle(Symbol(),Period()),2); //дескриптор основного окна терминала int temp = GetWindow (hwnd, 5); int Count = GetWindowTextLengthA (temp); GetWindowTextA (temp, Name, Count+1); if (Name != "Стандартная" || Name == "Графики" || Name == "Графические инструменты") { for (int i=0;i<10;i++) { temp = GetWindow (temp, 2); if (temp == 0) break; Count = GetWindowTextLengthA (temp); GetWindowTextA (temp, Name, Count+1); if (Name == "Стандартная" || Name == "Графики" || Name == "Графические инструменты") {hg = temp; break;} } } else hg = temp; int h = GetWindow (hg, 5); Count = GetWindowTextLengthA (h); GetWindowTextA (h, Name, Count+1); if (Name != "Графики") { for (i=0;i<10;i++) { h = GetWindow (h, 2); if (h == 0) break; Count = GetWindowTextLengthA (h); GetWindowTextA (h, Name, Count+1); if (Name == "Графики") break; } } Print (DecToHex(h,8)); while (!IsStopped()) { GetWindowRect (h,rect); GetCursorPos (Pos); X = Pos[0] - rect[0]; Y = Pos[1] - rect[1]; Comment ("X= ",X,"\n","Y= ",Y); Sleep(100); } return(0); }string DecToHex (int n, int dig) { string s[], r=""; string Sym[16] = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; ArrayResize (s,dig); for (int i=0; i<dig; i++) s[i]="0"; i = dig-1; while (n != 0) {s[i] = Sym[n%16]; n = n>>4; i--; } for (i=0; i<dig; i++) r=r+s[i]; return (r); }I don't get it... What for?! I'm very surprised. Have you looked at my header? Not according to the code.
Any command from a chart is one function, one line of code.
I don't get it... What for?! I'm very surprised. Have you looked at my header? Not according to the code.
Any command from a chart is one function, one line of code.
OK, I'll look elsewhere for a solution to this question.
Sorry for the inconvenience.
OK, I'll look elsewhere for a solution to this issue.
Sorry for the inconvenience...
There, in the header, is a code and example.
Copy here what you consider an example for this question ?!
I only found this:
// 3.1.1 Function enables/disables auto-scrolling of the specified chart.
void ServiceAutoScroll(int hwndChart); // System descriptor of the chart window, on which autoscroll is disabled.
//=====================================================================================================================================================================
// 3.1.2. The function enables/disables the shift of the specified chart. If successful, method returns TRUE, otherwise - FALSE.
bool ServiceShift(int hwndChart); // System descriptor of the chart window, on which the shift is enabled/disabled.
But you don't need it !
Copy here what you think is an example on the subject ?!
If this function here, I still need its internals ...
// 3.2.1 The function returns the auto-scrolling state of the specified graph. If successful, the function returns TRUE, otherwise FALSE.
bool ServiceGetAutoScroll(int hwndChart); // System descriptor of the chart window, from which the auto-scroll state is returned.
Copy here what you think is an example on the subject ?!
I only found this:
// 3.1.1. The function enables/disables auto-scrolling of the specified chart.
void ServiceAutoScroll(int hwndChart); // The system descriptor of the chart window, on which the autoscroll is disabled.
// 3.1.2. function enables/disables the shift of the specified chart. The method returns TRUE if successful, otherwise FALSE.
bool ServiceShift(int hwndChart); // System descriptor of the chart window, on which the shift is enabled/disabled.
But you don't need it !
I wasn't talking about the library. But if it's about a library, there's a function:
I wrote above about WinUser32.mqh. The control codes are there.