There is code of script which get the name of chart window in MetaTrader 4 terminal (e.g. "EURUSD,M1"):
int GetParent(int hWnd);
int GetWindow(int hWnd, int uCmd);
int GetWindowTextA(int hWnd, string str, int nMaxCount);
int GetWindowTextLengthA(int i);
#define GW_CHILD 0x5
int MDI_handle = GetParent(GetParent(WindowHandle(Symbol(), Period())));
int Chart_board = GetWindow(MDI_handle, GW_CHILD);
string s = " ";
int nMaxCount = GetWindowTextLengthA(Chart_board);
GetWindowTextA(Chart_board, s, nMaxCount + 1);
These script worked with MT4 builds older then 2014 year. But with 2014 year's builds this script doesn't work. It just prints spaces.
Please, help me to get name of chart in MT4 terminal by its handle.
strings in the new build (600 >) are unicode
adapt your code accordingly
so, solution is to use GetWindowTextW and "&" with string