• R/O
  • SSH
  • HTTPS

gsfinder-w03: 提交


Commit MetaInfo

修订版142 (tree)
时间2010-09-30 06:33:14
作者goriponsoft

Log Message

・ダイアログ内のアイテムの配置をタッチUI向けに調整

更改概述

差异

--- trunk/body/GSFinder.h (revision 141)
+++ trunk/body/GSFinder.h (revision 142)
@@ -121,13 +121,13 @@
121121 #define GetResourceString(ids) ((LPTSTR)LoadString(g_hInst,(ids),NULL,0))
122122
123123 ///////////////////////////////////////////////////////////////
124-//TouchUI
124+//タッチUI向けマクロ(WM6.5以前のSDKでのエラー回避)
125125 #ifndef LVS_EX_THEME
126126 #define LVS_EX_THEME (0x02000000L)
127127 #endif
128-#ifndef BS_THEME
129-#define BS_THEME (0x00008000L)
130-#endif
128+//#ifndef BS_THEME
129+//#define BS_THEME (0x00008000L)
130+//#endif
131131
132132 ///////////////////////////////////////////////////////////////
133133 // グローバル変数:
--- trunk/body/GSFinder.cpp (revision 141)
+++ trunk/body/GSFinder.cpp (revision 142)
@@ -1259,7 +1259,7 @@
12591259 {
12601260 DWORD bottom1 = (DWORD)(22 * g_MainWnd.m_fpHighResolutionScale);
12611261 DWORD bottom2 = (DWORD)(42 * g_MainWnd.m_fpHighResolutionScale);
1262- DWORD bottom3 = (DWORD)(98 * g_MainWnd.m_fpHighResolutionScale);
1262+ DWORD bottom3 = (DWORD)(108 * g_MainWnd.m_fpHighResolutionScale);
12631263
12641264 PAINTSTRUCT ps;
12651265 HDC hDC = BeginPaint(hDlg, &ps);
--- trunk/body/Association.cpp (revision 141)
+++ trunk/body/Association.cpp (revision 142)
@@ -9,6 +9,11 @@
99 #include "FolderDlgPPC.h"
1010
1111 ///////////////////////////////////////////////////////////////
12+//MACRO
13+#define ITEM_SPACE (3)
14+#define FILETYPE_COLUMN_WIDTH (80)
15+
16+///////////////////////////////////////////////////////////////
1217 //ウィンドウプロシージャ(プログラムの選択)
1318 LRESULT CALLBACK ChooseProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
1419 {
@@ -1192,7 +1197,10 @@
11921197 //ウィンドウタイトル
11931198 SetWindowText(m_hWnd, APP_MAINWND_TITLE);
11941199
1195- //ウィンドウ初期化
1200+ //リストビューのタッチUI対応
1201+ if (g_MainWnd.m_bTouchUI)
1202+ ListView_SetExtendedListViewStyle(m_hListView, ListView_GetExtendedListViewStyle(m_hListView) | LVS_EX_THEME);
1203+
11961204 //カラムヘッダの作成
11971205 RECT rc;
11981206 GetClientRect(m_hListView, &rc);
@@ -1306,10 +1314,11 @@
13061314 //カーソルを処理中にする
13071315 HCURSOR hCursor = SetCursor(LoadCursor(NULL, IDC_WAIT));
13081316
1309- //ウィンドウ初期化
1310- //リストビューの行選択化
1311- ListView_SetExtendedListViewStyle(m_hListView2,
1312- (ListView_GetExtendedListViewStyle(m_hListView2)|LVS_EX_FULLROWSELECT));
1317+ //リストビューの行選択化 & タッチUI対応
1318+ DWORD dwExStyle = ListView_GetExtendedListViewStyle(m_hListView2) | LVS_EX_FULLROWSELECT;
1319+ if (g_MainWnd.m_bTouchUI)
1320+ dwExStyle |= LVS_EX_THEME;
1321+ ListView_SetExtendedListViewStyle(m_hListView2, dwExStyle);
13131322
13141323 //カラムヘッダの作成
13151324 RECT rc;
@@ -1418,7 +1427,7 @@
14181427 pt.x = rc.left; pt.y = rc.top;
14191428 ScreenToClient(m_hWnd, &pt);
14201429 w = RECT_WIDTH(&rcw);
1421- h = RECT_HEIGHT(&rcw) - pt.y - (int)(4*g_MainWnd.m_fpHighResolutionScale);
1430+ h = RECT_HEIGHT(&rcw) - pt.y - (int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
14221431 MoveWindow(m_hListView2, pt.x, pt.y, w, h, TRUE);
14231432
14241433 //サイズ調整 (ListView/Column)
@@ -1426,7 +1435,7 @@
14261435 lvclm.mask = LVCF_WIDTH;
14271436 lvclm.cx = (int)(80*g_MainWnd.m_fpHighResolutionScale);
14281437 ListView_SetColumn(m_hListView2, 0, &lvclm);
1429- lvclm.cx = RECT_WIDTH(&rcw) - (int)(80*g_MainWnd.m_fpHighResolutionScale);
1438+ lvclm.cx = RECT_WIDTH(&rcw) - (int)(FILETYPE_COLUMN_WIDTH*g_MainWnd.m_fpHighResolutionScale);
14301439 ListView_SetColumn(m_hListView2, 1, &lvclm);
14311440
14321441 //位置調整 (Button)
@@ -1436,15 +1445,15 @@
14361445 pt.y = rc.top;
14371446 ScreenToClient(m_hWnd, &pt);
14381447 pt.x = rcw.right;
1439- pt.x -= RECT_WIDTH(&rc)+(int)(3*g_MainWnd.m_fpHighResolutionScale);
1448+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
14401449 MoveWindow(hdi, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
14411450 hdi = GetDlgItem(m_hWnd, IDC_BTN_DEL);
14421451 GetWindowRect(hdi, &rc);
1443- pt.x -= RECT_WIDTH(&rc)+(int)(3*g_MainWnd.m_fpHighResolutionScale);
1452+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
14441453 MoveWindow(hdi, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
14451454 hdi = GetDlgItem(m_hWnd, IDC_BTN_NEW);
14461455 GetWindowRect(hdi, &rc);
1447- pt.x -= RECT_WIDTH(&rc)+(int)(3*g_MainWnd.m_fpHighResolutionScale);
1456+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
14481457 MoveWindow(hdi, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
14491458 }
14501459
@@ -1535,7 +1544,7 @@
15351544 pt.y = rc.top;
15361545 ScreenToClient(m_hWnd, &pt);
15371546 pt.x = rcw.right;
1538- pt.x -= RECT_WIDTH(&rc)+(int)(3*g_MainWnd.m_fpHighResolutionScale);
1547+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
15391548 MoveWindow(hdi, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
15401549
15411550 //位置調整 (CheckBox)
--- trunk/body/UserPathDlg.cpp (revision 141)
+++ trunk/body/UserPathDlg.cpp (revision 142)
@@ -13,6 +13,10 @@
1313 LRESULT CALLBACK UserPathDlgProc(HWND,UINT,WPARAM,LPARAM);
1414
1515 ///////////////////////////////////////////////////////////////
16+//MACRO
17+#define ITEM_SPACE (3)
18+
19+///////////////////////////////////////////////////////////////
1620 CUserPathDlg::CUserPathDlg(HWND hWnd, HINSTANCE hInst)
1721 {
1822 //パラメータの保存
@@ -135,23 +139,23 @@
135139 pt.y = rc.top;
136140 ScreenToClient(m_hWnd, &pt);
137141 pt.x = rcw.right;
138- pt.x -= RECT_WIDTH(&rc)+(int)(3*g_MainWnd.m_fpHighResolutionScale);
142+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
139143 MoveWindow(hlv, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
140144 hlv = GetDlgItem(m_hWnd, IDUPMOVE);
141145 GetWindowRect(hlv, &rc);
142- pt.x -= RECT_WIDTH(&rc)+(int)(2*g_MainWnd.m_fpHighResolutionScale);
146+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
143147 MoveWindow(hlv, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
144148 hlv = GetDlgItem(m_hWnd, IDEDIT);
145149 GetWindowRect(hlv, &rc);
146- pt.x -= RECT_WIDTH(&rc)+(int)(2*g_MainWnd.m_fpHighResolutionScale);
150+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
147151 MoveWindow(hlv, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
148152 hlv = GetDlgItem(m_hWnd, IDDELETE);
149153 GetWindowRect(hlv, &rc);
150- pt.x -= RECT_WIDTH(&rc)+(int)(2*g_MainWnd.m_fpHighResolutionScale);
154+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
151155 MoveWindow(hlv, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
152156 hlv = GetDlgItem(m_hWnd, IDADD);
153157 GetWindowRect(hlv, &rc);
154- pt.x -= RECT_WIDTH(&rc)+(int)(2*g_MainWnd.m_fpHighResolutionScale);
158+ pt.x -= RECT_WIDTH(&rc)+(int)(ITEM_SPACE*g_MainWnd.m_fpHighResolutionScale);
155159 MoveWindow(hlv, pt.x, pt.y, RECT_WIDTH(&rc), RECT_HEIGHT(&rc), TRUE);
156160 }
157161
Show on old repository browser