[Ttssh2-commit] [7635] Visual Studio 2005でビルドできるよう修正

scmno****@osdn***** scmno****@osdn*****
2019年 4月 30日 (火) 01:22:22 JST


Revision: 7635
          https://osdn.net/projects/ttssh2/scm/svn/commits/7635
Author:   zmatsuo
Date:     2019-04-30 01:22:21 +0900 (Tue, 30 Apr 2019)
Log Message:
-----------
Visual Studio 2005でビルドできるよう修正

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/auth.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/auth.c
===================================================================
--- trunk/ttssh2/ttxssh/auth.c	2019-04-28 15:42:38 UTC (rev 7634)
+++ trunk/ttssh2/ttxssh/auth.c	2019-04-29 16:22:21 UTC (rev 7635)
@@ -1056,6 +1056,9 @@
 
 		case IDC_SSHPASSWORD_OPTION: {
 			TCHAR uimsg[MAX_UIMSG];
+			RECT rect;
+			HWND hWndButton;
+			int result;
 			HMENU hMenu= CreatePopupMenu();
 			GetI18nStrT("TTSSH", "DLG_AUTH_PASTE_CLIPBOARD",
 						uimsg, _countof(uimsg),
@@ -1077,10 +1080,9 @@
 						"&Show passphrase",
 						pvar->ts->UILanguageFile);
 			AppendMenu(hMenu, MF_ENABLED | MF_STRING | (ShowPassPhrase ? MFS_CHECKED : 0), 4, uimsg);
-			RECT rect;
-			HWND hWndButton = GetDlgItem(dlg, IDC_SSHPASSWORD_OPTION);
+			hWndButton = GetDlgItem(dlg, IDC_SSHPASSWORD_OPTION);
 			GetWindowRect(hWndButton, &rect);
-			int result = TrackPopupMenu(hMenu, TPM_RETURNCMD, rect.left, rect.bottom, 0 , hWndButton, NULL);
+			result = TrackPopupMenu(hMenu, TPM_RETURNCMD, rect.left, rect.bottom, 0 , hWndButton, NULL);
 			DestroyMenu(hMenu);
 			switch(result) {
 			case 1:
@@ -1139,16 +1141,18 @@
 
 		case IDC_USERNAME_OPTION: {
 			TCHAR uimsg[MAX_UIMSG];
+			RECT rect;
+			HWND hWndButton;
 			HMENU hMenu= CreatePopupMenu();
+			int result;
 			GetI18nStrT("TTSSH", "DLG_AUTH_PASTE_WINDOWS_USERNAME",
 						uimsg, _countof(uimsg),
 						"Paste &Windows username",
 						pvar->ts->UILanguageFile);
 			AppendMenu(hMenu, MF_ENABLED | MF_STRING, 1, uimsg);
-			RECT rect;
-			HWND hWndButton = GetDlgItem(dlg, IDC_USERNAME_OPTION);
+			hWndButton = GetDlgItem(dlg, IDC_USERNAME_OPTION);
 			GetWindowRect(hWndButton, &rect);
-			int result = TrackPopupMenu(hMenu, TPM_RETURNCMD, rect.left, rect.bottom, 0 , hWndButton, NULL);
+			result = TrackPopupMenu(hMenu, TPM_RETURNCMD, rect.left, rect.bottom, 0 , hWndButton, NULL);
 			DestroyMenu(hMenu);
 			switch (result) {
 			case 1: {


Ttssh2-commit メーリングリストの案内