DXGL r570 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r569‎ | r570 | r571 >
Date:00:07, 30 November 2014
Author:admin
Status:new
Tags:
Comment:
Add paths tab to new DXGLCFG.
Modified paths:
  • /dxglcfg2/dxglcfg2.c (modified) (history)
  • /dxglcfg2/dxglcfg2.rc (modified) (history)
  • /dxglcfg2/resource.h (modified) (history)

Diff [purge]

Index: dxglcfg2/dxglcfg2.c
@@ -582,6 +582,17 @@
583583 }
584584 return TRUE;
585585 }
 586+LRESULT CALLBACK PathsTabCallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
 587+{
 588+ switch (Msg)
 589+ {
 590+ case WM_INITDIALOG:
 591+ return TRUE;
 592+ default:
 593+ return FALSE;
 594+ }
 595+ return TRUE;
 596+}
586597 LRESULT CALLBACK DXGLCfgCallback(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
587598 {
588599 PIXELFORMATDESCRIPTOR pfd =
@@ -728,6 +739,8 @@
729740 SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 3, (LPARAM)&tab);
730741 tab.pszText = _T("Debug");
731742 SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 4, (LPARAM)&tab);
 743+ tab.pszText = _T("Paths");
 744+ SendDlgItemMessage(hWnd, IDC_TABS, TCM_INSERTITEM, 5, (LPARAM)&tab);
732745 hTab = GetDlgItem(hWnd, IDC_TABS);
733746 hTabs[0] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_DISPLAY), hTab, DisplayTabCallback);
734747 hTabs[1] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_3DGRAPHICS), hTab, Tab3DCallback);
@@ -734,6 +747,7 @@
735748 hTabs[2] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_EFFECTS), hTab, EffectsTabCallback);
736749 hTabs[3] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_ADVANCED), hTab, AdvancedTabCallback);
737750 hTabs[4] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_DEBUG), hTab, DebugTabCallback);
 751+ hTabs[5] = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_PATHS), hTab, PathsTabCallback);
738752 SendDlgItemMessage(hWnd, IDC_TABS, TCM_GETITEMRECT, 0, (LPARAM)&r);
739753 SetWindowPos(hTabs[0], NULL, r.left, r.bottom + 3, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE);
740754 ShowWindow(hTabs[1], SW_HIDE);
@@ -740,6 +754,7 @@
741755 ShowWindow(hTabs[2], SW_HIDE);
742756 ShowWindow(hTabs[3], SW_HIDE);
743757 ShowWindow(hTabs[4], SW_HIDE);
 758+ ShowWindow(hTabs[5], SW_HIDE);
744759 tabopen = 0;
745760
746761 // Load global settings.
Index: dxglcfg2/dxglcfg2.rc
@@ -129,10 +129,18 @@
130130 LTEXT "Texture format", IDC_STATIC, 7, 7, 50, 8, SS_LEFT, WS_EX_LEFT
131131 LTEXT "Texture access method", IDC_STATIC, 114, 7, 76, 8, SS_LEFT, WS_EX_LEFT
132132 COMBOBOX IDC_TEXUPLOAD, 114, 17, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
 133+ LTEXT "Display name", 0, 7, 35, 43, 9, SS_LEFT, WS_EX_LEFT
 134+ EDITTEXT IDC_DISPLAYNAME, 7, 46, 209, 14, ES_AUTOHSCROLL, WS_EX_LEFT
133135 }
134136
 137+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 138+IDD_PATHS DIALOG 0, 0, 283, 173
 139+STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
 140+FONT 8, "Ms Shell Dlg"
 141+{
 142+ LISTBOX IDC_PATHS, 7, 7, 269, 162, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_SORT | LBS_NOTIFY, WS_EX_LEFT
 143+}
135144
136 -
137145 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
138146 IDD_LOADING DIALOG 0, 0, 246, 41
139147 STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_POPUP | WS_SYSMENU
Index: dxglcfg2/resource.h
@@ -1,20 +1,3 @@
2 -// DXGL
3 -// Copyright (C) 2011-2014 William Feely
4 -
5 -// This library is free software; you can redistribute it and/or
6 -// modify it under the terms of the GNU Lesser General Public
7 -// License as published by the Free Software Foundation; either
8 -// version 2.1 of the License, or (at your option) any later version.
9 -
10 -// This library is distributed in the hope that it will be useful,
11 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 -// Lesser General Public License for more details.
14 -
15 -// You should have received a copy of the GNU Lesser General Public
16 -// License along with this library; if not, write to the Free Software
17 -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 -
192 #ifndef IDC_STATIC
203 #define IDC_STATIC (-1)
214 #endif
@@ -29,6 +12,7 @@
3013 #define IDD_EFFECTS 113
3114 #define IDD_ADVANCED 114
3215 #define IDD_DEBUG 115
 16+#define IDD_PATHS 116
3317 #define IDC_APPLY 1000
3418 #define IDC_APPS 1001
3519 #define IDC_ADD 1002
@@ -61,3 +45,5 @@
6246 #define IDC_COLOR 1029
6347 #define IDC_USESHADER 1030
6448 #define IDC_PROGRESS 1031
 49+#define IDC_DISPLAYNAME 1032
 50+#define IDC_PATHS 1033