| 1252 |
return CallWindowProc(OrigHostnameEditProc, dlg, msg, wParam, lParam); |
return CallWindowProc(OrigHostnameEditProc, dlg, msg, wParam, lParam); |
| 1253 |
} |
} |
| 1254 |
|
|
| 1255 |
static BOOL CALLBACK TTXHostDlg(HWND dlg, UINT msg, WPARAM wParam, |
static INT_PTR CALLBACK TTXHostDlg(HWND dlg, UINT msg, WPARAM wParam, |
| 1256 |
LPARAM lParam) |
LPARAM lParam) |
| 1257 |
{ |
{ |
| 1258 |
static char *ssh_version[] = {"SSH1", "SSH2", NULL}; |
static char *ssh_version[] = {"SSH1", "SSH2", NULL}; |
| 1259 |
PGetHNRec GetHNRec; |
PGetHNRec GetHNRec; |
| 1271 |
switch (msg) { |
switch (msg) { |
| 1272 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
| 1273 |
GetHNRec = (PGetHNRec) lParam; |
GetHNRec = (PGetHNRec) lParam; |
| 1274 |
SetWindowLong(dlg, DWL_USER, lParam); |
SetWindowLongPtr(dlg, DWLP_USER, lParam); |
| 1275 |
|
|
| 1276 |
GetWindowText(dlg, uimsg, sizeof(uimsg)); |
GetWindowText(dlg, uimsg, sizeof(uimsg)); |
| 1277 |
UTIL_get_lang_msg("DLG_HOST_TITLE", pvar, uimsg); |
UTIL_get_lang_msg("DLG_HOST_TITLE", pvar, uimsg); |
| 1348 |
// C-n/C-p のためにサブクラス化 (2007.9.4 maya) |
// C-n/C-p のためにサブクラス化 (2007.9.4 maya) |
| 1349 |
hwndHostname = GetDlgItem(dlg, IDC_HOSTNAME); |
hwndHostname = GetDlgItem(dlg, IDC_HOSTNAME); |
| 1350 |
hwndHostnameEdit = GetWindow(hwndHostname, GW_CHILD); |
hwndHostnameEdit = GetWindow(hwndHostname, GW_CHILD); |
| 1351 |
OrigHostnameEditProc = (WNDPROC)GetWindowLong(hwndHostnameEdit, GWL_WNDPROC); |
OrigHostnameEditProc = (WNDPROC)GetWindowLongPtr(hwndHostnameEdit, GWLP_WNDPROC); |
| 1352 |
SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)HostnameEditProc); |
SetWindowLongPtr(hwndHostnameEdit, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); |
| 1353 |
|
|
| 1354 |
CheckRadioButton(dlg, IDC_HOSTTELNET, IDC_HOSTOTHER, |
CheckRadioButton(dlg, IDC_HOSTTELNET, IDC_HOSTOTHER, |
| 1355 |
pvar->settings.Enabled ? IDC_HOSTSSH : GetHNRec-> |
pvar->settings.Enabled ? IDC_HOSTSSH : GetHNRec-> |
| 1478 |
case WM_COMMAND: |
case WM_COMMAND: |
| 1479 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
| 1480 |
case IDOK: |
case IDOK: |
| 1481 |
GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWL_USER); |
GetHNRec = (PGetHNRec) GetWindowLongPtr(dlg, DWLP_USER); |
| 1482 |
if (GetHNRec != NULL) { |
if (GetHNRec != NULL) { |
| 1483 |
if (IsDlgButtonChecked(dlg, IDC_HOSTTCPIP)) { |
if (IsDlgButtonChecked(dlg, IDC_HOSTTCPIP)) { |
| 1484 |
char afstr[BUFSIZ]; |
char afstr[BUFSIZ]; |
| 1544 |
} |
} |
| 1545 |
} |
} |
| 1546 |
} |
} |
| 1547 |
SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)OrigHostnameEditProc); |
SetWindowLongPtr(hwndHostnameEdit, GWLP_WNDPROC, (LONG_PTR)OrigHostnameEditProc); |
| 1548 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
| 1549 |
return TRUE; |
return TRUE; |
| 1550 |
|
|
| 1551 |
case IDCANCEL: |
case IDCANCEL: |
| 1552 |
SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)OrigHostnameEditProc); |
SetWindowLongPtr(hwndHostnameEdit, GWLP_WNDPROC, (LONG_PTR)OrigHostnameEditProc); |
| 1553 |
EndDialog(dlg, 0); |
EndDialog(dlg, 0); |
| 1554 |
return TRUE; |
return TRUE; |
| 1555 |
|
|
| 1594 |
enable_dlg_items(dlg, IDC_SSH_VERSION, IDC_SSH_VERSION, FALSE); // disabled |
enable_dlg_items(dlg, IDC_SSH_VERSION, IDC_SSH_VERSION, FALSE); // disabled |
| 1595 |
hostssh_enabled: |
hostssh_enabled: |
| 1596 |
|
|
| 1597 |
GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWL_USER); |
GetHNRec = (PGetHNRec) GetWindowLongPtr(dlg, DWLP_USER); |
| 1598 |
|
|
| 1599 |
if (IsDlgButtonChecked(dlg, IDC_HOSTTELNET)) { |
if (IsDlgButtonChecked(dlg, IDC_HOSTTELNET)) { |
| 1600 |
if (GetHNRec != NULL) |
if (GetHNRec != NULL) |
| 2441 |
return CallWindowProc(g_defAboutDlgEditWndProc, hWnd, msg, wp, lp); |
return CallWindowProc(g_defAboutDlgEditWndProc, hWnd, msg, wp, lp); |
| 2442 |
} |
} |
| 2443 |
|
|
| 2444 |
static BOOL CALLBACK TTXAboutDlg(HWND dlg, UINT msg, WPARAM wParam, |
static INT_PTR CALLBACK TTXAboutDlg(HWND dlg, UINT msg, WPARAM wParam, |
| 2445 |
LPARAM lParam) |
LPARAM lParam) |
| 2446 |
{ |
{ |
| 2447 |
static HFONT DlgAboutTextFont; |
static HFONT DlgAboutTextFont; |
| 2448 |
|
|
| 3252 |
} |
} |
| 3253 |
} |
} |
| 3254 |
|
|
| 3255 |
static BOOL CALLBACK TTXSetupDlg(HWND dlg, UINT msg, WPARAM wParam, |
static INT_PTR CALLBACK TTXSetupDlg(HWND dlg, UINT msg, WPARAM wParam, |
| 3256 |
LPARAM lParam) |
LPARAM lParam) |
| 3257 |
{ |
{ |
| 3258 |
switch (msg) { |
switch (msg) { |
| 3259 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
| 3260 |
SetWindowLong(dlg, DWL_USER, lParam); |
SetWindowLongPtr(dlg, DWLP_USER, lParam); |
| 3261 |
init_setup_dlg((PTInstVar) lParam, dlg); |
init_setup_dlg((PTInstVar) lParam, dlg); |
| 3262 |
|
|
| 3263 |
CenterWindow(dlg, GetParent(dlg)); |
CenterWindow(dlg, GetParent(dlg)); |
| 3266 |
case WM_COMMAND: |
case WM_COMMAND: |
| 3267 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
| 3268 |
case IDOK: |
case IDOK: |
| 3269 |
complete_setup_dlg((PTInstVar) GetWindowLong(dlg, DWL_USER), dlg); |
complete_setup_dlg((PTInstVar) GetWindowLongPtr(dlg, DWLP_USER), dlg); |
| 3270 |
EndDialog(dlg, 1); |
EndDialog(dlg, 1); |
| 3271 |
return TRUE; |
return TRUE; |
| 3272 |
case IDCANCEL: /* there isn't a cancel button, but other Windows |
case IDCANCEL: /* there isn't a cancel button, but other Windows |
| 3783 |
// |
// |
| 3784 |
// SCP dialog |
// SCP dialog |
| 3785 |
// |
// |
| 3786 |
static BOOL CALLBACK TTXScpDialog(HWND dlg, UINT msg, WPARAM wParam, |
static INT_PTR CALLBACK TTXScpDialog(HWND dlg, UINT msg, WPARAM wParam, |
| 3787 |
LPARAM lParam) |
LPARAM lParam) |
| 3788 |
{ |
{ |
| 3789 |
static char sendfile[MAX_PATH] = ""; |
static char sendfile[MAX_PATH] = ""; |
| 4172 |
buffer_free(blob); |
buffer_free(blob); |
| 4173 |
} |
} |
| 4174 |
|
|
| 4175 |
static BOOL CALLBACK TTXKeyGenerator(HWND dlg, UINT msg, WPARAM wParam, |
static INT_PTR CALLBACK TTXKeyGenerator(HWND dlg, UINT msg, WPARAM wParam, |
| 4176 |
LPARAM lParam) |
LPARAM lParam) |
| 4177 |
{ |
{ |
| 4178 |
static ssh_keytype key_type; |
static ssh_keytype key_type; |
| 4179 |
static int saved_key_bits; |
static int saved_key_bits; |
| 5344 |
hInst = hInstance; |
hInst = hInstance; |
| 5345 |
pvar = &InstVar; |
pvar = &InstVar; |
| 5346 |
__mem_mapping = |
__mem_mapping = |
| 5347 |
CreateFileMapping((HANDLE) 0xFFFFFFFF, NULL, PAGE_READWRITE, 0, |
CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, |
| 5348 |
sizeof(TS_SSH), TTSSH_FILEMAPNAME); |
sizeof(TS_SSH), TTSSH_FILEMAPNAME); |
| 5349 |
if (__mem_mapping == NULL) { |
if (__mem_mapping == NULL) { |
| 5350 |
/* fake it. The settings won't be shared, but what the heck. */ |
/* fake it. The settings won't be shared, but what the heck. */ |