Advertisement
micclly

GetWindowText.mq4

Feb 26th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #property strict
  2.  
  3. #include <WinUser32.mqh>
  4.  
  5. void OnStart()
  6. {
  7.     int hwnd = WindowHandle(_Symbol, _Period);
  8.     string text = "0123456789";
  9.     GetWindowTextW(hwnd, text, StringLen(text));
  10.     PrintFormat("hwnd=0x%x, text=%s", hwnd, text);
  11.  
  12.     GetWindowTextW(GetParent(hwnd), text, StringLen(text));
  13.     PrintFormat("prentHwnd=0x%x, text=%s", GetParent(hwnd), text);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement