• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7326 (tree)
Time2018-12-15 00:41:11
Authorzmatsuo

Log Message

小修正
- TCHAR向けdropdown追加
- IsWindowVisible() など

Change Summary

Incremental Difference

--- branches/cmake/teraterm/common/dlglib.c (revision 7325)
+++ branches/cmake/teraterm/common/dlglib.c (revision 7326)
@@ -186,12 +186,25 @@
186186 i = 0;
187187 while (List[i] != NULL) {
188188 SendDlgItemMessageA(HDlg, Id_Item, CB_ADDSTRING,
189- 0, (LPARAM)List[i]);
189+ 0, (LPARAM)List[i]);
190190 i++;
191191 }
192192 SendDlgItemMessage(HDlg, Id_Item, CB_SETCURSEL,nsel-1,0);
193193 }
194194
195+void SetDropDownListW(HWND HDlg, int Id_Item, const wchar_t *List[], int nsel)
196+{
197+ int i;
198+
199+ i = 0;
200+ while (List[i] != NULL) {
201+ SendDlgItemMessageW(HDlg, Id_Item, CB_ADDSTRING,
202+ 0, (LPARAM)List[i]);
203+ i++;
204+ }
205+ SendDlgItemMessage(HDlg, Id_Item, CB_SETCURSEL,nsel-1,0);
206+}
207+
195208 LONG GetCurSel(HWND HDlg, int Id_Item)
196209 {
197210 LRESULT n;
--- branches/cmake/teraterm/common/dlglib.h (revision 7325)
+++ branches/cmake/teraterm/common/dlglib.h (revision 7326)
@@ -45,6 +45,7 @@
4545 void SetDlgPercent(HWND HDlg, int id_Item, int id_Progress, LONG a, LONG b, int *prog);
4646 void SetDlgTime(HWND HDlg, int id_Item, DWORD elapsed, int bytes);
4747 void SetDropDownList(HWND HDlg, int Id_Item, const char *List[], int nsel);
48+void SetDropDownListW(HWND HDlg, int Id_Item, const wchar_t *List[], int nsel);
4849 LONG GetCurSel(HWND HDlg, int Id_Item);
4950 void InitDlgProgress(HWND HDlg, int id_Progress, int *CurProgStat);
5051 void SetEditboxSubclass(HWND hDlg, int nID, BOOL ComboBox);
@@ -55,6 +56,12 @@
5556 void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile);
5657 void SetDlgMenuTexts(HMENU hMenu, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile);
5758
59+#if defined(_UNICODE)
60+#define SetDropDownListT(p1, p2, p3, p4) SetDropDownListW(p1, p2, p3, p4)
61+#else
62+#define SetDropDownListT(p1, p2, p3, p4) SetDropDownList(p1, p2, p3, p4)
63+#endif
64+
5865 ////////////////////////////////////////
5966 void TTSetDlgFont(const char *face, int height, int charset);
6067 //void TTSetDlgFont(const wchar_t *face, int height, int charset);
--- branches/cmake/teraterm/common/dlglib_cpp.cpp (revision 7325)
+++ branches/cmake/teraterm/common/dlglib_cpp.cpp (revision 7326)
@@ -112,7 +112,7 @@
112112 {
113113 TTDialogData *data = (TTDialogData *)GetWindowLongPtr(hDlgWnd, DWLP_USER);
114114 if (msg == WM_INITDIALOG) {
115- TTDialogData *data = (TTDialogData *)lParam;
115+ data = (TTDialogData *)lParam;
116116 SetWindowLongPtr(hDlgWnd, DWLP_USER, (LONG_PTR)lParam);
117117 lParam = data->ParamInit;
118118 }
--- branches/cmake/teraterm/teraterm/teraprn.cpp (revision 7325)
+++ branches/cmake/teraterm/teraterm/teraprn.cpp (revision 7326)
@@ -28,7 +28,6 @@
2828 */
2929
3030 /* TERATERM.EXE, Printing routines */
31-//#include "stdafx.h"
3231 #include "teraterm.h"
3332 #include "tttypes.h"
3433 #include <commdlg.h>
--- branches/cmake/teraterm/teraterm/vtwin.cpp (revision 7325)
+++ branches/cmake/teraterm/teraterm/vtwin.cpp (revision 7326)
@@ -2510,7 +2510,7 @@
25102510 int Xs, Ys, Xe, Ye;
25112511
25122512 // 表示されていなくてもWM_PAINTが発生するケース対策
2513- if (IsWindowVisible() == 0) {
2513+ if (::IsWindowVisible(m_hWnd) == 0) {
25142514 return;
25152515 }
25162516
Show on old repository browser