[Ttssh2-commit] [5335] マクロの行が長いと、右端が切れてしまうため、エラー行をテキストボックスに表示するようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2013年 6月 25日 (火) 21:31:22 JST


Revision: 5335
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5335
Author:   yutakapon
Date:     2013-06-25 21:31:20 +0900 (Tue, 25 Jun 2013)
Log Message:
-----------
マクロの行が長いと、右端が切れてしまうため、エラー行をテキストボックスに表示するようにした。

Modified Paths:
--------------
    trunk/teraterm/ttpmacro/errdlg.cpp
    trunk/teraterm/ttpmacro/ttm_res.h
    trunk/teraterm/ttpmacro/ttpmacro.rc

-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/errdlg.cpp
===================================================================
--- trunk/teraterm/ttpmacro/errdlg.cpp	2013-06-24 13:58:39 UTC (rev 5334)
+++ trunk/teraterm/ttpmacro/errdlg.cpp	2013-06-25 12:31:20 UTC (rev 5335)
@@ -82,7 +82,10 @@
 	// TODO: \x83t\x83@\x83C\x83\x8B\x96\xBC\x82\xE0\x82‚\xAF\x82\xBD\x82\xA2\x81B
 	// \x83G\x83\x89\x81[\x89ӏ\x8A\x82Ɉ\xF3\x82\xF0\x82‚\xAF\x82\xE9\x81B
 	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "%d:", LineNo);
+	SetDlgItemText(IDC_ERRLINE, buf);
+
 	len = strlen(LineStr);
+	buf[0] = 0;
 	for (i = 0 ; i < len ; i++) {
 		if (i == StartPos)
 			strncat_s(buf, sizeof(buf), "<<<", _TRUNCATE);
@@ -94,7 +97,7 @@
 	}
 	if (EndPos == len)
 		strncat_s(buf, sizeof(buf), ">>>", _TRUNCATE);
-	SetDlgItemText(IDC_ERRLINE, buf);
+	SetDlgItemText(IDC_EDIT_ERRLINE, buf);
 
 	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
 		GetWindowRect(&R);

Modified: trunk/teraterm/ttpmacro/ttm_res.h
===================================================================
--- trunk/teraterm/ttpmacro/ttm_res.h	2013-06-24 13:58:39 UTC (rev 5334)
+++ trunk/teraterm/ttpmacro/ttm_res.h	2013-06-25 12:31:20 UTC (rev 5335)
@@ -20,6 +20,8 @@
 #define IDC_LINENO                      601
 #define IDC_LISTBOX                     602
 #define IDC_MACROERRHELP                603
+#define IDC_EDIT1                       604
+#define IDC_EDIT_ERRLINE                604
 
 // Next default values for new objects
 // 
@@ -27,7 +29,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        601
 #define _APS_NEXT_COMMAND_VALUE         32771
-#define _APS_NEXT_CONTROL_VALUE         604
+#define _APS_NEXT_CONTROL_VALUE         605
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: trunk/teraterm/ttpmacro/ttpmacro.rc
===================================================================
--- trunk/teraterm/ttpmacro/ttpmacro.rc	2013-06-24 13:58:39 UTC (rev 5334)
+++ trunk/teraterm/ttpmacro/ttpmacro.rc	2013-06-25 12:31:20 UTC (rev 5335)
@@ -66,11 +66,12 @@
 CAPTION "MACRO: Error"
 FONT 14, "System", 0, 0, 0x0
 BEGIN
-    CONTROL         "",IDC_ERRMSG,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,20,4,141,8
-    CONTROL         "",IDC_ERRLINE,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,20,16,197,8
+    CONTROL         "ERRMSG",IDC_ERRMSG,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,20,4,141,8
+    RTEXT           "NO:",IDC_ERRLINE,20,16,17,8,SS_NOPREFIX
     DEFPUSHBUTTON   "&Stop macro",IDOK,27,28,54,14
     PUSHBUTTON      "&Continue",IDCANCEL,92,28,54,14
     PUSHBUTTON      "&Help",IDC_MACROERRHELP,157,28,54,14
+    EDITTEXT        IDC_EDIT_ERRLINE,44,13,175,14,ES_AUTOHSCROLL | ES_READONLY
 END
 
 IDD_INPDLG DIALOGEX 20, 20, 143, 59



Ttssh2-commit メーリングリストの案内
Back to archive index