@@ -263,34 +263,34 @@ string ErrorDescription(int error) {
263263/**
264264 * Replace all occurences of a substring in a string by another string.
265265 *
266- * @param string str - string to process
266+ * @param string subject - string to process
267267 * @param string search - search string
268268 * @param string replace - replacement string
269269 * @param bool recursive [optional] - whether to replace recursively (default: no)
270270 *
271271 * @return string - resulting string or an empty string in case of errors
272272 */
273- string StrReplace (string str , string search , string replace , bool recursive = false ) {
273+ string StrReplace (string subject , string search , string replace , bool recursive = false ) {
274274 recursive = recursive !=0 ;
275- if (!StringLen (str )) return (str );
276- if (!StringLen (search )) return (str );
277- if (search == replace ) return (str );
275+ if (!StringLen (subject )) return (subject );
276+ if (!StringLen (search )) return (subject );
277+ if (search == replace ) return (subject );
278278
279279 string result =" " , lastResult =" " ;
280280
281281 if (!recursive ) {
282- int from =0 , found =StringFind (str , search );
282+ int from =0 , found =StringFind (subject , search );
283283
284284 while (found > -1 ) {
285- result = StringConcatenate (result , StrSubstr (str , from , found -from ), replace );
285+ result = StringConcatenate (result , StrSubstr (subject , from , found -from ), replace );
286286 from = found + StringLen (search );
287- found = StringFind (str , search , from );
287+ found = StringFind (subject , search , from );
288288 }
289- result = StringConcatenate (result , StrSubstr (str , from ));
289+ result = StringConcatenate (result , StrSubstr (subject , from ));
290290 }
291291 else {
292292 int counter = 0 ;
293- result = str ;
293+ result = subject ;
294294
295295 while (result != lastResult ) {
296296 lastResult = result ;
@@ -4503,7 +4503,7 @@ string GetAccountServer() {
45034503
45044504 if (serverName == " " ) {
45054505 // check main window properties
4506- int lpString = GetPropA (hMainWnd , PROP_STRING_ACCOUNT_SERVER );
4506+ int lpString = GetWindowPropertyA (hMainWnd , PROP_STRING_ACCOUNT_SERVER );
45074507 if (lpString != NULL ) serverName = GetStringA (lpString );
45084508 }
45094509
@@ -4527,8 +4527,8 @@ string GetAccountServer() {
45274527 // update EXECUTION_CONTEXT and main window properties
45284528 sAccountServer = ec_SetAccountServer (__ExecutionContext , serverName );
45294529 lpAccountServer = __ExecutionContext [EC .accountServer ];
4530- if (!GetPropA (hMainWnd , PROP_STRING_ACCOUNT_SERVER )) {
4531- SetPropA (hMainWnd , PROP_STRING_ACCOUNT_SERVER , lpAccountServer );
4530+ if (!GetWindowPropertyA (hMainWnd , PROP_STRING_ACCOUNT_SERVER )) {
4531+ SetWindowPropertyA (hMainWnd , PROP_STRING_ACCOUNT_SERVER , lpAccountServer );
45324532 }
45334533
45344534 isRecursion = false ;
@@ -4576,7 +4576,7 @@ int GetAccountNumber() {
45764576 // check main window properties
45774577 int hMainWnd = GetTerminalMainWindow ();
45784578 if (!accountNumber ) {
4579- accountNumber = GetPropA (hMainWnd , PROP_INT_ACCOUNT_NUMBER );
4579+ accountNumber = GetWindowPropertyA (hMainWnd , PROP_INT_ACCOUNT_NUMBER );
45804580 }
45814581
45824582 // evaluate title bar of the main window
@@ -4595,7 +4595,7 @@ int GetAccountNumber() {
45954595
45964596 // update EXECUTION_CONTEXT and window properties
45974597 ec_SetAccountNumber (__ExecutionContext , accountNumber );
4598- SetPropA (hMainWnd , PROP_INT_ACCOUNT_NUMBER , accountNumber );
4598+ SetWindowPropertyA (hMainWnd , PROP_INT_ACCOUNT_NUMBER , accountNumber );
45994599
46004600 isRecursion = false ;
46014601 }
@@ -6544,7 +6544,6 @@ double icSuperTrend(int timeframe, int atrPeriods, int smaPeriods, int iBuffer,
65446544 " " , // string Signal.onTrendChange.SoundDown
65456545 false , // bool Signal.onTrendChange.Alert
65466546 false , // bool Signal.onTrendChange.Mail
6547- false , // bool Signal.onTrendChange.SMS
65486547
65496548 " " , // string ______________________________
65506549 false , // bool AutoConfiguration
@@ -6924,13 +6923,11 @@ void __DummyCalls() {
69246923 int GetDlgCtrlID (int hWndCtl );
69256924 int GetDlgItem (int hDlg , int itemId );
69266925 int GetParent (int hWnd );
6927- int GetPropA (int hWnd , string name );
69286926 int GetTopWindow (int hWnd );
69296927 int GetWindow (int hWnd , int cmd );
69306928 bool IsWindow (int hWnd );
69316929 int MessageBoxA (int hWnd , string text , string caption , int style );
69326930 bool PostMessageA (int hWnd , int msg , int wParam , int lParam );
69336931 int RegisterWindowMessageA (string str );
69346932 int SendMessageA (int hWnd , int msg , int wParam , int lParam );
6935- bool SetPropA (int hWnd , string name , int hData );
69366933#import
0 commit comments