ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
15 participants
161 discussions
Start a n
N
ew thread
[reactos] 01/01: [APPWIZ] Enable auto-completion on 'Create Shortcut' (#3521)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c43efcb1bbe79d8439a29…
commit c43efcb1bbe79d8439a29f07f73b7b58886dc2a9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Mar 10 20:59:57 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Mar 10 20:59:57 2021 +0900 [APPWIZ] Enable auto-completion on 'Create Shortcut' (#3521) CORE-9281 --- dll/cpl/appwiz/createlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c index c8aeee5c451..5646ce29477 100644 --- a/dll/cpl/appwiz/createlink.c +++ b/dll/cpl/appwiz/createlink.c @@ -246,6 +246,7 @@ WelcomeDlgProc(HWND hwndDlg, pContext = (PCREATE_LINK_CONTEXT) ppsp->lParam; SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext); PropSheet_SetWizButtons(GetParent(hwndDlg), 0); + SHAutoComplete(GetDlgItem(hwndDlg, IDC_SHORTCUT_LOCATION), SHACF_DEFAULT); break; case WM_COMMAND: switch(HIWORD(wParam))
3 years, 9 months
1
0
0
0
[reactos] 01/01: [BROWSEUI] Follow-up of #3507
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71e4450761d6fbc2801d2…
commit 71e4450761d6fbc2801d23ae3e00674ab65f7519 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Mar 10 19:45:03 2021 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Wed Mar 10 19:45:03 2021 +0900 [BROWSEUI] Follow-up of #3507 Case insensitiveness fix. CORE-9281 --- dll/win32/browseui/CAutoComplete.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/browseui/CAutoComplete.cpp b/dll/win32/browseui/CAutoComplete.cpp index d1ba30d4b86..9bb6405d594 100644 --- a/dll/win32/browseui/CAutoComplete.cpp +++ b/dll/win32/browseui/CAutoComplete.cpp @@ -830,7 +830,8 @@ VOID CAutoComplete::DoAutoAppend() for (INT ich = 0; ich < strCommon.GetLength(); ++ich) { - if (ich < strItem.GetLength() && strCommon[ich] != strItem[ich]) + if (ich < strItem.GetLength() && + ::ChrCmpIW(strCommon[ich], strItem[ich]) != 0) { strCommon = strCommon.Left(ich); // shrink the common string break;
3 years, 9 months
1
0
0
0
[reactos] 01/01: [BROWSEUI] Implement auto-completion (#3507)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c19d9df2593d6376f783d…
commit c19d9df2593d6376f783dae78ba67fe53280fa4a Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Mar 10 16:22:57 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Mar 10 16:22:57 2021 +0900 [BROWSEUI] Implement auto-completion (#3507) Implement IAutoComplete to realize input auto completion. CORE-9281, CORE-1419 - The main features of this PR are Auto-Suggest and Auto-Append. - Auto-Suggest shows a list near the textbox (an EDIT control) when the user has typed partial pathname into the textbox. - Auto-Append appends complement text into the textbox to complete the pathname with selected status. - The list of AutoSuggest is a top-level window whose window class is "Auto-Suggest Dropdown". We call it "the drop-down window". - The drop-down window contains three controls: a listview, a scrollbar and a sizebox. - The drop-down window watches the input into the textbox. If the textbox changed, then the window updates the list. - The sizebox control enables the user to resize the drop-down window. --- dll/win32/browseui/CAutoComplete.cpp | 2457 ++++++++++++++++++++++++++-------- dll/win32/browseui/CAutoComplete.h | 319 ++++- 2 files changed, 2202 insertions(+), 574 deletions(-) diff --git a/dll/win32/browseui/CAutoComplete.cpp b/dll/win32/browseui/CAutoComplete.cpp index ffd14267d3e..d1ba30d4b86 100644 --- a/dll/win32/browseui/CAutoComplete.cpp +++ b/dll/win32/browseui/CAutoComplete.cpp @@ -20,669 +20,2076 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* - Implemented: - - ACO_AUTOAPPEND style - - ACO_AUTOSUGGEST style - - ACO_UPDOWNKEYDROPSLIST style - - - Handle pwzsRegKeyPath and pwszQuickComplete in Init +#include "precomp.h" +/* TODO: - implement ACO_SEARCH style - implement ACO_FILTERPREFIXES style - implement ACO_USETAB style - implement ACO_RTLREADING style - */ -#include "precomp.h" +#define CX_LIST 30160 // width of m_hwndList (very wide but alright) +#define CY_LIST 288 // maximum height of drop-down window +#define CY_ITEM 18 // default height of listview item +#define COMPLETION_TIMEOUT 250 // in milliseconds +#define MAX_ITEM_COUNT 1000 // the maximum number of items +#define WATCH_TIMER_ID 0xFEEDBEEF // timer ID to watch m_rcEdit +#define WATCH_INTERVAL 300 // in milliseconds -static const WCHAR autocomplete_propertyW[] = {'W','i','n','e',' ','A','u','t','o', - 'c','o','m','p','l','e','t','e',' ', - 'c','o','n','t','r','o','l',0}; +static HHOOK s_hMouseHook = NULL; // hook handle +static HWND s_hWatchWnd = NULL; // the window handle to watch -/************************************************************************** - * IAutoComplete_Constructor - */ -CAutoComplete::CAutoComplete() +// mouse hook procedure to watch the mouse click +//
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/m…
+static LRESULT CALLBACK MouseProc(INT nCode, WPARAM wParam, LPARAM lParam) { - m_enabled = TRUE; - m_initialized = FALSE; - m_options = ACO_AUTOAPPEND; - m_wpOrigEditProc = NULL; - m_hwndListBox = NULL; - m_txtbackup = NULL; - m_quickComplete = NULL; - m_hwndEdit = NULL; - m_wpOrigLBoxProc = NULL; + if (s_hMouseHook == NULL) + return 0; // do default + // if the user clicked the outside of s_hWatchWnd, then hide the drop-down window + if (nCode == HC_ACTION && // an action? + s_hWatchWnd && ::IsWindow(s_hWatchWnd) && // s_hWatchWnd is valid? + ::GetCapture() == NULL) // no capture? (dragging something?) + { + RECT rc; + MOUSEHOOKSTRUCT *pMouseHook = reinterpret_cast<MOUSEHOOKSTRUCT *>(lParam); + switch (wParam) + { + case WM_LBUTTONDOWN: case WM_LBUTTONUP: + case WM_RBUTTONDOWN: case WM_RBUTTONUP: + case WM_MBUTTONDOWN: case WM_MBUTTONUP: + case WM_NCLBUTTONDOWN: case WM_NCLBUTTONUP: + case WM_NCRBUTTONDOWN: case WM_NCRBUTTONUP: + case WM_NCMBUTTONDOWN: case WM_NCMBUTTONUP: + { + ::GetWindowRect(s_hWatchWnd, &rc); + if (!::PtInRect(&rc, pMouseHook->pt)) // outside of s_hWatchWnd? + { + ::ShowWindowAsync(s_hWatchWnd, SW_HIDE); // hide it + } + break; + } + } + } + return ::CallNextHookEx(s_hMouseHook, nCode, wParam, lParam); // go next hook } -/************************************************************************** - * IAutoComplete_Destructor - */ -CAutoComplete::~CAutoComplete() +////////////////////////////////////////////////////////////////////////////// +// sorting algorithm +//
http://www.ics.kagoshima-u.ac.jp/~fuchida/edu/algorithm/sort-algorithm/
+ +typedef CSimpleArray<CStringW> list_t; + +static inline INT pivot(list_t& a, INT i, INT j) +{ + INT k = i + 1; + while (k <= j && a[i].CompareNoCase(a[k]) == 0) + k++; + if (k > j) + return -1; + if (a[i].CompareNoCase(a[k]) >= 0) + return i; + return k; + } + +static inline INT partition(list_t& a, INT i, INT j, const CStringW& x) { - TRACE(" destroying IAutoComplete(%p)\n", this); - HeapFree(GetProcessHeap(), 0, m_quickComplete); - HeapFree(GetProcessHeap(), 0, m_txtbackup); - if (m_wpOrigEditProc) + INT left = i, right = j; + while (left <= right) { - SetWindowLongPtrW(m_hwndEdit, GWLP_WNDPROC, (LONG_PTR)m_wpOrigEditProc); - RemovePropW(m_hwndEdit, autocomplete_propertyW); + while (left <= j && a[left].CompareNoCase(x) < 0) + left++; + while (right >= i && a[right].CompareNoCase(x) >= 0) + right--; + if (left > right) + break; + + CStringW tmp = a[left]; + a[left] = a[right]; + a[right] = tmp; + + left++; + right--; } - if (m_hwndListBox) - DestroyWindow(m_hwndListBox); + return left; } -/****************************************************************************** - * IAutoComplete_fnEnable - */ -HRESULT WINAPI CAutoComplete::Enable(BOOL fEnable) +static void quicksort(list_t& a, INT i, INT j) { - HRESULT hr = S_OK; - - TRACE("(%p)->(%s)\n", this, (fEnable) ? "true" : "false"); - - m_enabled = fEnable; - - return hr; + if (i == j) + return; + INT p = pivot(a, i, j); + if (p == -1) + return; + INT k = partition(a, i, j, a[p]); + quicksort(a, i, k - 1); + quicksort(a, k, j); } -/****************************************************************************** - * create_listbox - */ -void CAutoComplete::CreateListbox() +static inline void DoSort(list_t& list) { - HWND hwndParent = GetParent(m_hwndEdit); + if (list.GetSize() <= 1) // sanity check + return; + quicksort(list, 0, list.GetSize() - 1); // quick sort +} - /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ - m_hwndListBox = CreateWindowExW(0, WC_LISTBOXW, NULL, - WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwndParent, NULL, - (HINSTANCE)GetWindowLongPtrW(hwndParent, GWLP_HINSTANCE), NULL); +// std::unique +static INT DoUnique(list_t& list) +{ + INT first = 0, last = list.GetSize(); + if (first == last) + return last; + INT result = first; + while (++first != last) + { + if (list[result].CompareNoCase(list[first]) != 0) + list[++result] = list[first]; + } + return ++result; +} - if (m_hwndListBox) +static inline void DoUniqueAndTrim(list_t& list) +{ + INT last = DoUnique(list); + while (list.GetSize() > last) { - m_wpOrigLBoxProc = (WNDPROC)SetWindowLongPtrW(m_hwndListBox, GWLP_WNDPROC, (LONG_PTR)ACLBoxSubclassProc); - SetWindowLongPtrW(m_hwndListBox, GWLP_USERDATA, (LONG_PTR)this); + list.RemoveAt(last); } } +////////////////////////////////////////////////////////////////////////////// +// CACEditCtrl -/****************************************************************************** - * IAutoComplete_fnInit - */ -HRESULT WINAPI CAutoComplete::Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete) +// range of WCHAR (inclusive) +struct RANGE { - TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", - this, hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); - - if (m_options & ACO_AUTOSUGGEST) - TRACE(" ACO_AUTOSUGGEST\n"); - if (m_options & ACO_AUTOAPPEND) - TRACE(" ACO_AUTOAPPEND\n"); - if (m_options & ACO_SEARCH) - FIXME(" ACO_SEARCH not supported\n"); - if (m_options & ACO_FILTERPREFIXES) - FIXME(" ACO_FILTERPREFIXES not supported\n"); - if (m_options & ACO_USETAB) - FIXME(" ACO_USETAB not supported\n"); - if (m_options & ACO_UPDOWNKEYDROPSLIST) - TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); - if (m_options & ACO_RTLREADING) - FIXME(" ACO_RTLREADING not supported\n"); + WCHAR from, to; +}; - if (!hwndEdit || !punkACL) - return E_INVALIDARG; +// a callback function for bsearch: comparison of two ranges +static inline int RangeCompare(const void *x, const void *y) +{ + const RANGE *a = reinterpret_cast<const RANGE *>(x); + const RANGE *b = reinterpret_cast<const RANGE *>(y); + if (a->to < b->from) + return -1; + if (b->to < a->from) + return 1; + return 0; +} - if (m_initialized) +// is the WCHAR a word break? +static inline BOOL IsWordBreak(WCHAR ch) +{ + // the ranges of word break characters + static const RANGE s_ranges[] = { - WARN("Autocompletion object is already initialized\n"); - /* This->hwndEdit is set to NULL when the edit window is destroyed. */ - return m_hwndEdit ? E_FAIL : E_UNEXPECTED; - } + { 0x0009, 0x0009 }, { 0x0020, 0x002f }, { 0x003a, 0x0040 }, { 0x005b, 0x0060 }, + { 0x007b, 0x007e }, { 0x00ab, 0x00ab }, { 0x00ad, 0x00ad }, { 0x00bb, 0x00bb }, + { 0x02c7, 0x02c7 }, { 0x02c9, 0x02c9 }, { 0x055d, 0x055d }, { 0x060c, 0x060c }, + { 0x2002, 0x200b }, { 0x2013, 0x2014 }, { 0x2016, 0x2016 }, { 0x2018, 0x2018 }, + { 0x201c, 0x201d }, { 0x2022, 0x2022 }, { 0x2025, 0x2027 }, { 0x2039, 0x203a }, + { 0x2045, 0x2046 }, { 0x207d, 0x207e }, { 0x208d, 0x208e }, { 0x226a, 0x226b }, + { 0x2574, 0x2574 }, { 0x3001, 0x3003 }, { 0x3005, 0x3005 }, { 0x3008, 0x3011 }, + { 0x3014, 0x301b }, { 0x301d, 0x301e }, { 0x3041, 0x3041 }, { 0x3043, 0x3043 }, + { 0x3045, 0x3045 }, { 0x3047, 0x3047 }, { 0x3049, 0x3049 }, { 0x3063, 0x3063 }, + { 0x3083, 0x3083 }, { 0x3085, 0x3085 }, { 0x3087, 0x3087 }, { 0x308e, 0x308e }, + { 0x309b, 0x309e }, { 0x30a1, 0x30a1 }, { 0x30a3, 0x30a3 }, { 0x30a5, 0x30a5 }, + { 0x30a7, 0x30a7 }, { 0x30a9, 0x30a9 }, { 0x30c3, 0x30c3 }, { 0x30e3, 0x30e3 }, + { 0x30e5, 0x30e5 }, { 0x30e7, 0x30e7 }, { 0x30ee, 0x30ee }, { 0x30f5, 0x30f6 }, + { 0x30fc, 0x30fe }, { 0xfd3e, 0xfd3f }, { 0xfe30, 0xfe31 }, { 0xfe33, 0xfe44 }, + { 0xfe4f, 0xfe51 }, { 0xfe59, 0xfe5e }, { 0xff08, 0xff09 }, { 0xff0c, 0xff0c }, + { 0xff0e, 0xff0e }, { 0xff1c, 0xff1c }, { 0xff1e, 0xff1e }, { 0xff3b, 0xff3b }, + { 0xff3d, 0xff3d }, { 0xff40, 0xff40 }, { 0xff5b, 0xff5e }, { 0xff61, 0xff64 }, + { 0xff67, 0xff70 }, { 0xff9e, 0xff9f }, { 0xffe9, 0xffe9 }, { 0xffeb, 0xffeb }, + }; + // binary search + RANGE range = { ch, ch }; + return !!bsearch(&range, s_ranges, _countof(s_ranges), sizeof(RANGE), RangeCompare); +} - if (!SUCCEEDED(punkACL->QueryInterface(IID_PPV_ARG(IEnumString, &m_enumstr)))) +// This function is an application-defined callback function. +//
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-editw…
+static INT CALLBACK +EditWordBreakProcW(LPWSTR lpch, INT index, INT count, INT code) +{ + switch (code) { - TRACE("No IEnumString interface\n"); - return E_NOINTERFACE; - } - - m_hwndEdit = hwndEdit; - m_initialized = TRUE; + case WB_ISDELIMITER: + return IsWordBreak(lpch[index]); + + case WB_LEFT: + if (index) + --index; + while (index && !IsWordBreak(lpch[index])) + --index; + return index; + + case WB_RIGHT: + if (!count) + break; + while (index < count && lpch[index] && !IsWordBreak(lpch[index])) + ++index; + return index; - /* Keep at least one reference to the object until the edit window is destroyed. */ - AddRef(); + default: + break; + } + return 0; +} - /* If another AutoComplete object was previously assigned to this edit control, - release it but keep the same callback on the control, to avoid an infinite - recursive loop in ACEditSubclassProc while the property is set to this object */ - CAutoComplete *prev = static_cast<CAutoComplete *>(GetPropW(m_hwndEdit, autocomplete_propertyW)); +CACEditCtrl::CACEditCtrl() : m_pDropDown(NULL), m_fnOldWordBreakProc(NULL) +{ +} - if (prev && prev->m_initialized) +VOID CACEditCtrl::HookWordBreakProc(BOOL bHook) +{ + if (bHook) { - m_wpOrigEditProc = prev->m_wpOrigEditProc; - SetPropW(m_hwndEdit, autocomplete_propertyW, this); - prev->m_wpOrigEditProc = NULL; - prev->Release(); + m_fnOldWordBreakProc = reinterpret_cast<EDITWORDBREAKPROCW>( + SendMessageW(EM_SETWORDBREAKPROC, 0, + reinterpret_cast<LPARAM>(EditWordBreakProcW))); } else { - SetPropW(m_hwndEdit, autocomplete_propertyW, (HANDLE)this); - m_wpOrigEditProc = (WNDPROC)SetWindowLongPtrW(m_hwndEdit, GWLP_WNDPROC, (LONG_PTR)ACEditSubclassProc); - } - - if (m_options & ACO_AUTOSUGGEST) - { - CreateListbox(); + SendMessageW(EM_SETWORDBREAKPROC, 0, + reinterpret_cast<LPARAM>(m_fnOldWordBreakProc)); } +} - if (pwzsRegKeyPath) - { - WCHAR *key; - WCHAR result[MAX_PATH]; - WCHAR *value; - HKEY hKey = 0; - LONG res; - LONG len; +// WM_CHAR +// This message is posted to the window with the keyboard focus when WM_KEYDOWN is translated. +LRESULT CACEditCtrl::OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACEditCtrl::OnChar(%p, %p)\n", this, wParam); + ATLASSERT(m_pDropDown); + return m_pDropDown->OnEditChar(wParam, lParam); +} - /* pwszRegKeyPath contains the key as well as the value, so we split */ - key = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwzsRegKeyPath) + 1) * sizeof(WCHAR)); +// WM_CUT / WM_PASTE / WM_CLEAR @implemented +LRESULT CACEditCtrl::OnCutPasteClear(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACEditCtrl::OnCutPasteClear(%p)\n", this); + ATLASSERT(m_pDropDown); + LRESULT ret = DefWindowProcW(uMsg, wParam, lParam); // do default + m_pDropDown->OnEditUpdate(TRUE); + return ret; +} - if (key) - { - wcscpy(key, pwzsRegKeyPath); - value = const_cast<WCHAR *>(wcsrchr(key, '\\')); +// WM_DESTROY +// This message is sent when a window is being destroyed. +LRESULT CACEditCtrl::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACEditCtrl::OnDestroy(%p)\n", this); + ATLASSERT(m_pDropDown); + CAutoComplete *pDropDown = m_pDropDown; - if (value) - { - *value = 0; - value++; - /* Now value contains the value and buffer the key */ - res = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey); - - if (res != ERROR_SUCCESS) - { - /* if the key is not found, MSDN states we must seek in HKEY_LOCAL_MACHINE */ - res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey); - } - - if (res == ERROR_SUCCESS) - { - len = sizeof(result); - res = RegQueryValueW(hKey, value, result, &len); - if (res == ERROR_SUCCESS) - { - m_quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)); - wcscpy(m_quickComplete, result); - } - RegCloseKey(hKey); - } - } + // unhook word break procedure + HookWordBreakProc(FALSE); - HeapFree(GetProcessHeap(), 0, key); - } - else - { - TRACE("HeapAlloc Failed when trying to alloca %d bytes\n", (wcslen(pwzsRegKeyPath) + 1) * sizeof(WCHAR)); - return S_FALSE; - } - } + // unsubclass because we don't watch any more + HWND hwndEdit = UnsubclassWindow(); - if ((pwszQuickComplete) && (!m_quickComplete)) + // close the drop-down window + if (pDropDown) { - m_quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwszQuickComplete) + 1) * sizeof(WCHAR)); - - if (m_quickComplete) - { - wcscpy(m_quickComplete, pwszQuickComplete); - } - else - { - TRACE("HeapAlloc Failed when trying to alloca %d bytes\n", (wcslen(pwszQuickComplete) + 1) * sizeof(WCHAR)); - return S_FALSE; - } + pDropDown->PostMessageW(WM_CLOSE, 0, 0); } - return S_OK; + return ::DefWindowProcW(hwndEdit, uMsg, wParam, lParam); // do default } -/************************************************************************** - * IAutoComplete_fnGetOptions - */ -HRESULT WINAPI CAutoComplete::GetOptions(DWORD *pdwFlag) +// WM_GETDLGCODE +// By responding to this message, an application can take control of a particular type of +// input and process the input itself. +LRESULT CACEditCtrl::OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - HRESULT hr = S_OK; + TRACE("CACEditCtrl::OnGetDlgCode(%p)\n", this); + ATLASSERT(m_pDropDown); - TRACE("(%p) -> (%p)\n", this, pdwFlag); + LRESULT ret = DefWindowProcW(uMsg, wParam, lParam); // get default - *pdwFlag = m_options; + if (m_pDropDown) + { + // some special keys need default processing. we handle them here + switch (wParam) + { + case VK_RETURN: + if (m_pDropDown->IsWindowVisible() || ::GetKeyState(VK_CONTROL) < 0) + m_pDropDown->OnEditKeyDown(VK_RETURN, 0); + break; + case VK_TAB: + if (m_pDropDown->IsWindowVisible() && m_pDropDown->UseTab()) + m_pDropDown->OnEditKeyDown(VK_TAB, 0); + break; + case VK_ESCAPE: + if (m_pDropDown->IsWindowVisible()) + ret |= DLGC_WANTALLKEYS; // we want all keys to manipulate the list + break; + default: + { + ret |= DLGC_WANTALLKEYS; // we want all keys to manipulate the list + break; + } + } + } - return hr; + return ret; } -/************************************************************************** - * IAutoComplete_fnSetOptions - */ -HRESULT WINAPI CAutoComplete::SetOptions(DWORD dwFlag) +// WM_KEYDOWN +// This message is posted to the window with the keyboard focus when a non-system key is pressed. +LRESULT CACEditCtrl::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - HRESULT hr = S_OK; + TRACE("CACEditCtrl::OnKeyDown(%p, %p)\n", this, wParam); + ATLASSERT(m_pDropDown); + if (m_pDropDown->OnEditKeyDown(wParam, lParam)) + return 1; // eat + bHandled = FALSE; // do default + return 0; +} - TRACE("(%p) -> (0x%x)\n", this, dwFlag); +// WM_KILLFOCUS @implemented +// This message is sent to a window immediately before it loses the keyboard focus. +LRESULT CACEditCtrl::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACEditCtrl::OnKillFocus(%p)\n", this); + ATLASSERT(m_pDropDown); - m_options = (AUTOCOMPLETEOPTIONS)dwFlag; + // hide the list if lost focus + HWND hwndGotFocus = (HWND)wParam; + if (hwndGotFocus != m_hWnd && hwndGotFocus != m_pDropDown->m_hWnd) + { + m_pDropDown->HideDropDown(); + } - if ((m_options & ACO_AUTOSUGGEST) && m_hwndEdit && !m_hwndListBox) - CreateListbox(); + bHandled = FALSE; // do default + return 0; +} - return hr; +// WM_SETFOCUS +// This message is sent to a window after it has gained the keyboard focus. +LRESULT CACEditCtrl::OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACEditCtrl::OnSetFocus(%p)\n", this); + ATLASSERT(m_pDropDown); + bHandled = FALSE; // do default + return 0; } -/* Edit_BackWord --- Delete previous word in text box */ -static void Edit_BackWord(HWND hwndEdit) +// WM_SETTEXT +// An application sends this message to set the text of a window. +LRESULT CACEditCtrl::OnSetText(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - INT iStart, iEnd; - iStart = iEnd = 0; - SendMessageW(hwndEdit, EM_GETSEL, (WPARAM)&iStart, (LPARAM)&iEnd); + TRACE("CACEditCtrl::OnSetText(%p)\n", this); + ATLASSERT(m_pDropDown); + if (!m_pDropDown->m_bInSetText) + m_pDropDown->HideDropDown(); // it's mechanical WM_SETTEXT + bHandled = FALSE; // do default + return 0; +} - if (iStart != iEnd || iStart < 0) - return; +////////////////////////////////////////////////////////////////////////////// +// CACListView - size_t cchText = GetWindowTextLengthW(hwndEdit); - if (cchText < (size_t)iStart || (INT)cchText <= 0) - return; +CACListView::CACListView() : m_pDropDown(NULL), m_cyItem(CY_ITEM) +{ +} - CComHeapPtr<WCHAR> pszText; - if (!pszText.Allocate(cchText + 1)) - return; +HWND CACListView::Create(HWND hwndParent) +{ + ATLASSERT(m_hWnd == NULL); + DWORD dwStyle = WS_CHILD | /*WS_VISIBLE |*/ WS_CLIPSIBLINGS | LVS_NOCOLUMNHEADER | + LVS_OWNERDATA | LVS_OWNERDRAWFIXED | LVS_SINGLESEL | LVS_REPORT; + HWND hWnd = ::CreateWindowExW(0, GetWndClassName(), L"Internet Explorer", dwStyle, + 0, 0, 0, 0, hwndParent, NULL, + _AtlBaseModule.GetModuleInstance(), NULL); + SubclassWindow(hWnd); // do subclass to handle messages + // set extended listview style + DWORD exstyle = LVS_EX_ONECLICKACTIVATE | LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT; + SetExtendedListViewStyle(exstyle, exstyle); + // insert one column (needed to insert items) + LV_COLUMNW column = { LVCF_FMT | LVCF_WIDTH }; + column.fmt = LVCFMT_LEFT; + column.cx = CX_LIST - ::GetSystemMetrics(SM_CXVSCROLL); + InsertColumn(0, &column); + return m_hWnd; +} - if (GetWindowTextW(hwndEdit, pszText, cchText + 1) <= 0) - return; +// set font handle +VOID CACListView::SetFont(HFONT hFont) +{ + SendMessageW(WM_SETFONT, (WPARAM)hFont, TRUE); // set font - WORD types[2]; - for (--iStart; 0 < iStart; --iStart) + // get listview item height + m_cyItem = CY_ITEM; + HDC hDC = GetDC(); + if (hDC) { - GetStringTypeW(CT_CTYPE1, &pszText[iStart - 1], 2, types); - if (((types[0] & C1_PUNCT) && !(types[1] & C1_SPACE)) || - ((types[0] & C1_SPACE) && (types[1] & (C1_ALPHA | C1_DIGIT)))) + HGDIOBJ hFontOld = ::SelectObject(hDC, hFont); + TEXTMETRICW tm; + if (::GetTextMetricsW(hDC, &tm)) { - SendMessageW(hwndEdit, EM_SETSEL, iStart, iEnd); - SendMessageW(hwndEdit, EM_REPLACESEL, TRUE, (LPARAM)L""); - return; + m_cyItem = (tm.tmHeight * 3) / 2; // 3/2 of text height } + ::SelectObject(hDC, hFontOld); + ReleaseDC(hDC); } +} - if (iStart == 0) - { - SendMessageW(hwndEdit, EM_SETSEL, iStart, iEnd); - SendMessageW(hwndEdit, EM_REPLACESEL, TRUE, (LPARAM)L""); - } +// get the number of visible items +INT CACListView::GetVisibleCount() +{ + if (m_cyItem <= 0) // avoid "division by zero" + return 0; + CRect rc; + GetClientRect(&rc); + return rc.Height() / m_cyItem; } -/* - Window procedure for autocompletion - */ -LRESULT APIENTRY CAutoComplete::ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +// get the text of an item +CStringW CACListView::GetItemText(INT iItem) { - CAutoComplete *pThis = static_cast<CAutoComplete *>(GetPropW(hwnd, autocomplete_propertyW)); - HRESULT hr; - WCHAR hwndText[255]; - WCHAR *hwndQCText; - RECT r; - BOOL control, filled, displayall = FALSE; - int cpt, height, sel; - ULONG fetched; + // NOTE: LVS_OWNERDATA doesn't support LVM_GETITEMTEXT. + ATLASSERT(m_pDropDown); + ATLASSERT(GetStyle() & LVS_OWNERDATA); + return m_pDropDown->GetItemText(iItem); +} - if (!pThis->m_enabled) - { - return CallWindowProcW(pThis->m_wpOrigEditProc, hwnd, uMsg, wParam, lParam); - } +// get the item index from position +INT CACListView::ItemFromPoint(INT x, INT y) +{ + LV_HITTESTINFO hittest; + hittest.pt.x = x; + hittest.pt.y = y; + return HitTest(&hittest); +} - switch (uMsg) - { - case CB_SHOWDROPDOWN: - { - ShowWindow(pThis->m_hwndListBox, SW_HIDE); - }; break; +// get current selection +INT CACListView::GetCurSel() +{ + return GetNextItem(-1, LVNI_ALL | LVNI_SELECTED); +} - case WM_KILLFOCUS: - { - if ((pThis->m_options & ACO_AUTOSUGGEST) && ((HWND)wParam != pThis->m_hwndListBox)) - { - ShowWindow(pThis->m_hwndListBox, SW_HIDE); - } - return CallWindowProcW(pThis->m_wpOrigEditProc, hwnd, uMsg, wParam, lParam); - }; break; +// set current selection +VOID CACListView::SetCurSel(INT iItem) +{ + if (iItem == -1) + SetItemState(-1, 0, LVIS_SELECTED); // select none + else + SetItemState(iItem, LVIS_SELECTED, LVIS_SELECTED); +} - case WM_KEYUP: - { - GetWindowTextW(hwnd, (LPWSTR)hwndText, 255); +// select the specific position (in client coordinates) +VOID CACListView::SelectHere(INT x, INT y) +{ + SetCurSel(ItemFromPoint(x, y)); +} - switch(wParam) - { - case VK_RETURN: - { - /* If quickComplete is set and control is pressed, replace the string */ - control = GetKeyState(VK_CONTROL) & 0x8000; - if (control && pThis->m_quickComplete) - { - hwndQCText = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (wcslen(pThis->m_quickComplete)+wcslen(hwndText))*sizeof(WCHAR)); - sel = swprintf(hwndQCText, pThis->m_quickComplete, hwndText); - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); - SendMessageW(hwnd, EM_SETSEL, 0, sel); - HeapFree(GetProcessHeap(), 0, hwndQCText); - } - - ShowWindow(pThis->m_hwndListBox, SW_HIDE); - return 0; - }; break; - - case VK_LEFT: - case VK_RIGHT: - { - return 0; - }; break; +// WM_LBUTTONUP / WM_MBUTTONUP / WM_RBUTTONUP @implemented +LRESULT CACListView::OnButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACListView::OnButtonUp(%p)\n", this); + return 0; // eat +} - case VK_UP: - case VK_DOWN: - { - /* Two cases here : - - if the listbox is not visible, displays it - with all the entries if the style ACO_UPDOWNKEYDROPSLIST - is present but does not select anything. - - if the listbox is visible, change the selection - */ - if ( (pThis->m_options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) - && (!IsWindowVisible(pThis->m_hwndListBox) && (! *hwndText)) ) - { - /* We must display all the entries */ - displayall = TRUE; - } - else - { - if (IsWindowVisible(pThis->m_hwndListBox)) - { - int count; - - count = SendMessageW(pThis->m_hwndListBox, LB_GETCOUNT, 0, 0); - /* Change the selection */ - sel = SendMessageW(pThis->m_hwndListBox, LB_GETCURSEL, 0, 0); - if (wParam == VK_UP) - sel = ((sel-1) < 0) ? count-1 : sel-1; - else - sel = ((sel+1) >= count) ? -1 : sel+1; - - SendMessageW(pThis->m_hwndListBox, LB_SETCURSEL, sel, 0); - - if (sel != -1) - { - WCHAR *msg; - int len; - - len = SendMessageW(pThis->m_hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(WCHAR)); - - if (msg) - { - SendMessageW(pThis->m_hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(hwnd, EM_SETSEL, wcslen(msg), wcslen(msg)); - - HeapFree(GetProcessHeap(), 0, msg); - } - else - { - TRACE("HeapAlloc failed to allocate %d bytes\n", (len + 1) * sizeof(WCHAR)); - } - } - else - { - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)pThis->m_txtbackup); - SendMessageW(hwnd, EM_SETSEL, wcslen(pThis->m_txtbackup), wcslen(pThis->m_txtbackup)); - } - } - return 0; - } - }; break; - - case VK_BACK: - { - if (GetKeyState(VK_CONTROL) < 0) // Ctrl+Backspace - { - Edit_BackWord(hwnd); - return 0; - } - } - // FALL THROUGH - case VK_DELETE: - { - if ((! *hwndText) && (pThis->m_options & ACO_AUTOSUGGEST)) - { - ShowWindow(pThis->m_hwndListBox, SW_HIDE); - return CallWindowProcW(pThis->m_wpOrigEditProc, hwnd, uMsg, wParam, lParam); - } - - if (pThis->m_options & ACO_AUTOAPPEND) - { - DWORD b; - SendMessageW(hwnd, EM_GETSEL, (WPARAM)&b, (LPARAM)NULL); - if (b>1) - { - hwndText[b-1] = '\0'; - } - else - { - hwndText[0] = '\0'; - SetWindowTextW(hwnd, hwndText); - } - } - }; break; - - default: - ; - } +// WM_LBUTTONDOWN @implemented +// This message is posted when the user pressed the left mouse button while the cursor is inside. +LRESULT CACListView::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACListView::OnLButtonDown(%p)\n", this); + ATLASSERT(m_pDropDown); + INT iItem = ItemFromPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); + if (iItem != -1) + { + m_pDropDown->SelectItem(iItem); // select the item + CString strText = GetItemText(iItem); // get text of item + m_pDropDown->SetEditText(strText); // set text + m_pDropDown->SetEditSel(0, strText.GetLength()); // select all + m_pDropDown->HideDropDown(); // hide + } + return 0; +} - SendMessageW(pThis->m_hwndListBox, LB_RESETCONTENT, 0, 0); +// WM_MBUTTONDOWN / WM_RBUTTONDOWN @implemented +LRESULT CACListView::OnMRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACListView::OnMRButtonDown(%p)\n", this); + return 0; // eat +} - HeapFree(GetProcessHeap(), 0, pThis->m_txtbackup); +// WM_MOUSEWHEEL @implemented +LRESULT CACListView::OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACListView::OnMouseWheel(%p)\n", this); + ATLASSERT(m_pDropDown); + LRESULT ret = DefWindowProcW(uMsg, wParam, lParam); // do default + m_pDropDown->UpdateScrollBar(); + return ret; +} - pThis->m_txtbackup = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(hwndText)+1)*sizeof(WCHAR)); +// WM_NCHITTEST +LRESULT CACListView::OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CACListView::OnNCHitTest(%p)\n", this); + ATLASSERT(m_pDropDown); + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; // in screen coordinates + ScreenToClient(&pt); // into client coordinates + HWND hwndTarget = m_pDropDown->ChildWindowFromPoint(pt); + if (hwndTarget != m_hWnd) + return HTTRANSPARENT; // pass through (for resizing the drop-down window) + bHandled = FALSE; // do default + return 0; +} - if (pThis->m_txtbackup) - { - wcscpy(pThis->m_txtbackup, hwndText); - } - else - { - TRACE("HeapAlloc failed to allocate %d bytes\n", (wcslen(hwndText)+1)*sizeof(WCHAR)); - } +////////////////////////////////////////////////////////////////////////////// +// CACScrollBar - /* Returns if there is no text to search and we doesn't want to display all the entries */ - if ((!displayall) && (! *hwndText) ) - break; +CACScrollBar::CACScrollBar() : m_pDropDown(NULL) +{ +} - pThis->m_enumstr->Reset(); - filled = FALSE; - size_t curlen = wcslen(hwndText); +HWND CACScrollBar::Create(HWND hwndParent) +{ + ATLASSERT(m_hWnd == NULL); + DWORD dwStyle = WS_CHILD | /*WS_VISIBLE |*/ SBS_BOTTOMALIGN | SBS_VERT; + m_hWnd = ::CreateWindowExW(0, GetWndClassName(), NULL, dwStyle, + 0, 0, 0, 0, hwndParent, NULL, + _AtlBaseModule.GetModuleInstance(), NULL); + // we don't subclass because no message handling is needed + return m_hWnd; +} - for(cpt = 0;;) - { - CComHeapPtr<OLECHAR> strs; - hr = pThis->m_enumstr->Next(1, &strs, &fetched); - if (hr != S_OK) - break; +////////////////////////////////////////////////////////////////////////////// +// CACSizeBox - if (!_wcsnicmp(hwndText, strs, curlen)) - { +CACSizeBox::CACSizeBox() : m_pDropDown(NULL), m_bDowner(TRUE), m_bLongList(FALSE) +{ +} - if (pThis->m_options & ACO_AUTOAPPEND && *hwndText) - { - CComBSTR str((PCWSTR)strs); - memcpy(str.m_str, hwndText, curlen * sizeof(WCHAR)); - SetWindowTextW(hwnd, str); - SendMessageW(hwnd, EM_SETSEL, curlen, str.Length()); - if (!(pThis->m_options & ACO_AUTOSUGGEST)) - break; - } - - if (pThis->m_options & ACO_AUTOSUGGEST) - { - SendMessageW(pThis->m_hwndListBox, LB_ADDSTRING, 0, (LPARAM)(LPOLESTR)strs); - filled = TRUE; - cpt++; - } - } - } +HWND CACSizeBox::Create(HWND hwndParent) +{ + ATLASSERT(m_hWnd == NULL); + DWORD dwStyle = WS_CHILD | /*WS_VISIBLE |*/ SBS_SIZEBOX; + HWND hWnd = ::CreateWindowExW(0, GetWndClassName(), NULL, dwStyle, + 0, 0, 0, 0, hwndParent, NULL, + _AtlBaseModule.GetModuleInstance(), NULL); + SubclassWindow(hWnd); // do subclass to handle message + return m_hWnd; +} - if (pThis->m_options & ACO_AUTOSUGGEST) - { - if (filled) - { - height = SendMessageW(pThis->m_hwndListBox, LB_GETITEMHEIGHT, 0, 0); - SendMessageW(pThis->m_hwndListBox, LB_CARETOFF, 0, 0); - GetWindowRect(hwnd, &r); - SetParent(pThis->m_hwndListBox, HWND_DESKTOP); - /* It seems that Windows XP displays 7 lines at most - and otherwise displays a vertical scroll bar */ - SetWindowPos(pThis->m_hwndListBox, HWND_TOP, - r.left, r.bottom + 1, r.right - r.left, min(height * 7, height * (cpt + 1)), - SWP_SHOWWINDOW ); - } - else - { - ShowWindow(pThis->m_hwndListBox, SW_HIDE); - } - } +VOID CACSizeBox::SetStatus(BOOL bDowner, BOOL bLongList) +{ + // set flags + m_bDowner = bDowner; + m_bLongList = bLongList; - }; break; + if (bLongList) + { + SetWindowRgn(NULL, TRUE); // reset window region + return; + } - case WM_DESTROY: - { - /* Release our reference that we had since ->Init() */ - pThis->Release(); - return 0; - } + RECT rc; + GetWindowRect(&rc); // get size-box size + ::OffsetRect(&rc, -rc.left, -rc.top); // window regions use special coordinates + ATLASSERT(rc.left == 0 && rc.top == 0); + // create a trianglar region + HDC hDC = ::CreateCompatibleDC(NULL); + ::BeginPath(hDC); + if (m_bDowner) + { + ::MoveToEx(hDC, rc.right, 0, NULL); + ::LineTo(hDC, rc.right, rc.bottom); + ::LineTo(hDC, 0, rc.bottom); + ::LineTo(hDC, rc.right, 0); + } + else + { + ::MoveToEx(hDC, rc.right, rc.bottom, NULL); + ::LineTo(hDC, rc.right, 0); + ::LineTo(hDC, 0, 0); + ::LineTo(hDC, rc.right, rc.bottom); + } + ::EndPath(hDC); + HRGN hRgn = ::PathToRegion(hDC); + ::DeleteDC(hDC); - default: - { - return CallWindowProcW(pThis->m_wpOrigEditProc, hwnd, uMsg, wParam, lParam); - } + SetWindowRgn(hRgn, TRUE); // set the trianglar region +} - } +// WM_ERASEBKGND +LRESULT CACSizeBox::OnEraseBkGnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + return TRUE; // do nothing (for quick drawing) +} - return 0; +// WM_NCHITTEST +LRESULT CACSizeBox::OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + return HTTRANSPARENT; // pass through } -LRESULT APIENTRY CAutoComplete::ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +// WM_PAINT +LRESULT CACSizeBox::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - CAutoComplete *pThis = reinterpret_cast<CAutoComplete *>(GetWindowLongPtrW(hwnd, GWLP_USERDATA)); - WCHAR *msg; - int sel, len; + CRect rc; + GetClientRect(&rc); + + PAINTSTRUCT ps; + HDC hDC = BeginPaint(&ps); + if (!hDC) + return 0; - switch (uMsg) + // fill background + ::FillRect(hDC, &rc, ::GetSysColorBrush(COLOR_3DFACE)); + + // draw size-box + INT cxy = rc.Width(); + for (INT shift = 0; shift < 2; ++shift) { - case WM_MOUSEMOVE: - { - sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam); - SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0); - }; break; - - case WM_LBUTTONDOWN: + // choose pen color + INT iColor = ((shift == 0) ? COLOR_HIGHLIGHTTEXT : COLOR_3DSHADOW); + HPEN hPen = ::CreatePen(PS_SOLID, 1, ::GetSysColor(iColor)); + HGDIOBJ hPenOld = ::SelectObject(hDC, hPen); + // do loop to draw the slanted lines + for (INT delta = cxy / 4; delta < cxy; delta += cxy / 4) { - sel = SendMessageW(hwnd, LB_GETCURSEL, 0, 0); - - if (sel < 0) - break; - - len = SendMessageW(pThis->m_hwndListBox, LB_GETTEXTLEN, sel, 0); - msg = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(WCHAR)); - - if (msg) + // draw a grip line + if (m_bDowner) { - SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); - SendMessageW(pThis->m_hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(pThis->m_hwndEdit, EM_SETSEL, 0, wcslen(msg)); - ShowWindow(hwnd, SW_HIDE); - - HeapFree(GetProcessHeap(), 0, msg); + ::MoveToEx(hDC, rc.right, rc.top + delta + shift, NULL); + ::LineTo(hDC, rc.left + delta + shift, rc.bottom); } else { - TRACE("HeapAlloc failed to allocate %d bytes\n", (len + 1) * sizeof(WCHAR)); + ::MoveToEx(hDC, rc.left + delta + shift, rc.top, NULL); + ::LineTo(hDC, rc.right, rc.bottom - delta - shift); } - - }; break; - - default: - return CallWindowProcW(pThis->m_wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); + } + // delete pen + ::SelectObject(hDC, hPenOld); + ::DeleteObject(hPen); } + + EndPaint(&ps); return 0; } -/************************************************************************** - * IAutoCompleteDropDown - */ -HRESULT STDMETHODCALLTYPE CAutoComplete::GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString) +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete public methods + +CAutoComplete::CAutoComplete() + : m_bInSetText(FALSE), m_bInSelectItem(FALSE) + , m_bDowner(TRUE), m_dwOptions(ACO_AUTOAPPEND | ACO_AUTOSUGGEST) + , m_bEnabled(TRUE), m_hwndCombo(NULL), m_hFont(NULL), m_bResized(FALSE) { - BOOL dropped = IsWindowVisible(m_hwndListBox); +} - if (pdwFlags) - *pdwFlags = (dropped ? ACDD_VISIBLE : 0); +HWND CAutoComplete::CreateDropDown() +{ + ATLASSERT(m_hWnd == NULL); + DWORD dwStyle = WS_POPUP | /*WS_VISIBLE |*/ WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER; + DWORD dwExStyle = WS_EX_TOOLWINDOW | WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY; + Create(NULL, NULL, NULL, dwStyle, dwExStyle); + TRACE("CAutoComplete::CreateDropDown(%p): m_hWnd == %p\n", this, m_hWnd); + return m_hWnd; +} - if (ppwszString) +CAutoComplete::~CAutoComplete() +{ + TRACE("CAutoComplete::~CAutoComplete(%p)\n", this); + if (m_hFont) { - *ppwszString = NULL; - - if (dropped) - { - int sel = SendMessageW(m_hwndListBox, LB_GETCURSEL, 0, 0); - if (sel >= 0) - { - DWORD len = SendMessageW(m_hwndListBox, LB_GETTEXTLEN, sel, 0); - *ppwszString = (LPWSTR)CoTaskMemAlloc((len+1)*sizeof(WCHAR)); - SendMessageW(m_hwndListBox, LB_GETTEXT, sel, (LPARAM)*ppwszString); - } - } + ::DeleteObject(m_hFont); + m_hFont = NULL; } +} - return S_OK; +BOOL CAutoComplete::CanAutoSuggest() +{ + return !!(m_dwOptions & ACO_AUTOSUGGEST) && m_bEnabled; } -HRESULT STDMETHODCALLTYPE CAutoComplete::ResetEnumerator() +BOOL CAutoComplete::CanAutoAppend() { - FIXME("(%p): stub\n", this); - return E_NOTIMPL; + return !!(m_dwOptions & ACO_AUTOAPPEND) && m_bEnabled; } -/************************************************************************** - * IEnumString - */ -HRESULT STDMETHODCALLTYPE CAutoComplete::Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) +BOOL CAutoComplete::UseTab() { - FIXME("(%p, %d, %p, %p): stub\n", this, celt, rgelt, pceltFetched); - *pceltFetched = 0; - return E_NOTIMPL; + return !!(m_dwOptions & ACO_USETAB) && m_bEnabled; } -HRESULT STDMETHODCALLTYPE CAutoComplete::Skip(ULONG celt) +BOOL CAutoComplete::IsComboBoxDropped() { - FIXME("(%p, %d): stub\n", this, celt); - return E_NOTIMPL; + if (!::IsWindow(m_hwndCombo)) + return FALSE; + return (BOOL)::SendMessageW(m_hwndCombo, CB_GETDROPPEDSTATE, 0, 0); } -HRESULT STDMETHODCALLTYPE CAutoComplete::Reset() +INT CAutoComplete::GetItemCount() { - FIXME("(%p): stub\n", this); - return E_NOTIMPL; + return m_outerList.GetSize(); } -HRESULT STDMETHODCALLTYPE CAutoComplete::Clone(IEnumString **ppOut) +CStringW CAutoComplete::GetItemText(INT iItem) { - FIXME("(%p, %p): stub\n", this, ppOut); - *ppOut = NULL; + if (iItem < 0 || m_outerList.GetSize() <= iItem) + return L""; + return m_outerList[iItem]; +} + +CStringW CAutoComplete::GetEditText() +{ + BSTR bstrText = NULL; + CStringW strText; + if (m_hwndEdit.GetWindowTextW(bstrText)) + { + strText = bstrText; + ::SysFreeString(bstrText); + } + return strText; +} + +VOID CAutoComplete::SetEditText(LPCWSTR pszText) +{ + m_bInSetText = TRUE; // don't hide drop-down + m_hwndEdit.SetWindowTextW(pszText); + m_bInSetText = FALSE; +} + +CStringW CAutoComplete::GetStemText() +{ + CStringW strText = GetEditText(); + INT ich = strText.ReverseFind(L'\\'); + if (ich == -1) + return L""; // no stem + return strText.Left(ich + 1); +} + +VOID CAutoComplete::SetEditSel(INT ich0, INT ich1) +{ + m_hwndEdit.SendMessageW(EM_SETSEL, ich0, ich1); +} + +VOID CAutoComplete::ShowDropDown() +{ + if (!m_hWnd || !CanAutoSuggest()) + return; + + INT cItems = GetItemCount(); + if (cItems == 0 || ::GetFocus() != m_hwndEdit || IsComboBoxDropped()) + { + // hide the drop-down if necessary + HideDropDown(); + return; + } + + RepositionDropDown(); +} + +VOID CAutoComplete::HideDropDown() +{ + ShowWindow(SW_HIDE); +} + +VOID CAutoComplete::SelectItem(INT iItem) +{ + m_hwndList.SetCurSel(iItem); + if (iItem != -1) + m_hwndList.EnsureVisible(iItem, FALSE); +} + +VOID CAutoComplete::DoAutoAppend() +{ + if (!CanAutoAppend()) // can we auto-append? + return; // don't append + + CStringW strText = GetEditText(); // get the text + if (strText.IsEmpty()) + return; // don't append + + INT cItems = m_innerList.GetSize(); // get the number of items + if (cItems == 0) + return; // don't append + + // get the common string + CStringW strCommon; + for (INT iItem = 0; iItem < cItems; ++iItem) + { + const CString& strItem = m_innerList[iItem]; // get the text of the item + + if (iItem == 0) // the first item + { + strCommon = strItem; // store the text + continue; + } + + for (INT ich = 0; ich < strCommon.GetLength(); ++ich) + { + if (ich < strItem.GetLength() && strCommon[ich] != strItem[ich]) + { + strCommon = strCommon.Left(ich); // shrink the common string + break; + } + } + } + + if (strCommon.IsEmpty() || strCommon.GetLength() <= strText.GetLength()) + return; // no suggestion + + // append suggestion + INT cchOld = strText.GetLength(); + INT cchAppend = strCommon.GetLength() - cchOld; + strText += strCommon.Right(cchAppend); + SetEditText(strText); + + // select the appended suggestion + SetEditSel(cchOld, strText.GetLength()); +} + +// go back a word ([Ctrl]+[Backspace]) +VOID CAutoComplete::DoBackWord() +{ + // get current selection + INT ich0, ich1; + m_hwndEdit.SendMessageW(EM_GETSEL, reinterpret_cast<WPARAM>(&ich0), + reinterpret_cast<LPARAM>(&ich1)); + if (ich0 <= 0 || ich0 != ich1) // there is selection or left-side end + return; // don't do anything + // get text + CStringW str = GetEditText(); + // extend the range + while (ich0 > 0 && IsWordBreak(str[ich0 - 1])) + --ich0; + while (ich0 > 0 && !IsWordBreak(str[ich0 - 1])) + --ich0; + // select range + SetEditSel(ich0, ich1); + // replace selection with empty text (this is actually deletion) + m_hwndEdit.SendMessageW(EM_REPLACESEL, TRUE, (LPARAM)L""); +} + +VOID CAutoComplete::UpdateScrollBar() +{ + // copy scroll info from m_hwndList to m_hwndScrollBar + SCROLLINFO si = { sizeof(si), SIF_ALL }; + m_hwndList.GetScrollInfo(SB_VERT, &si); + m_hwndScrollBar.SetScrollInfo(SB_CTL, &si, FALSE); + + // show/hide scroll bar + INT cVisibles = m_hwndList.GetVisibleCount(); + INT cItems = m_hwndList.GetItemCount(); + BOOL bShowScroll = (cItems > cVisibles); + m_hwndScrollBar.ShowWindow(bShowScroll ? SW_SHOWNOACTIVATE : SW_HIDE); + if (bShowScroll) + m_hwndScrollBar.InvalidateRect(NULL, FALSE); // redraw +} + +BOOL CAutoComplete::OnEditKeyDown(WPARAM wParam, LPARAM lParam) +{ + TRACE("CAutoComplete::OnEditKeyDown(%p, %p)\n", this, wParam); + + UINT vk = (UINT)wParam; // virtual key + switch (vk) + { + case VK_HOME: case VK_END: + case VK_UP: case VK_DOWN: + case VK_PRIOR: case VK_NEXT: + // is suggestion available? + if (!CanAutoSuggest()) + return FALSE; // do default + if (IsWindowVisible()) + return OnListUpDown(vk); + break; + case VK_ESCAPE: + { + // is suggestion available? + if (!CanAutoSuggest()) + return FALSE; // do default + if (IsWindowVisible()) + { + SetEditText(m_strText); // revert the edit text + // select the end + INT cch = m_strText.GetLength(); + SetEditSel(cch, cch); + HideDropDown(); // hide + return TRUE; // eat + } + break; + } + case VK_RETURN: + { + if (::GetKeyState(VK_CONTROL) < 0) + { + // quick edit + CStringW strText = GetEditText(); + SetEditText(GetQuickEdit(strText)); + } + else + { + // if item is selected, then update the edit text + INT iItem = m_hwndList.GetCurSel(); + if (iItem != -1) + { + CStringW strText = GetItemText(iItem); + SetEditText(strText); + } + } + // select all + INT cch = m_hwndEdit.GetWindowTextLengthW(); + SetEditSel(0, cch); + // hide + HideDropDown(); + break; + } + case VK_TAB: + { + if (IsWindowVisible() && UseTab()) + { + FIXME("ACO_USETAB\n"); + } + break; + } + case VK_DELETE: + { + // is suggestion available? + if (!CanAutoSuggest()) + return FALSE; // do default + m_hwndEdit.DefWindowProcW(WM_KEYDOWN, VK_DELETE, 0); // do default + if (IsWindowVisible()) + OnEditUpdate(FALSE); + return TRUE; // eat + } + case VK_BACK: + { + if (::GetKeyState(VK_CONTROL) < 0) + { + DoBackWord(); + return TRUE; // eat + } + break; + } + default: + { + break; + } + } + return FALSE; // default +} + +LRESULT CAutoComplete::OnEditChar(WPARAM wParam, LPARAM lParam) +{ + TRACE("CACEditCtrl::OnEditChar(%p, %p)\n", this, wParam); + if (wParam == L'\n' || wParam == L'\t') + return 0; // eat + LRESULT ret = m_hwndEdit.DefWindowProcW(WM_CHAR, wParam, lParam); // do default + if (CanAutoSuggest() || CanAutoAppend()) + OnEditUpdate(wParam != VK_BACK); + return ret; +} + +VOID CAutoComplete::OnEditUpdate(BOOL bAppendOK) +{ + CString strText = GetEditText(); + if (m_strText.CompareNoCase(strText) == 0) + { + // no change + return; + } + UpdateCompletion(bAppendOK); +} + +VOID CAutoComplete::OnListSelChange() +{ + // update EDIT text + INT iItem = m_hwndList.GetCurSel(); + CStringW text = ((iItem != -1) ? GetItemText(iItem) : m_strText); + SetEditText(text); + // ensure the item visible + m_hwndList.EnsureVisible(iItem, FALSE); + // select the end + INT cch = text.GetLength(); + SetEditSel(cch, cch); +} + +BOOL CAutoComplete::OnListUpDown(UINT vk) +{ + if (!CanAutoSuggest()) + return FALSE; // default + + if ((m_dwOptions & ACO_UPDOWNKEYDROPSLIST) && !IsWindowVisible()) + { + ShowDropDown(); + return TRUE; // eat + } + + INT iItem = m_hwndList.GetCurSel(); // current selection + INT cItems = m_hwndList.GetItemCount(); // the number of items + switch (vk) + { + case VK_HOME: case VK_END: + m_hwndList.SendMessageW(WM_KEYDOWN, vk, 0); + break; + case VK_UP: + if (iItem == -1) + iItem = cItems - 1; + else if (iItem == 0) + iItem = -1; + else + --iItem; + m_hwndList.SetCurSel(iItem); + break; + case VK_DOWN: + if (iItem == -1) + iItem = 0; + else if (iItem == cItems - 1) + iItem = -1; + else + ++iItem; + m_hwndList.SetCurSel(iItem); + break; + case VK_PRIOR: + if (iItem == -1) + { + iItem = cItems - 1; + } + else if (iItem == 0) + { + iItem = -1; + } + else + { + iItem -= m_hwndList.GetVisibleCount() - 1; + if (iItem < 0) + iItem = 0; + } + m_hwndList.SetCurSel(iItem); + break; + case VK_NEXT: + if (iItem == -1) + { + iItem = 0; + } + else if (iItem == cItems - 1) + { + iItem = -1; + } + else + { + iItem += m_hwndList.GetVisibleCount() - 1; + if (iItem > cItems) + iItem = cItems - 1; + } + m_hwndList.SetCurSel(iItem); + break; + default: + { + ATLASSERT(FALSE); + break; + } + } + + return TRUE; // eat +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete IAutoComplete methods + +// @implemented +STDMETHODIMP CAutoComplete::Enable(BOOL fEnable) +{ + TRACE("(%p)->(%d)\n", this, fEnable); + m_bEnabled = fEnable; + return S_OK; +} + +STDMETHODIMP +CAutoComplete::Init(HWND hwndEdit, IUnknown *punkACL, + LPCOLESTR pwszRegKeyPath, LPCOLESTR pwszQuickComplete) +{ + TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", + this, hwndEdit, punkACL, debugstr_w(pwszRegKeyPath), debugstr_w(pwszQuickComplete)); + + if (m_dwOptions & ACO_AUTOSUGGEST) + TRACE(" ACO_AUTOSUGGEST\n"); + if (m_dwOptions & ACO_AUTOAPPEND) + TRACE(" ACO_AUTOAPPEND\n"); + if (m_dwOptions & ACO_SEARCH) + FIXME(" ACO_SEARCH not supported\n"); + if (m_dwOptions & ACO_FILTERPREFIXES) + FIXME(" ACO_FILTERPREFIXES not supported\n"); + if (m_dwOptions & ACO_USETAB) + FIXME(" ACO_USETAB not supported\n"); + if (m_dwOptions & ACO_UPDOWNKEYDROPSLIST) + TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); + if (m_dwOptions & ACO_RTLREADING) + FIXME(" ACO_RTLREADING not supported\n"); + + // sanity check + if (m_hwndEdit || !punkACL) + { + ATLASSERT(0); + return E_INVALIDARG; + } + + // set this pointer to m_hwndEdit + m_hwndEdit.m_pDropDown = this; + + // do subclass textbox to watch messages + m_hwndEdit.SubclassWindow(hwndEdit); + // set word break procedure + m_hwndEdit.HookWordBreakProc(TRUE); + // save position + m_hwndEdit.GetWindowRect(&m_rcEdit); + + // get an IEnumString + ATLASSERT(!m_pEnum); + punkACL->QueryInterface(IID_IEnumString, (VOID **)&m_pEnum); + TRACE("m_pEnum: %p\n", static_cast<void *>(m_pEnum)); + + // get an IACList + ATLASSERT(!m_pACList); + punkACL->QueryInterface(IID_IACList, (VOID **)&m_pACList); + TRACE("m_pACList: %p\n", static_cast<void *>(m_pACList)); + + AddRef(); // add reference + + UpdateDropDownState(); // create/hide the drop-down window if necessary + + // load quick completion info + LoadQuickComplete(pwszRegKeyPath, pwszQuickComplete); + + // any combobox for m_hwndEdit? + m_hwndCombo = NULL; + HWND hwndParent = ::GetParent(m_hwndEdit); + WCHAR szClass[16]; + if (::GetClassNameW(hwndParent, szClass, _countof(szClass))) + { + if (::StrCmpIW(szClass, WC_COMBOBOXW) == 0 || + ::StrCmpIW(szClass, WC_COMBOBOXEXW) == 0) + { + m_hwndCombo = hwndParent; // get combobox + } + } + + return S_OK; +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete IAutoComplete2 methods + +// @implemented +STDMETHODIMP CAutoComplete::GetOptions(DWORD *pdwFlag) +{ + TRACE("(%p) -> (%p)\n", this, pdwFlag); + if (pdwFlag) + { + *pdwFlag = m_dwOptions; + return S_OK; + } + return E_INVALIDARG; +} + +// @implemented +STDMETHODIMP CAutoComplete::SetOptions(DWORD dwFlag) +{ + TRACE("(%p) -> (0x%x)\n", this, dwFlag); + m_dwOptions = dwFlag; + UpdateDropDownState(); // create/hide the drop-down window if necessary + return S_OK; +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete IAutoCompleteDropDown methods + +// @implemented +STDMETHODIMP CAutoComplete::GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString) +{ + BOOL dropped = m_hwndList.IsWindowVisible(); + + if (pdwFlags) + *pdwFlags = (dropped ? ACDD_VISIBLE : 0); + + if (ppwszString) + { + *ppwszString = NULL; + + if (dropped) + { + // get selected item + INT iItem = m_hwndList.GetCurSel(); + if (iItem >= 0) + { + // get the text of item + CStringW strText = m_hwndList.GetItemText(iItem); + + // store to *ppwszString + SHStrDupW(strText, ppwszString); + if (*ppwszString == NULL) + return E_OUTOFMEMORY; + } + } + } + + return S_OK; +} + +STDMETHODIMP CAutoComplete::ResetEnumerator() +{ + FIXME("(%p): stub\n", this); + + HideDropDown(); + + if (IsWindowVisible()) + { + OnEditUpdate(FALSE); + } + + return S_OK; +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete IEnumString methods + +// @implemented +STDMETHODIMP CAutoComplete::Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) +{ + TRACE("(%p, %d, %p, %p)\n", this, celt, rgelt, pceltFetched); + if (rgelt) + *rgelt = NULL; + if (*pceltFetched) + *pceltFetched = 0; + if (celt != 1 || !rgelt || !pceltFetched || !m_pEnum) + return E_INVALIDARG; + + LPWSTR pszText = NULL; + HRESULT hr = m_pEnum->Next(1, &pszText, pceltFetched); + if (hr == S_OK) + *rgelt = pszText; + else + ::CoTaskMemFree(pszText); + return hr; +} + +// @implemented +STDMETHODIMP CAutoComplete::Skip(ULONG celt) +{ + TRACE("(%p, %d)\n", this, celt); return E_NOTIMPL; } + +// @implemented +STDMETHODIMP CAutoComplete::Reset() +{ + TRACE("(%p)\n", this); + if (m_pEnum) + return m_pEnum->Reset(); + return E_FAIL; +} + +// @implemented +STDMETHODIMP CAutoComplete::Clone(IEnumString **ppOut) +{ + TRACE("(%p, %p)\n", this, ppOut); + if (ppOut) + *ppOut = NULL; + return E_NOTIMPL; +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete protected methods + +VOID CAutoComplete::UpdateDropDownState() +{ + if (CanAutoSuggest()) + { + // create the drop-down window if not existed + if (!m_hWnd) + { + AddRef(); + if (!CreateDropDown()) + Release(); + } + } + else + { + // hide if existed + if (m_hWnd) + ShowWindow(SW_HIDE); + } +} + +// calculate the positions of the controls +VOID CAutoComplete::CalcRects(BOOL bDowner, RECT& rcList, RECT& rcScrollBar, RECT& rcSizeBox) +{ + // get the client rectangle + RECT rcClient; + GetClientRect(&rcClient); + + // the list + rcList = rcClient; + rcList.right = rcList.left + CX_LIST; + + // the scroll bar + rcScrollBar = rcClient; + rcScrollBar.left = rcClient.right - GetSystemMetrics(SM_CXVSCROLL); + if (bDowner) + { + rcScrollBar.top = 0; + rcScrollBar.bottom = rcClient.bottom - GetSystemMetrics(SM_CYHSCROLL); + } + else + { + rcScrollBar.top = GetSystemMetrics(SM_CYHSCROLL); + } + + // the size box + rcSizeBox = rcClient; + rcSizeBox.left = rcClient.right - GetSystemMetrics(SM_CXVSCROLL); + if (bDowner) + { + rcSizeBox.top = rcClient.bottom - GetSystemMetrics(SM_CYHSCROLL); + } + else + { + rcSizeBox.top = 0; + rcSizeBox.bottom = rcClient.top + GetSystemMetrics(SM_CYHSCROLL); + } +} + +VOID CAutoComplete::LoadQuickComplete(LPCWSTR pwszRegKeyPath, LPCWSTR pwszQuickComplete) +{ + m_strQuickComplete.Empty(); + + if (pwszRegKeyPath) + { + CStringW strPath = pwszRegKeyPath; + INT ichSep = strPath.ReverseFind(L'\\'); // find separator + if (ichSep != -1) // found the last separator + { + // split by the separator + CStringW strKey = strPath.Left(ichSep); + CStringW strName = strPath.Mid(ichSep + 1); + + // load from registry + WCHAR szValue[MAX_PATH] = L""; + DWORD cbValue = sizeof(szValue), dwType = REG_NONE; + SHRegGetUSValueW(pwszRegKeyPath, strName, &dwType, + szValue, &cbValue, FALSE, NULL, 0); + if (szValue[0] != 0 && cbValue != 0 && + (dwType == REG_SZ || dwType == REG_EXPAND_SZ)) + { + m_strQuickComplete = szValue; + } + } + } + + if (pwszQuickComplete && m_strQuickComplete.IsEmpty()) + { + m_strQuickComplete = pwszQuickComplete; + } +} + +CStringW CAutoComplete::GetQuickEdit(LPCWSTR pszText) +{ + if (pszText[0] == 0 || m_strQuickComplete.IsEmpty()) + return pszText; + + // m_strQuickComplete will be "
www.%s.com
" etc. + CStringW ret; + ret.Format(m_strQuickComplete, pszText); + return ret; +} + +VOID CAutoComplete::RepositionDropDown() +{ + // get nearest monitor from m_hwndEdit + HMONITOR hMon = ::MonitorFromWindow(m_hwndEdit, MONITOR_DEFAULTTONEAREST); + ATLASSERT(hMon != NULL); + if (hMon == NULL) + return; + + // get nearest monitor info + MONITORINFO mi = { sizeof(mi) }; + if (!::GetMonitorInfo(hMon, &mi)) + { + ATLASSERT(FALSE); + return; + } + + // get count and item height + INT cItems = GetItemCount(); + INT cyItem = m_hwndList.m_cyItem; + ATLASSERT(cyItem > 0); + + // get m_hwndEdit position + RECT rcEdit; + m_hwndEdit.GetWindowRect(&rcEdit); + INT x = rcEdit.left, y = rcEdit.bottom; + + // get list extent + RECT rcMon = mi.rcMonitor; + INT cx = rcEdit.right - rcEdit.left, cy = cItems * cyItem; + BOOL bLongList = FALSE; + if (cy > CY_LIST) + { + cy = INT(CY_LIST / cyItem) * cyItem; + bLongList = TRUE; + } + + // convert rectangle for frame + RECT rc = { 0, 0, cx, cy }; + AdjustWindowRectEx(&rc, GetStyle(), FALSE, GetExStyle()); + cy = rc.bottom - rc.top; + + if (!m_bResized) + { + // is the drop-down window a 'downer' or 'upper'? + // NOTE: 'downer' is below the EDIT control. 'upper' is above the EDIT control. + m_bDowner = (rcEdit.bottom + cy < rcMon.bottom); + } + + // adjust y and cy + if (m_bDowner) + { + if (rcMon.bottom < y + cy) + { + cy = ((rcMon.bottom - y) / cyItem) * cyItem; + bLongList = TRUE; + } + } + else + { + if (rcEdit.top < rcMon.top + cy) + { + cy = ((rcEdit.top - rcMon.top) / cyItem) * cyItem; + bLongList = TRUE; + } + y = rcEdit.top - cy; + } + + // set status + m_hwndSizeBox.SetStatus(m_bDowner, bLongList); + + if (m_bResized) // already resized? + PostMessageW(WM_SIZE, 0, 0); // re-layout + else + MoveWindow(x, y, cx, cy); // move + + // show without activation + ShowWindow(SW_SHOWNOACTIVATE); +} + +INT CAutoComplete::ReLoadInnerList() +{ + m_innerList.RemoveAll(); // clear contents + + if (!m_pEnum) + return 0; + + DWORD dwTick = ::GetTickCount(); // used for timeout + + // reload the items + LPWSTR pszItem; + ULONG cGot; + HRESULT hr; + for (ULONG cTotal = 0; cTotal < MAX_ITEM_COUNT; ++cTotal) + { + // get next item + hr = m_pEnum->Next(1, &pszItem, &cGot); + //TRACE("m_pEnum->Next(%p): 0x%08lx\n", reinterpret_cast<IUnknown *>(m_pEnum), hr); + if (hr != S_OK) + break; + + m_innerList.Add(pszItem); // append item to m_innerList + ::CoTaskMemFree(pszItem); // free + + // check the timeout + if (::GetTickCount() - dwTick >= COMPLETION_TIMEOUT) + break; // too late + } + + return m_innerList.GetSize(); // the number of items +} + +// update inner list and m_strText and m_strStemText +INT CAutoComplete::UpdateInnerList() +{ + // get text + CStringW strText = GetEditText(); + + BOOL bReset = FALSE, bExpand = FALSE; // flags + + // if previous text was empty + if (m_strText.IsEmpty()) + { + bReset = TRUE; + } + // save text + m_strText = strText; + + // do expand the items if the stem is changed + CStringW strStemText = GetStemText(); + if (m_strStemText.CompareNoCase(strStemText) != 0) + { + m_strStemText = strStemText; + bExpand = bReset = TRUE; + } + + // reset if necessary + if (bReset && m_pEnum) + { + HRESULT hr = m_pEnum->Reset(); // IEnumString::Reset + TRACE("m_pEnum->Reset(%p): 0x%08lx\n", + static_cast<IUnknown *>(m_pEnum), hr); + } + + // update ac list if necessary + if (bExpand && m_pACList) + { + HRESULT hr = m_pACList->Expand(strStemText); // IACList::Expand + TRACE("m_pACList->Expand(%p, %S): 0x%08lx\n", + static_cast<IUnknown *>(m_pACList), + static_cast<LPCWSTR>(strStemText), hr); + } + + if (bExpand || m_innerList.GetSize() == 0) + { + // reload the inner list + ReLoadInnerList(); + } + + return m_innerList.GetSize(); +} + +INT CAutoComplete::UpdateOuterList() +{ + CStringW strText = GetEditText(); // get the text + + // update the outer list from the inner list + m_outerList.RemoveAll(); + for (INT iItem = 0; iItem < m_innerList.GetSize(); ++iItem) + { + // is the beginning matched? + const CStringW& strTarget = m_innerList[iItem]; + if (::StrCmpNIW(strTarget, strText, strText.GetLength()) == 0) + { + m_outerList.Add(strTarget); + } + } + + // sort the list + DoSort(m_outerList); + // unique + DoUniqueAndTrim(m_outerList); + + // set the item count of the virtual listview + INT cItems = m_outerList.GetSize(); + if (strText.IsEmpty()) + cItems = 0; + m_hwndList.SendMessageW(LVM_SETITEMCOUNT, cItems, 0); + + return cItems; // the number of items +} + +VOID CAutoComplete::UpdateCompletion(BOOL bAppendOK) +{ + TRACE("CAutoComplete::UpdateCompletion(%p, %d)\n", this, bAppendOK); + + // update inner list + UINT cItems = UpdateInnerList(); + if (cItems == 0) // no items + { + HideDropDown(); + return; + } + + if (CanAutoSuggest()) // can we auto-suggest? + { + m_bInSelectItem = TRUE; // don't respond + SelectItem(-1); // select none + m_bInSelectItem = FALSE; + + if (UpdateOuterList()) + RepositionDropDown(); + else + HideDropDown(); + return; + } + + if (CanAutoAppend() && bAppendOK) // can we auto-append? + { + DoAutoAppend(); + return; + } +} + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete message handlers + +// WM_CREATE +// This message is sent when the window is about to be created after WM_NCCREATE. +// The return value is -1 (failure) or zero (success). +LRESULT CAutoComplete::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnCreate(%p)\n", this); + + // set the pointer of CAutoComplete + m_hwndList.m_pDropDown = this; + m_hwndScrollBar.m_pDropDown = this; + m_hwndSizeBox.m_pDropDown = this; + + // create the children + m_hwndList.Create(m_hWnd); + if (!m_hwndList) + return -1; // failure + m_hwndSizeBox.Create(m_hWnd); + if (!m_hwndSizeBox) + return -1; // failure + m_hwndScrollBar.Create(m_hWnd); + if (!m_hwndScrollBar) + return -1; // failure + + // show the controls + m_hwndList.ShowWindow(SW_SHOWNOACTIVATE); + m_hwndSizeBox.ShowWindow(SW_SHOWNOACTIVATE); + m_hwndScrollBar.ShowWindow(SW_SHOWNOACTIVATE); + + // set the list font + m_hFont = reinterpret_cast<HFONT>(::GetStockObject(DEFAULT_GUI_FONT)); + m_hwndList.SetFont(m_hFont); + + return 0; // success +} + +// WM_DESTROY +// This message is sent when a window is being destroyed. +LRESULT CAutoComplete::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnDestroy(%p)\n", this); + + // hide + if (IsWindowVisible()) + HideDropDown(); + + // unsubclass EDIT control + if (m_hwndEdit) + { + m_hwndEdit.HookWordBreakProc(FALSE); + m_hwndEdit.UnsubclassWindow(); + } + + // clear CAutoComplete pointers + m_hwndEdit.m_pDropDown = NULL; + m_hwndList.m_pDropDown = NULL; + m_hwndScrollBar.m_pDropDown = NULL; + m_hwndSizeBox.m_pDropDown = NULL; + + // destroy controls + m_hwndList.DestroyWindow(); + m_hwndScrollBar.DestroyWindow(); + m_hwndSizeBox.DestroyWindow(); + + // clean up + m_hwndCombo = NULL; + Release(); + + return 0; +} + +// WM_EXITSIZEMOVE +// This message is sent once to a window after it has exited the moving or sizing mode. +LRESULT CAutoComplete::OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnExitSizeMove(%p)\n", this); + m_bResized = TRUE; // remember resized + + ModifyStyle(WS_THICKFRAME, 0); // remove thick frame to resize + // frame changed + UINT uSWP_ = SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOACTIVATE; + SetWindowPos(NULL, 0, 0, 0, 0, uSWP_); + + m_hwndEdit.SetFocus(); // restore focus + return 0; +} + +// WM_DRAWITEM @implemented +// This message is sent to the owner window to draw m_hwndList. +LRESULT CAutoComplete::OnDrawItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + LPDRAWITEMSTRUCT pDraw = reinterpret_cast<LPDRAWITEMSTRUCT>(lParam); + ATLASSERT(pDraw != NULL); + ATLASSERT(m_hwndList.GetStyle() & LVS_OWNERDRAWFIXED); + + // sanity check + if (pDraw->CtlType != ODT_LISTVIEW || pDraw->hwndItem != m_hwndList) + return FALSE; + + // item rectangle + RECT rcItem = pDraw->rcItem; + + // get info + UINT iItem = pDraw->itemID; // the index of item + CStringW strItem = m_hwndList.GetItemText(iItem); // get text of item + + // draw background and set text color + HDC hDC = pDraw->hDC; + BOOL bSelected = (pDraw->itemState & ODS_SELECTED); + if (bSelected) + { + ::FillRect(hDC, &rcItem, ::GetSysColorBrush(COLOR_HIGHLIGHT)); + ::SetTextColor(hDC, ::GetSysColor(COLOR_HIGHLIGHTTEXT)); + } + else + { + ::FillRect(hDC, &rcItem, ::GetSysColorBrush(COLOR_WINDOW)); + ::SetTextColor(hDC, ::GetSysColor(COLOR_WINDOWTEXT)); + } + + // draw text + rcItem.left += ::GetSystemMetrics(SM_CXBORDER); + HGDIOBJ hFontOld = ::SelectObject(hDC, m_hFont); + const UINT uDT_ = DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER; + ::SetBkMode(hDC, TRANSPARENT); + ::DrawTextW(hDC, strItem, -1, &rcItem, uDT_); + ::SelectObject(hDC, hFontOld); + + return TRUE; +} + +// WM_GETMINMAXINFO @implemented +// This message is sent to a window when the size or position of the window is about to change. +LRESULT CAutoComplete::OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + // restrict minimum size + LPMINMAXINFO pInfo = reinterpret_cast<LPMINMAXINFO>(lParam); + pInfo->ptMinTrackSize.x = ::GetSystemMetrics(SM_CXVSCROLL); + pInfo->ptMinTrackSize.y = ::GetSystemMetrics(SM_CYHSCROLL); + return 0; +} + +// WM_MEASUREITEM @implemented +// This message is sent to the owner window to get the item extent of m_hwndList. +LRESULT CAutoComplete::OnMeasureItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + LPMEASUREITEMSTRUCT pMeasure = reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam); + ATLASSERT(pMeasure != NULL); + if (pMeasure->CtlType != ODT_LISTVIEW) + return FALSE; + + ATLASSERT(m_hwndList.GetStyle() & LVS_OWNERDRAWFIXED); + pMeasure->itemHeight = m_hwndList.m_cyItem; // height of item + return TRUE; +} + +// WM_MOUSEACTIVATE @implemented +// The return value of this message specifies whether the window should be activated or not. +LRESULT CAutoComplete::OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + return MA_NOACTIVATE; // don't activate by mouse +} + +// WM_NCACTIVATE +// This message is sent to a window to indicate an active or inactive state. +LRESULT CAutoComplete::OnNCActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + bHandled = FALSE; // do default + return 0; +} + +// WM_NCLBUTTONDOWN +LRESULT CAutoComplete::OnNCLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + switch (wParam) + { + case HTBOTTOMRIGHT: case HTTOPRIGHT: + { + // add thick frame to resize. + ModifyStyle(0, WS_THICKFRAME); + // frame changed + UINT uSWP_ = SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOACTIVATE; + SetWindowPos(NULL, 0, 0, 0, 0, uSWP_); + break; + } + } + bHandled = FALSE; // do default + return 0; +} + +// WM_NOTIFY +// This message informs the parent window of a control that an event has occurred. +LRESULT CAutoComplete::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + LPNMHDR pnmh = reinterpret_cast<LPNMHDR>(lParam); + ATLASSERT(pnmh != NULL); + + switch (pnmh->code) + { + case NM_DBLCLK: // double-clicked + { + TRACE("NM_DBLCLK\n"); + HideDropDown(); + break; + } + case NM_HOVER: // mouse is hovering + { + POINT pt; + ::GetCursorPos(&pt); // get cursor position in screen coordinates + m_hwndList.ScreenToClient(&pt); // into client coordinates + INT iItem = m_hwndList.ItemFromPoint(pt.x, pt.y); + if (iItem != -1) + { + m_bInSelectItem = TRUE; // don't respond + m_hwndList.SetCurSel(iItem); // select + m_bInSelectItem = FALSE; + } + return TRUE; // eat + } + case LVN_GETDISPINFOA: // for user's information only + { + TRACE("LVN_GETDISPINFOA\n"); + if (pnmh->hwndFrom != m_hwndList) + break; + + LV_DISPINFOA *pDispInfo = reinterpret_cast<LV_DISPINFOA *>(pnmh); + LV_ITEMA *pItem = &pDispInfo->item; + INT iItem = pItem->iItem; + if (iItem == -1) + break; + + CStringW strText = GetItemText(iItem); + if (pItem->mask & LVIF_TEXT) + SHUnicodeToAnsi(strText, pItem->pszText, pItem->cchTextMax); + break; + } + case LVN_GETDISPINFOW: // for user's information only + { + TRACE("LVN_GETDISPINFOW\n"); + if (pnmh->hwndFrom != m_hwndList) + break; + + LV_DISPINFOW *pDispInfo = reinterpret_cast<LV_DISPINFOW *>(pnmh); + LV_ITEMW *pItem = &pDispInfo->item; + INT iItem = pItem->iItem; + if (iItem == -1) + break; + + CStringW strText = GetItemText(iItem); + if (pItem->mask & LVIF_TEXT) + StringCbCopyW(pItem->pszText, pItem->cchTextMax, strText); + break; + } + case LVN_HOTTRACK: // enabled by LVS_EX_TRACKSELECT + { + TRACE("LVN_HOTTRACK\n"); + LPNMLISTVIEW pListView = reinterpret_cast<LPNMLISTVIEW>(pnmh); + INT iItem = pListView->iItem; + TRACE("LVN_HOTTRACK: iItem:%d\n", iItem); + m_hwndList.SetCurSel(iItem); + m_hwndList.EnsureVisible(iItem, FALSE); + return TRUE; + } + case LVN_ITEMACTIVATE: // enabled by LVS_EX_ONECLICKACTIVATE + { + TRACE("LVN_ITEMACTIVATE\n"); + LPNMITEMACTIVATE pItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pnmh); + INT iItem = pItemActivate->iItem; + TRACE("LVN_ITEMACTIVATE: iItem:%d\n", iItem); + if (iItem != -1) // the item is clicked + { + SelectItem(iItem); + HideDropDown(); + } + break; + } + case LVN_ITEMCHANGED: // item info is changed + { + TRACE("LVN_ITEMCHANGED\n"); + LPNMLISTVIEW pListView = reinterpret_cast<LPNMLISTVIEW>(pnmh); + if (pListView->uChanged & LVIF_STATE) // selection changed + { + // listview selection changed + if (!m_bInSelectItem) + { + OnListSelChange(); + } + UpdateScrollBar(); + } + break; + } + } + + return 0; +} + +// WM_NCHITTEST @implemented +// The return value is indicating the cursor shape and the behaviour. +LRESULT CAutoComplete::OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnNCHitTest(%p)\n", this); + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; // in screen coordinates + ScreenToClient(&pt); // into client coordinates + if (ChildWindowFromPoint(pt) == m_hwndSizeBox) // hit? + { + // allow resizing (with cursor shape) + return m_bDowner ? HTBOTTOMRIGHT : HTTOPRIGHT; + } + bHandled = FALSE; // do default + return 0; +} + +// WM_SIZE @implemented +// This message is sent when the window size is changed. +LRESULT CAutoComplete::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnSize(%p)\n", this); + + // calculate the positions of the controls + CRect rcList, rcScrollBar, rcSizeBox; + CalcRects(m_bDowner, rcList, rcScrollBar, rcSizeBox); + + // reposition the controls in smartest way + UINT uSWP_ = SWP_NOACTIVATE | SWP_NOCOPYBITS; + HDWP hDWP = ::BeginDeferWindowPos(3); + hDWP = ::DeferWindowPos(hDWP, m_hwndScrollBar, HWND_TOP, + rcScrollBar.left, rcScrollBar.top, + rcScrollBar.Width(), rcScrollBar.Height(), uSWP_); + hDWP = ::DeferWindowPos(hDWP, m_hwndSizeBox, m_hwndScrollBar, + rcSizeBox.left, rcSizeBox.top, + rcSizeBox.Width(), rcSizeBox.Height(), uSWP_); + hDWP = ::DeferWindowPos(hDWP, m_hwndList, m_hwndSizeBox, + rcList.left, rcList.top, + rcList.Width(), rcList.Height(), uSWP_); + ::EndDeferWindowPos(hDWP); + + UpdateScrollBar(); + return 0; +} + +// WM_SHOWWINDOW +LRESULT CAutoComplete::OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + // hook mouse events + BOOL bShow = (BOOL)wParam; + if (bShow) + { + s_hWatchWnd = m_hWnd; // watch this + + // unhook mouse if any + if (s_hMouseHook) + { + HHOOK hHookOld = s_hMouseHook; + s_hMouseHook = NULL; + ::UnhookWindowsHookEx(hHookOld); + } + + // hook mouse + s_hMouseHook = ::SetWindowsHookEx(WH_MOUSE, MouseProc, NULL, ::GetCurrentThreadId()); + ATLASSERT(s_hMouseHook != NULL); + + // set timer + SetTimer(WATCH_TIMER_ID, WATCH_INTERVAL, NULL); + + bHandled = FALSE; // do default + return 0; + } + else + { + // kill timer + KillTimer(WATCH_TIMER_ID); + + s_hWatchWnd = NULL; // unwatch + + // unhook mouse if any + if (s_hMouseHook) + { + HHOOK hHookOld = s_hMouseHook; + s_hMouseHook = NULL; + ::UnhookWindowsHookEx(hHookOld); + } + + LRESULT ret = DefWindowProcW(uMsg, wParam, lParam); // do default + + if (m_hwndCombo) + ::InvalidateRect(m_hwndCombo, NULL, TRUE); // redraw + + m_outerList.RemoveAll(); // no use + return ret; + } +} + +// WM_TIMER +LRESULT CAutoComplete::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + if (wParam != WATCH_TIMER_ID) // sanity check + return 0; + + // if the textbox is dead, then kill the timer + if (!::IsWindow(m_hwndEdit)) + { + KillTimer(WATCH_TIMER_ID); + return 0; + } + + // m_hwndEdit is moved? + RECT rcEdit; + m_hwndEdit.GetWindowRect(&rcEdit); + if (!::EqualRect(&rcEdit, &m_rcEdit)) + { + // if so, hide + HideDropDown(); + + m_rcEdit = rcEdit; // update rectangle + m_bResized = FALSE; // clear flag + } + + return 0; +} + +// WM_VSCROLL +// This message is sent when a scroll event occurs. +LRESULT CAutoComplete::OnVScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("CAutoComplete::OnVScroll(%p)\n", this); + WORD code = LOWORD(wParam); + switch (code) + { + case SB_THUMBPOSITION: case SB_THUMBTRACK: + { + // get the scrolling info + INT nPos = HIWORD(wParam); + SCROLLINFO si = { sizeof(si), SIF_ALL }; + m_hwndList.GetScrollInfo(SB_VERT, &si); + + // scroll the list-view by CListView::EnsureVisible + INT cItems = m_hwndList.GetItemCount(); + // iItem : cItems == (nPos - si.nMin) : (si.nMax - si.nMin). + INT iItem = cItems * (nPos - si.nMin) / (si.nMax - si.nMin); + if (nPos > si.nPos) + { + iItem += m_hwndList.GetVisibleCount(); + if (iItem >= cItems) + iItem = cItems - 1; + } + m_hwndList.EnsureVisible(iItem, FALSE); + + // update scrolling position of m_hwndScrollBar + si.fMask = SIF_POS; + m_hwndList.GetScrollInfo(SB_VERT, &si); + m_hwndScrollBar.SetScrollInfo(SB_VERT, &si, FALSE); + break; + } + default: + { + // pass it to m_hwndList + m_hwndList.SendMessageW(WM_VSCROLL, wParam, lParam); + UpdateScrollBar(); + break; + } + } + return 0; +} diff --git a/dll/win32/browseui/CAutoComplete.h b/dll/win32/browseui/CAutoComplete.h index 7430307eef3..eb979baf314 100644 --- a/dll/win32/browseui/CAutoComplete.h +++ b/dll/win32/browseui/CAutoComplete.h @@ -19,65 +19,286 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma once -#ifndef _AUTOCOMPLETE_H_ -#define _AUTOCOMPLETE_H_ +#include "atltypes.h" +#include "rosctrls.h" -class CAutoComplete : - public CComCoClass<CAutoComplete, &CLSID_AutoComplete>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IAutoComplete2, - public IAutoCompleteDropDown, - public IEnumString +class CACEditCtrl; +class CACListView; +class CACScrollBar; +class CACSizeBox; +class CAutoComplete; + +////////////////////////////////////////////////////////////////////////////// +// CACEditCtrl --- auto-completion textbox + +class CACEditCtrl + : public CWindowImpl<CACEditCtrl, CWindow, CControlWinTraits> +{ +public: + CAutoComplete* m_pDropDown; + static LPCWSTR GetWndClassName() { return WC_EDITW; } + + CACEditCtrl(); + VOID HookWordBreakProc(BOOL bHook); + + // message map + BEGIN_MSG_MAP(CACEditCtrl) + MESSAGE_HANDLER(WM_CHAR, OnChar) + MESSAGE_HANDLER(WM_CLEAR, OnCutPasteClear) + MESSAGE_HANDLER(WM_CUT, OnCutPasteClear) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(WM_GETDLGCODE, OnGetDlgCode) + MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown) + MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus) + MESSAGE_HANDLER(WM_PASTE, OnCutPasteClear) + MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) + MESSAGE_HANDLER(WM_SETTEXT, OnSetText) + END_MSG_MAP() + +protected: + // protected variables + EDITWORDBREAKPROCW m_fnOldWordBreakProc; + // message handlers + LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnCutPasteClear(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSetText(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); +}; + +////////////////////////////////////////////////////////////////////////////// +// CACListView --- auto-completion list control + +class CACListView : public CWindowImpl<CACListView, CListView> +{ +public: + CAutoComplete* m_pDropDown; + INT m_cyItem; + static LPCWSTR GetWndClassName() { return WC_LISTVIEW; } + + CACListView(); + HWND Create(HWND hwndParent); + VOID SetFont(HFONT hFont); + + INT GetVisibleCount(); + CStringW GetItemText(INT iItem); + INT ItemFromPoint(INT x, INT y); + + INT GetCurSel(); + VOID SetCurSel(INT iItem); + VOID SelectHere(INT x, INT y); + +protected: + // message map + BEGIN_MSG_MAP(CACListView) + MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) + MESSAGE_HANDLER(WM_LBUTTONUP, OnButtonUp) + MESSAGE_HANDLER(WM_MBUTTONDOWN, OnMRButtonDown) + MESSAGE_HANDLER(WM_MBUTTONUP, OnButtonUp) + MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel) + MESSAGE_HANDLER(WM_NCHITTEST, OnNCHitTest) + MESSAGE_HANDLER(WM_RBUTTONDOWN, OnMRButtonDown) + MESSAGE_HANDLER(WM_RBUTTONUP, OnButtonUp) + END_MSG_MAP() + // message handlers + LRESULT OnButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnMRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); +}; + +////////////////////////////////////////////////////////////////////////////// +// CACScrollBar --- auto-completion scrollbar control + +class CACScrollBar : public CWindowImpl<CACScrollBar> { -private: - BOOL m_enabled; - BOOL m_initialized; - HWND m_hwndEdit; - HWND m_hwndListBox; - WNDPROC m_wpOrigEditProc; - WNDPROC m_wpOrigLBoxProc; - LPWSTR m_txtbackup; // HeapAlloc'ed - LPWSTR m_quickComplete; // HeapAlloc'ed - CComPtr<IEnumString> m_enumstr; - AUTOCOMPLETEOPTIONS m_options; public: + CAutoComplete* m_pDropDown; + static LPCWSTR GetWndClassName() { return WC_SCROLLBARW; } + CACScrollBar(); + HWND Create(HWND hwndParent); + +protected: + // message map + BEGIN_MSG_MAP(CACScrollBar) + END_MSG_MAP() +}; + +////////////////////////////////////////////////////////////////////////////// +// CACSizeBox --- auto-completion size-box control + +class CACSizeBox : public CWindowImpl<CACSizeBox> +{ +public: + CAutoComplete* m_pDropDown; + static LPCWSTR GetWndClassName() { return WC_SCROLLBARW; } + + CACSizeBox(); + HWND Create(HWND hwndParent); + VOID SetStatus(BOOL bDowner, BOOL bLongList); + +protected: + // protected variables + BOOL m_bDowner; + BOOL m_bLongList; + // message map + BEGIN_MSG_MAP(CACSizeBox) + MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkGnd) + MESSAGE_HANDLER(WM_NCHITTEST, OnNCHitTest) + MESSAGE_HANDLER(WM_PAINT, OnPaint) + END_MSG_MAP() + // message handlers + LRESULT OnEraseBkGnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); +}; + +////////////////////////////////////////////////////////////////////////////// +// CAutoComplete --- auto-completion drop-down window + +#define WC_DROPDOWNW L"Auto-Suggest Dropdown" // the window class name + +class CAutoComplete + : public CComCoClass<CAutoComplete, &CLSID_AutoComplete> + , public CComObjectRootEx<CComMultiThreadModelNoCS> + , public CWindowImpl<CAutoComplete> + , public IAutoComplete2 + , public IAutoCompleteDropDown + , public IEnumString +{ +public: + DECLARE_WND_CLASS_EX(WC_DROPDOWNW, CS_DROPSHADOW | CS_SAVEBITS, COLOR_3DFACE) + static LPCWSTR GetWndClassName() { return WC_DROPDOWNW; } + BOOL m_bInSetText; // this flag avoids subsequent action in WM_SETTEXT + BOOL m_bInSelectItem; // this flag avoids subsequent action in LVN_ITEMCHANGED + + // public methods CAutoComplete(); - ~CAutoComplete(); + HWND CreateDropDown(); + virtual ~CAutoComplete(); - static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + BOOL CanAutoSuggest(); + BOOL CanAutoAppend(); + BOOL UseTab(); + BOOL IsComboBoxDropped(); + INT GetItemCount(); + CStringW GetItemText(INT iItem); - void CreateListbox(); + CStringW GetEditText(); + VOID SetEditText(LPCWSTR pszText); + CStringW GetStemText(); + VOID SetEditSel(INT ich0, INT ich1); - // IAutoComplete2 - virtual HRESULT WINAPI Enable(BOOL fEnable); - virtual HRESULT WINAPI Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete); - virtual HRESULT WINAPI GetOptions(DWORD *pdwFlag); - virtual HRESULT WINAPI SetOptions(DWORD dwFlag); + VOID ShowDropDown(); + VOID HideDropDown(); + VOID SelectItem(INT iItem); + VOID DoAutoAppend(); + VOID DoBackWord(); + VOID UpdateScrollBar(); - // IAutoCompleteDropDown - virtual HRESULT STDMETHODCALLTYPE GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString); - virtual HRESULT STDMETHODCALLTYPE ResetEnumerator(); + LRESULT OnEditChar(WPARAM wParam, LPARAM lParam); + BOOL OnEditKeyDown(WPARAM wParam, LPARAM lParam); + VOID OnEditUpdate(BOOL bAppendOK); + VOID OnListSelChange(); + BOOL OnListUpDown(UINT vk); + // IAutoComplete methods + STDMETHODIMP Enable(BOOL fEnable) override; + STDMETHODIMP Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwszRegKeyPath, + LPCOLESTR pwszQuickComplete) override; + // IAutoComplete2 methods + STDMETHODIMP GetOptions(DWORD *pdwFlag) override; + STDMETHODIMP SetOptions(DWORD dwFlag) override; + // IAutoCompleteDropDown methods + STDMETHODIMP GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString) override; + STDMETHODIMP ResetEnumerator() override; // IEnumString methods - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched); - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); - virtual HRESULT STDMETHODCALLTYPE Reset(); - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum); - -DECLARE_REGISTRY_RESOURCEID(IDR_AUTOCOMPLETE) -DECLARE_NOT_AGGREGATABLE(CAutoComplete) - -DECLARE_PROTECT_FINAL_CONSTRUCT() - -BEGIN_COM_MAP(CAutoComplete) - COM_INTERFACE_ENTRY_IID(IID_IAutoComplete, IAutoComplete) - COM_INTERFACE_ENTRY_IID(IID_IAutoComplete2, IAutoComplete2) - COM_INTERFACE_ENTRY_IID(IID_IAutoCompleteDropDown, IAutoCompleteDropDown) - COM_INTERFACE_ENTRY_IID(IID_IEnumString, IEnumString) -END_COM_MAP() -}; + STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override; + STDMETHODIMP Skip(ULONG celt) override; + STDMETHODIMP Reset() override; + STDMETHODIMP Clone(IEnumString **ppOut) override; + +protected: + // The following variables are POD (plain old data): + BOOL m_bDowner; // downer or upper? (below textbox or above textbox) + DWORD m_dwOptions; // for IAutoComplete2::SetOptions + DWORD m_bEnabled; // the auto-composition is enabled? + HWND m_hwndCombo; // the combobox if any + HFONT m_hFont; // the font + BOOL m_bResized; // re-sized by size-box? + RECT m_rcEdit; // in screen coordinates, to watch the position + // The following variables are non-POD: + CStringW m_strText; // internal text (used in selecting item and reverting text) + CStringW m_strStemText; // dirname + '\\' + CStringW m_strQuickComplete; // used for [Ctrl]+[Enter] + CACEditCtrl m_hwndEdit; // subclassed to watch + CACListView m_hwndList; // this listview is virtual + CACScrollBar m_hwndScrollBar; // scroll bar contol + CACSizeBox m_hwndSizeBox; // the size grip + CComPtr<IEnumString> m_pEnum; // used for enumeration + CComPtr<IACList> m_pACList; // for IACList::Expand to update the list + CSimpleArray<CStringW> m_innerList; // internal list + CSimpleArray<CStringW> m_outerList; // owner data for virtual listview + // protected methods + VOID UpdateDropDownState(); + VOID CalcRects(BOOL bDowner, RECT& rcListView, RECT& rcScrollBar, RECT& rcSizeBox); + VOID LoadQuickComplete(LPCWSTR pwszRegKeyPath, LPCWSTR pwszQuickComplete); + CStringW GetQuickEdit(LPCWSTR pszText); + VOID RepositionDropDown(); + INT ReLoadInnerList(); + INT UpdateInnerList(); + INT UpdateOuterList(); + VOID UpdateCompletion(BOOL bAppendOK); + // message map + BEGIN_MSG_MAP(CAutoComplete) + MESSAGE_HANDLER(WM_CREATE, OnCreate) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(WM_DRAWITEM, OnDrawItem) + MESSAGE_HANDLER(WM_EXITSIZEMOVE, OnExitSizeMove) + MESSAGE_HANDLER(WM_GETMINMAXINFO, OnGetMinMaxInfo) + MESSAGE_HANDLER(WM_MEASUREITEM, OnMeasureItem) + MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate) + MESSAGE_HANDLER(WM_NCACTIVATE, OnNCActivate) + MESSAGE_HANDLER(WM_NCLBUTTONDOWN, OnNCLButtonDown) + MESSAGE_HANDLER(WM_NOTIFY, OnNotify) + MESSAGE_HANDLER(WM_NCHITTEST, OnNCHitTest) + MESSAGE_HANDLER(WM_SIZE, OnSize) + MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) + MESSAGE_HANDLER(WM_TIMER, OnTimer) + MESSAGE_HANDLER(WM_VSCROLL, OnVScroll) + END_MSG_MAP() + // message handlers + LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnDrawItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnMeasureItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNCActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNCLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNCHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnVScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); -#endif /* _AUTOCOMPLETE_H_ */ + DECLARE_REGISTRY_RESOURCEID(IDR_AUTOCOMPLETE) + DECLARE_NOT_AGGREGATABLE(CAutoComplete) + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CAutoComplete) + COM_INTERFACE_ENTRY_IID(IID_IAutoComplete, IAutoComplete) + COM_INTERFACE_ENTRY_IID(IID_IAutoComplete2, IAutoComplete2) + COM_INTERFACE_ENTRY_IID(IID_IAutoCompleteDropDown, IAutoCompleteDropDown) + COM_INTERFACE_ENTRY_IID(IID_IEnumString, IEnumString) + END_COM_MAP() +};
3 years, 9 months
1
0
0
0
[reactos] 01/01: [CRT] Add CFI annotatiions to memmove function
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c34c067c461d00c290e7…
commit 0c34c067c461d00c290e76e8066b226e47eeec43 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Mar 9 19:41:15 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Tue Mar 9 19:42:49 2021 +0100 [CRT] Add CFI annotatiions to memmove function --- sdk/lib/crt/mem/i386/memmove_asm.s | 41 ++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/sdk/lib/crt/mem/i386/memmove_asm.s b/sdk/lib/crt/mem/i386/memmove_asm.s index 299b2cc8d38..35b0ee37566 100644 --- a/sdk/lib/crt/mem/i386/memmove_asm.s +++ b/sdk/lib/crt/mem/i386/memmove_asm.s @@ -14,15 +14,20 @@ _memcpy: FUNC _memmove FPO 0, 3, 5, 2, 1, FRAME_NONFPO push ebp + CFI_ADJUST_CFA_OFFSET 4 + CFI_REL_OFFSET ebp, 0 mov ebp, esp - + CFI_DEF_CFA_REGISTER ebp + push esi + CFI_REL_OFFSET esi, -4 push edi - + CFI_REL_OFFSET edi, -8 + mov edi, [ebp + 8] mov esi, [ebp + 12] mov ecx, [ebp + 16] - + cmp edi, esi jbe .CopyUp mov eax, ecx @@ -30,9 +35,9 @@ FUNC _memmove cmp edi, eax jb .CopyDown -.CopyUp: +.CopyUp: cld - + cmp ecx, 16 jb .L1 mov edx, ecx @@ -53,29 +58,34 @@ FUNC _memmove rep movsd mov ecx, edx and ecx, 3 -.L1: +.L1: test ecx, ecx je .L3 rep movsb .L3: mov eax, [ebp + 8] pop edi + CFI_SAME_VALUE edi pop esi + CFI_SAME_VALUE esi leave + CFI_ADJUST_CFA_OFFSET -4 + CFI_SAME_VALUE ebp + CFI_DEF_CFA_REGISTER esp ret .CopyDown: std - + add edi, ecx add esi, ecx - + cmp ecx, 16 jb .L4 mov edx, ecx test edi, 3 je .L5 - + /* * Make the destination dword aligned */ @@ -86,10 +96,10 @@ FUNC _memmove dec edi rep movsb mov ecx, edx - + sub esi, 3 sub edi, 3 -.L6: +.L6: shr ecx, 2 rep movsd mov ecx, edx @@ -97,14 +107,19 @@ FUNC _memmove je .L7 add esi, 3 add edi, 3 -.L8: +.L8: rep movsb .L7: cld mov eax, [ebp + 8] pop edi + CFI_SAME_VALUE edi pop esi + CFI_SAME_VALUE esi leave + CFI_ADJUST_CFA_OFFSET -4 + CFI_SAME_VALUE ebp + CFI_DEF_CFA_REGISTER esp ret .L5: sub edi, 4 @@ -113,7 +128,7 @@ FUNC _memmove .L4: test ecx, ecx - je .L7 + je .L7 dec esi dec edi jmp .L8
3 years, 9 months
1
0
0
0
[reactos] 01/01: [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468)
by Chan Chilung
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a31fe6ca7e2f95df439a…
commit 6a31fe6ca7e2f95df439ae87ef8909d47a820b44 Author: Chan Chilung <eason066(a)gmail.com> AuthorDate: Tue Mar 9 23:51:37 2021 +0800 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 9 16:51:37 2021 +0100 [TRANSLATION][INF] Update Chinese Traditional (zh-TW) translation (#3468) - Add / improve Chinese Traditional Translations for INFs. - Name changing (removed Aobi in my name) Add Chinese Traditional translation for: - cmdutils/at - cmdutils/comp - hotplug.cpl - rosapps' sysutils/ctm Chinese Traditional (zh-TW) translation update for: - cmdutils/find - cmdutils/help - cmdutils/label - cmdutils/whoami - mspaint - shutdown - taskmgr - diskpart - format - appwiz.cpl - input.cpl - powercfg.cpl - shimgvw - user32 --- base/applications/cmdutils/at/at.rc | 3 + base/applications/cmdutils/at/lang/zh-CN.rc | 8 +- base/applications/cmdutils/at/lang/zh-TW.rc | 51 ++++ base/applications/cmdutils/comp/comp.rc | 3 + base/applications/cmdutils/comp/lang/zh-TW.rc | 25 ++ base/applications/cmdutils/find/lang/zh-TW.rc | 19 +- base/applications/cmdutils/help/lang/zh-TW.rc | 57 ++-- base/applications/cmdutils/label/lang/zh-TW.rc | 34 ++- base/applications/cmdutils/whoami/lang/zh-TW.rc | 45 +-- base/applications/mspaint/lang/zh-TW.rc | 33 +-- base/applications/shutdown/lang/zh-TW.rc | 2 +- base/applications/taskmgr/lang/zh-TW.rc | 4 +- base/system/diskpart/lang/zh-TW.rc | 14 +- base/system/format/lang/zh-TW.rc | 24 +- dll/cpl/appwiz/lang/zh-TW.rc | 10 +- dll/cpl/hotplug/hotplug.rc | 3 + dll/cpl/hotplug/lang/zh-TW.rc | 32 +++ dll/cpl/input/lang/zh-TW.rc | 31 +- dll/cpl/powercfg/lang/zh-TW.rc | 23 +- dll/win32/shimgvw/lang/zh-TW.rc | 29 +- media/inf/NET_NIC.inf | 3 + media/inf/audio.inf | 3 + media/inf/battery.inf | 8 + media/inf/bth.inf | 4 + media/inf/c_image.inf | 3 + media/inf/display.inf | 6 + media/inf/hal.inf | 11 + media/inf/hdc.inf | 313 ++++++++++++++++++++- media/inf/input.inf | 7 + media/inf/keyboard.inf | 6 + media/inf/legcydrv.inf | 3 + media/inf/machine.inf | 48 ++++ media/inf/monitor.inf | 7 + media/inf/msmouse.inf | 24 ++ media/inf/nettcpip.inf | 8 + media/inf/scsi.inf | 7 + media/inf/shortcuts.inf | 136 ++++----- media/inf/unknown.inf | 3 + media/inf/usb.inf | 15 +- media/inf/usbport.inf | 12 + media/inf/wmiacpi.inf | 4 + modules/rosapps/applications/sysutils/ctm/ctm.rc | 3 + .../applications/sysutils/ctm/lang/zh-TW.rc | 32 +++ win32ss/user/user32/lang/zh-TW.rc | 4 +- 44 files changed, 888 insertions(+), 232 deletions(-) diff --git a/base/applications/cmdutils/at/at.rc b/base/applications/cmdutils/at/at.rc index ea43c3d7658..364297c3f66 100644 --- a/base/applications/cmdutils/at/at.rc +++ b/base/applications/cmdutils/at/at.rc @@ -33,3 +33,6 @@ #ifdef LANGUAGE_ZH_CN #include "lang/zh-CN.rc" #endif +#ifdef LANGUAGE_ZH_TW + #include "lang/zh-TW.rc" +#endif diff --git a/base/applications/cmdutils/at/lang/zh-CN.rc b/base/applications/cmdutils/at/lang/zh-CN.rc index 4b549de5667..6597d3ffb0e 100644 --- a/base/applications/cmdutils/at/lang/zh-CN.rc +++ b/base/applications/cmdutils/at/lang/zh-CN.rc @@ -42,9 +42,9 @@ time 指定命令运行的时间。\n\ IDS_OK "确定" IDS_TASKID "任务 ID: %lu\n" - IDS_STATUS "状态: %s\n" - IDS_SCHEDULE "安排: %s\n" + IDS_STATUS "状态: %s\n" + IDS_SCHEDULE "安排: %s\n" IDS_TIME "今日时间: %s\n" - IDS_INTERACTIVE "交互: %s\n" - IDS_COMMAND "命令: %s\n" + IDS_INTERACTIVE "交互: %s\n" + IDS_COMMAND "命令: %s\n" END diff --git a/base/applications/cmdutils/at/lang/zh-TW.rc b/base/applications/cmdutils/at/lang/zh-TW.rc new file mode 100644 index 00000000000..242dbd7a938 --- /dev/null +++ b/base/applications/cmdutils/at/lang/zh-TW.rc @@ -0,0 +1,51 @@ +// Chinese Traditional (zh-TW) resources by Chan Chilung <eason066(a)gmail.com> 2021 + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + +STRINGTABLE +BEGIN + IDS_USAGE "AT 命令可安排電腦在特定的時間和日期執行命令和程序。\n\ +在使用 AT 命令前,請確保 Schedule 服務正在運行。\n\n\ +AT [\\\\computername] [ [id] [/DELETE] | /DELETE [/YES]]\n\ +AT [\\\\computername] time [/INTERACTIVE]\n\ + [ /EVERY:date[,...] | /NEXT:date[,...]] ""command""\n\n\ +\\\\computername 指定一個遠端電腦。若省略這個參數,命令將在本地電腦上執行\n\ +id 分配給安排命令的識別碼。\n\ +/DELETE 取消一個安排中的命令。若省略 id,電腦上所有被安排的\n\ + 命令都會被取消。\n\ +/YES 取消任務時使用將不再請求確認。\n\ +time 指定命令執行的時間。\n\ +/INTERACTIVE 允許在執行任務時與登入中的使用者的桌面互動。\n\ +/EVERY:date[,...] 在每周或每月的特定日子執行指定命令。\n\ + 若省略 date,則認定是每個月的今天。\n\ +/NEXT:date[,...] 在來到下一個日期的時候 (例如: 下星期四) 執行指定命令。\n\ + 若省略 date,則認定是每個月的今天。\n\ +""command"" 將被執行的命令或批量程序。\n" + + IDS_DELETE_ALL "這個操作將刪除所有安排好的任務。\n" + IDS_NEW_JOB "以任務 ID %lu 新增一項新任務\n" + IDS_JOBS_LIST "狀態 ID 日 時間 命令行\n" + IDS_NO_ENTRIES "列表中沒有項目。\n" + + IDS_CONFIRM_QUESTION "您想繼續操作嗎?(Y/N) [N]: " + IDS_CONFIRM_INVALID "\n這是一個無效的回應。\n" + IDS_CONFIRM_YES "Y" + IDS_CONFIRM_NO "N" + + IDS_TODAY "今天" + IDS_TOMORROW "明天" + IDS_EVERY "每次" + IDS_NEXT "下次" + + IDS_YES "是" + IDS_NO "否" + IDS_ERROR "錯誤" + IDS_OK "確定" + + IDS_TASKID "任務 ID: %lu\n" + IDS_STATUS "狀態: %s\n" + IDS_SCHEDULE "安排: %s\n" + IDS_TIME "今日時間: %s\n" + IDS_INTERACTIVE "互動: %s\n" + IDS_COMMAND "命令: %s\n" +END diff --git a/base/applications/cmdutils/comp/comp.rc b/base/applications/cmdutils/comp/comp.rc index 9e564212ef9..f53c63533c9 100644 --- a/base/applications/cmdutils/comp/comp.rc +++ b/base/applications/cmdutils/comp/comp.rc @@ -39,3 +39,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_ZH_CN #include "lang/zh-CN.rc" #endif +#ifdef LANGUAGE_ZH_TW + #include "lang/zh-TW.rc" +#endif diff --git a/base/applications/cmdutils/comp/lang/zh-TW.rc b/base/applications/cmdutils/comp/lang/zh-TW.rc new file mode 100644 index 00000000000..0b6e6c74226 --- /dev/null +++ b/base/applications/cmdutils/comp/lang/zh-TW.rc @@ -0,0 +1,25 @@ +// Chinese Traditional (zh-TW) resources by Chan Chilung <eason066(a)gmail.com> 2021 + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + +STRINGTABLE +BEGIN + IDS_HELP "比較兩個或兩組檔案的内容。\n\n\ +COMP [/L] [/A] [data1] [data2]\n\n\ + data1 指定要比較的第一個檔案的位置和名稱。\n\ + data2 指定要比較的第二個檔案的位置和名稱。\n\ + /A 以 ASCII 字符形式顯示區別 (預設: 十六進制)。\n\ + /L 顯示行數區別。\n" + IDS_INVALIDSWITCH "無效的選項 - /%c\n" + IDS_BADSYNTAX "命令行語法錯誤\n" + IDS_FILEERROR "無法找到或開啟檔案: %s\n" + IDS_COMPARING "正在比較 %s 和 %s...\n" + IDS_FILESIZEERROR "無法判斷該檔案的大小: %s\n" + IDS_SIZEDIFFERS "檔案大小不一致。\n" + IDS_READERROR "讀取檔案時發生錯誤。\n" + IDS_MISMATCHLINE "在行 %d 處比較時發生錯誤\n" + IDS_MISMATCHOFFSET "在偏移 0x%X 處比較時發生錯誤\n" + IDS_ASCIIDIFF "檔案%d = %c\n" + IDS_HEXADECIMALDIFF "檔案%d = %X\n" + IDS_MATCH "檔案比較完成\n" +END diff --git a/base/applications/cmdutils/find/lang/zh-TW.rc b/base/applications/cmdutils/find/lang/zh-TW.rc index cd2c7b859d3..f38518e8157 100644 --- a/base/applications/cmdutils/find/lang/zh-TW.rc +++ b/base/applications/cmdutils/find/lang/zh-TW.rc @@ -1,17 +1,22 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ - +/* + * FILE: base/applications/cmdutils/find/lang/zh-TW.rc + * PURPOSE: Chinese (Traditional) Language File for find + * TRANSLATOR: Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + * Chan Chilung 2021 (eason066(a)gmail.com) + */ + LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN - IDS_USAGE "FIND: 輸出某檔中包含指定字串的所有行。\n\n\ + IDS_USAGE "FIND: 列出所有在檔案中包含指定字串的行。\n\n\ FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""字串"" [文件...]\n\ /V 輸出不包含該指定字串的行。\n\ /C 計算包含該字串的行數。\n\ /N 從 1 開始為顯示的行編號。\n\ /I 忽略大小寫。\n\ - /OFF[LINE] Do not skip files that have the offline attribute set." - IDS_NO_SUCH_FILE "FIND: %s: 沒有這個檔\n" - IDS_CANNOT_OPEN "FIND: %s: 無法開啟檔\n" - IDS_INVALID_SWITCH "FIND: Invalid switch\n" + /OFF[LINE] 不忽略有離線屬性集的檔案。" + IDS_NO_SUCH_FILE "FIND: %s: 找不到這個檔案\n" + IDS_CANNOT_OPEN "FIND: %s: 無法開啟檔案\n" + IDS_INVALID_SWITCH "FIND: 無效的切換參數\n" END diff --git a/base/applications/cmdutils/help/lang/zh-TW.rc b/base/applications/cmdutils/help/lang/zh-TW.rc index 4b1ea59be7f..5513561ed3d 100644 --- a/base/applications/cmdutils/help/lang/zh-TW.rc +++ b/base/applications/cmdutils/help/lang/zh-TW.rc @@ -1,15 +1,18 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* + * Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + * modified by Chan Chilung 2021 (eason066(a)gmail.com) + */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN - IDS_NO_ENTRY "通過説明實用程式不支援此命令。\n試 ""%s /?""。\n" + IDS_NO_ENTRY "通過説明實用程式不支援此命令。\n請嘗試 ""%s /?""。\n" END STRINGTABLE BEGIN - IDS_USAGE "提供ReactOS命令的説明資訊。\n\n\ + IDS_USAGE "提供 ReactOS 命令的説明資訊。\n\n\ HELP [command]\n\n\ command - 顯示此命令的説明資訊。\n" IDS_HELP1 "列出所有可用命令 (+ 它們的描述)\n\n\ @@ -17,21 +20,21 @@ HELP [command]\n\n\ 命令 /? 得到特定命令的更多資訊\n\n\ ? 列出所有可用命令 (沒有描述)。\n\ ALIAS 設置、刪除或顯示別名。\n\ -ATTRIB 顯示或改變檔案屬性。\n\ +ATTRIB 顯示或更改檔案屬性。\n\ BEEP 使揚聲器發聲。\n\ CALL 從一個批次程式中調用另一個。\n\ CD 顯示目前的目錄的名稱或更改目前的目錄。\n\ CHCP 顯示或設置活動字碼頁。\n\ CHOICE 等待使用者在一組選項中做出選擇。\n\ CLS 清除螢幕。\n\ -CMD 啟動 ReactOS 命令列解譯器的一個新實例。\n\ -COLOR 設置主控台預設的前景和背景顏色。\n\ +CMD 啟動新的 ReactOS 命令直譯器實例。\n\ +COLOR 設定主控台預設的前景和背景顏色。\n\ COPY 將一個或多個檔案複製到另一個位置。\n\ -DATE 顯示或設置日期。\n\ -DELETE 刪除一個或多個檔。\n\ +DATE 顯示或設定日期。\n\ +DELETE 刪除一個或多個檔案。\n\ DIR 顯示一個目錄中的檔案清單和子目錄。\n\ -ECHO 顯示消息,或開啟/關閉命令回顯。\n\ -ERASE 刪除一個或多個檔。\n\ +ECHO 顯示訊息,或開啟/關閉命令回顯。\n\ +ERASE 刪除一個或多個檔案。\n\ EXIT 退出 CMD.EXE 程式 (命令直譯器)。\n\ FOR 為一組檔中的每一個檔執行指定命令。\n\ FREE (空閒的) 磁碟空間。\n\ @@ -39,32 +42,32 @@ GOTO 在批次程式中指示 ReactOS 命令直譯器跳轉到被標記的 HELP 為 ReactOS 命令提供説明資訊。\n\ HISTORY 列出所有曾被使用的命令。\n\ IF 在批次程式中執行條件控制。\n\ -LABEL 創建、更改或刪除磁片標籤。\n\ -MD 創建一個目錄。\n\ -MKDIR 創建一個目錄。\n\ -MKLINK 創建一個檔案系統連結化物件。\n\ -MOVE 將一個或多個檔從一個資料夾移動到另一個資料夾。\n\ -PATH 顯示或設置可執行檔的搜索路徑。\n\ +LABEL 建立、更改或刪除磁碟代號。\n\ +MD 建立一個目錄。\n\ +MKDIR 建立一個目錄。\n\ +MKLINK 建立一個檔案系統連結化物件。\n\ +MOVE 將一個或多個檔案從一個資料夾移動到另一個資料夾。\n\ +PATH 顯示或設定可執行檔的搜尋路徑。\n\ PAUSE 掛起批次檔的執行並顯示一條消息。\n\ POPD 恢復由 PUSHD 存儲的前一個目前的目錄的值。\n\ PROMPT 更改命令提示字元。\n\ -PUSHD 保存目前的目錄然後更改。\n\ +PUSHD 保存目前的目錄,然後更改它。\n\ RD 刪除一個目錄。\n\ REM 在批次檔中記錄注釋 (評論)。\n\ -REN 重命名一個或多個檔。\n\ -RENAME 重命名一個或多個檔。\n\ -REPLACE 替換檔。\n\ +REN 重新命名一個或多個檔案。\n\ +RENAME 重新命名一個或多個檔案。\n\ +REPLACE 替換檔案。\n\ RMDIR 刪除一個目錄。\n\ SCREEN 移動游標並可選地輸出文本。\n\ -SET 顯示、設置或刪除 ReactOS 環境變數。\n\ +SET 顯示、設定或刪除 ReactOS 環境變數。\n\ SHIFT 在批次檔中移動可替換參數的位置。\n" IDS_HELP2 "START 啟動一個分隔的視窗來運行指定的程式或命令。\n\ 執行命令。\n\ -TIME 顯示或設置系統時間。\n\ -TIMER 允許使用至多十個停錶。\n\ -TITLE 設置一個 CMD.EXE 會話的視窗標題。\n\ -TYPE 顯示一個文字檔的內容。\n\ +TIME 顯示或設定系統時間。\n\ +TIMER 允許使用最多十個計時器。\n\ +TITLE 設定一個 CMD.EXE 會話的視窗標題。\n\ +TYPE 顯示一個文字檔案的內容。\n\ VER 顯示 ReactOS 版本。\n\ -VERIFY 決定 ReactOS 是否檢驗您的檔已被正確地寫入磁片。\n\ -VOL 顯示磁片標籤和序號。\n" +VERIFY 告訴 ReactOS 是否驗證您的檔案已正確地寫入至磁碟。\n\ +VOL 顯示磁碟代號和序號。\n" END diff --git a/base/applications/cmdutils/label/lang/zh-TW.rc b/base/applications/cmdutils/label/lang/zh-TW.rc index 5b7503b2443..a451f4527a5 100644 --- a/base/applications/cmdutils/label/lang/zh-TW.rc +++ b/base/applications/cmdutils/label/lang/zh-TW.rc @@ -1,21 +1,25 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ -/* Improved by Luo Yufan 2019 <njlyf2011(a)hotmail.com> */ +/* + * FILE: base/applications/cmdutils/label/lang/zh-TW.rc + * PURPOSE: Chinese (Traditional) Language File for label + * TRANSLATOR: Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + * Luo Yufan 2019 (njlyf2011(a)hotmail.com) + * Chan Chilung 2021 (eason066(a)gmail.com) + */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN -// STRING_LABEL_HELP "顯示或改變驅動器卷標。\n\nLABEL [驅動器:][卷標]\n" - STRING_LABEL_HELP "Creates, changes or deletes the volume label of a disk.\n\n\ -LABEL [drive:][label]\n\n\ - drive: Specifies the drive letter of a drive.\n\ - label Specifies the label of the drive." - STRING_LABEL_TEXT1 "驅動器 %c 中的卷是 %s\n" - STRING_LABEL_TEXT2 "驅動器 %c 中的卷沒有卷標。\n" - STRING_LABEL_TEXT3 "卷的序列號是 %04X-%04X\n" - STRING_LABEL_TEXT4 "驅動器卷標 (32 個字元, 按 ENTER 忽略)? " - STRING_LABEL_PROMPT "Delete current volume label (Y/N)? " + STRING_LABEL_HELP "建立、更改或刪除磁碟的標籤。\n\n\ +LABEL [磁碟:][標籤]\n\n\ + drive: 指定磁碟代號。\n\ + label 指定磁碟區標籤" + STRING_LABEL_TEXT1 "磁碟 %c 中的磁碟區標籤是 %s\n" + STRING_LABEL_TEXT2 "磁碟 %c 中的磁碟區沒有標籤。\n" + STRING_LABEL_TEXT3 "磁碟區的序列號是 %04X-%04X\n" + STRING_LABEL_TEXT4 "磁碟區標籤 (最多 32 個字元, 直接按 ENTER 以表示不輸入)? " + STRING_LABEL_PROMPT "刪除目前的磁碟區標籤 (Y/N)? " STRING_LABEL_OPTIONS "YN" - STRING_ERROR_INVALID_DRIVE "無效驅動器指定\n" - STRING_ERROR_INVALID_LABEL "Invalid volume label\n" -END \ No newline at end of file + STRING_ERROR_INVALID_DRIVE "無效的磁碟規格\n" + STRING_ERROR_INVALID_LABEL "無效的磁碟區標籤\n" +END diff --git a/base/applications/cmdutils/whoami/lang/zh-TW.rc b/base/applications/cmdutils/whoami/lang/zh-TW.rc index 532c5024b74..74a7b28cb1d 100644 --- a/base/applications/cmdutils/whoami/lang/zh-TW.rc +++ b/base/applications/cmdutils/whoami/lang/zh-TW.rc @@ -1,21 +1,24 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* + * Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + * modified by Chan Chilung 2021 (eason066(a)gmail.com) + */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN IDS_USER_HEADER "使用者資訊" - IDS_GROU_HEADER "組資訊" - IDS_PRIV_HEADER "特權資訊" + IDS_GROU_HEADER "群組資訊" + IDS_PRIV_HEADER "許可權資訊" IDS_COL_USER_NAME "使用者名稱" - IDS_COL_GROUP_NAME "組名稱" + IDS_COL_GROUP_NAME "群組名稱" IDS_COL_TYPE "類型" IDS_COL_SID "SID" IDS_COL_ATTRIB "屬性" IDS_COL_PRIV_NAME "許可權名稱" IDS_COL_DESCRIPTION "描述" IDS_COL_STATE "狀態" - IDS_TP_WELL_KNOWN_GROUP "已知組" + IDS_TP_WELL_KNOWN_GROUP "已知群組" IDS_TP_ALIAS "別名" IDS_TP_LABEL "標籤" @@ -24,27 +27,27 @@ BEGIN you can test your translation of these attributes by using 'whoami /groups' */ - IDS_ATTR_GROUP_MANDATORY "強制性組, " - IDS_ATTR_GROUP_ENABLED_BY_DEFAULT "默認情況下,啟用, " - IDS_ATTR_GROUP_ENABLED "已啟用的組, " - IDS_ATTR_GROUP_OWNER "組的所有者, " + IDS_ATTR_GROUP_MANDATORY "必要群組, " + IDS_ATTR_GROUP_ENABLED_BY_DEFAULT "預設啟用, " + IDS_ATTR_GROUP_ENABLED "已啟用的群組, " + IDS_ATTR_GROUP_OWNER "群組擁有者, " IDS_UNKNOWN_DESCRIPTION "???" IDS_STATE_ENABLED "啟用" - IDS_STATE_DISABLED "已禁用" - IDS_ERROR_UPN "錯誤: 無法獲取使用者主體名稱 (UPN) 與當前登入的使用者\n不是域使用者。\n" - IDS_ERROR_FQDN "錯誤: 無法獲取完全限定可分辨名稱 (FQDN) 與當前\n登入的使用者不是域使用者。\n" - IDS_ERROR_VALUEXPECTED "錯誤: 無效語法。 值的預期 '/fo'。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" - IDS_ERROR_VALUENOTALLOWED "錯誤: 無效語法。 '%s' 值不允許為 '/fo' 選項。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" - IDS_ERROR_1TIMES "錯誤: 無效語法。 選項不允許超過 '1' 的次數。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" - IDS_ERROR_INVALIDSYNTAX "錯誤: 無效語法。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" - IDS_ERROR_INVALIDARG "錯誤: 無效的參數/選項 - '%s'。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" - IDS_ERROR_NH_LIST "錯誤: /NH 開關不能用的列表格式。\n輸入 ""WHOAMI /?"" 以瞭解用法。\n" + IDS_STATE_DISABLED "停用" + IDS_ERROR_UPN "錯誤: 無法獲取使用者主體名稱 (UPN),\n因為當前登入的使用者不是網域使用者。\n" + IDS_ERROR_FQDN "錯誤: 無法獲取完全限定可分辨名稱 (FQDN),\n因為當前登入的使用者不是網域使用者。\n" + IDS_ERROR_VALUEXPECTED "錯誤: 無效語法。 值的預期 '/fo'。\n輸入 ""WHOAMI /?"" 以了解用法。\n" + IDS_ERROR_VALUENOTALLOWED "錯誤: 無效語法。 '%s' 值不允許為 '/fo' 選項。\n輸入 ""WHOAMI /?"" 以了解用法。\n" + IDS_ERROR_1TIMES "錯誤: 無效語法。 選項不允許超過 '1' 的次數。\n輸入 ""WHOAMI /?"" 以了解用法。\n" + IDS_ERROR_INVALIDSYNTAX "錯誤: 無效語法。\n輸入 ""WHOAMI /?"" 以了解用法。\n" + IDS_ERROR_INVALIDARG "錯誤: 無效的參數/選項 - '%s'。\n輸入 ""WHOAMI /?"" 以了解用法。\n" + IDS_ERROR_NH_LIST "錯誤: /NH 開關不能用的列表格式。\n輸入 ""WHOAMI /?"" 以了解用法。\n" IDS_HELP "描述:\n\ - 顯示本地登入的使用者的使用者、 組和許可權資訊。\n\ - 如果不提供任何參數,顯示當前的域和使用者名稱。\n\ + 顯示本地登入的使用者的使用者、群組和許可權資訊。\n\ + 如果不提供任何參數,則顯示當前的網域和使用者名稱。\n\ \n\ 可用的輸出格式為 '/fo' 選項是 'csv', 'list' 和 'table'.\n\ - 使用 '/nh' 要隱藏頁首。 默認情況下表中顯示資料。\n\ + 使用 '/nh' 要隱藏頁首。 預設情況下表中顯示資料。\n\ \n\ 語法:\n\ whoami [/upn | /fqdn | /logonid]\n\ diff --git a/base/applications/mspaint/lang/zh-TW.rc b/base/applications/mspaint/lang/zh-TW.rc index 85bedb09d01..6001a2bf07e 100644 --- a/base/applications/mspaint/lang/zh-TW.rc +++ b/base/applications/mspaint/lang/zh-TW.rc @@ -4,6 +4,7 @@ * FILE: base/applications/mspaint/lang/zh-TW.rc * PURPOSE: Chinese (Traditional) Language resource file * TRANSLATOR: Elton Chung aka MfldElton <elton328(a)gmail.com> + * Chan Chilung <eason066(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -12,24 +13,24 @@ ID_MENU MENU BEGIN POPUP "檔案(&F)" BEGIN - MENUITEM "新建(&N)\tCtrl+N", IDM_FILENEW + MENUITEM "新增(&N)\tCtrl+N", IDM_FILENEW MENUITEM "開啟...(&O)\tCtrl+O", IDM_FILEOPEN MENUITEM "儲存(&S)\tCtrl+S", IDM_FILESAVE MENUITEM "另存為...(&A)", IDM_FILESAVEAS MENUITEM SEPARATOR - MENUITEM "From Scanner or Camera...", IDM_FILEFROMSCANNERORCAMERA + MENUITEM "從掃描器或相機導入...", IDM_FILEFROMSCANNERORCAMERA MENUITEM SEPARATOR MENUITEM "頁面檢視", IDM_FILEPAGEVIEW MENUITEM "頁面設定...", IDM_FILEPAGESETUP MENUITEM "列印(&P)...\tCtrl+P", IDM_FILEPRINT MENUITEM SEPARATOR - MENUITEM "Send...", IDM_FILESEND + MENUITEM "傳送...", IDM_FILESEND MENUITEM SEPARATOR - MENUITEM "儲存為壁紙 (普通)", IDM_FILEASWALLPAPERPLANE - MENUITEM "儲存為壁紙 (居中)", IDM_FILEASWALLPAPERCENTERED - MENUITEM "儲存為壁紙 (拉伸)", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM "儲存為牆紙 (並排)", IDM_FILEASWALLPAPERPLANE + MENUITEM "儲存為牆紙 (居中)", IDM_FILEASWALLPAPERCENTERED + MENUITEM "儲存為牆紙 (拉伸)", IDM_FILEASWALLPAPERSTRETCHED MENUITEM SEPARATOR - MENUITEM "Most recently used file", IDM_FILEMOSTRECENTLYUSEDFILE, GRAYED + MENUITEM "最近使用過的檔案", IDM_FILEMOSTRECENTLYUSEDFILE, GRAYED MENUITEM SEPARATOR MENUITEM "結束(&X)\tAlt+F4", IDM_FILEEXIT END @@ -71,7 +72,7 @@ BEGIN MENUITEM "顯示格線\tCtrl+G", IDM_VIEWSHOWGRID MENUITEM "顯示縮圖", IDM_VIEWSHOWMINIATURE END - MENUITEM "全屏顯示\tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "全螢幕顯示\tCtrl+F", IDM_VIEWFULLSCREEN END POPUP "圖像(&I)" BEGIN @@ -167,7 +168,7 @@ END IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 9, "新細明體" -CAPTION "拉伸和傾斜圖片" +CAPTION "拉伸和傾斜圖像" BEGIN GROUPBOX "拉伸", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 @@ -197,7 +198,7 @@ BEGIN IDS_WINDOWTITLE "%s - 畫圖" IDS_INFOTITLE "ReactOS 畫圖" IDS_INFOTEXT "GNU LGPL 下發佈的 (詳見
www.gnu.org
)" - IDS_SAVEPROMPTTEXT "您想把改變保存到 %s 嗎?" + IDS_SAVEPROMPTTEXT "您想把變更保存到 %s 嗎?" IDS_DEFAULTFILENAME "未命名.bmp" IDS_MINIATURETITLE "縮圖" IDS_TOOLTIP1 "自由選擇" @@ -216,13 +217,13 @@ BEGIN IDS_TOOLTIP14 "多邊形" IDS_TOOLTIP15 "橢圓形" IDS_TOOLTIP16 "圓角矩形" - IDS_ALLFILES "All Files" - IDS_ALLPICTUREFILES "All Picture Files" + IDS_ALLFILES "所有檔案" + IDS_ALLPICTUREFILES "所有圖像檔案" IDS_FILESIZE "%d 位元組" IDS_PRINTRES "%d x %d 像素每米" - IDS_INTNUMBERS "請輸入整數只!" - IDS_PERCENTAGE "所占百分比必須介於 1 和 500 之間。" - IDS_ANGLE "角度必須-89 和 89 之間。" - IDS_LOADERRORTEXT "無法載入檔 %s。" + IDS_INTNUMBERS "請輸入整數!" + IDS_PERCENTAGE "所佔百分比必須介於 1 和 500 之間。" + IDS_ANGLE "角度必須介於 -89 和 89 之間。" + IDS_LOADERRORTEXT "無法載入檔案 %s。" IDS_ENLARGEPROMPTTEXT "剪貼簿中的圖像比點陣圖大。\n你想擴大點陣圖嗎?" END diff --git a/base/applications/shutdown/lang/zh-TW.rc b/base/applications/shutdown/lang/zh-TW.rc index 046376ba5cb..49d50bebc41 100644 --- a/base/applications/shutdown/lang/zh-TW.rc +++ b/base/applications/shutdown/lang/zh-TW.rc @@ -66,7 +66,7 @@ BEGIN IDS_ERROR_SHUTDOWN_REBOOT "錯誤: 在同一時間無法關機和重新開機。\n" IDS_ERROR_TIMEOUT "錯誤: 等候逾時的值 %u 超出範圍 (0-315360000)。\n" - IDS_ERROR_ABORT "錯誤: 無法中止的系統關閉。\n" + IDS_ERROR_ABORT "錯誤: 無法終止的系統關閉。\n" IDS_ERROR_LOGOFF "錯誤: 無法登出系統。\n" IDS_ERROR_SHUTDOWN "錯誤: 無法關閉系統。\n" IDS_ERROR_RESTART "錯誤: 無法重新啟動系統。\n" diff --git a/base/applications/taskmgr/lang/zh-TW.rc b/base/applications/taskmgr/lang/zh-TW.rc index b4745e8d589..42b8f5182ce 100644 --- a/base/applications/taskmgr/lang/zh-TW.rc +++ b/base/applications/taskmgr/lang/zh-TW.rc @@ -36,7 +36,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "大圖示(&G)", ID_VIEW_LARGE MENUITEM "小圖示(&M)", ID_VIEW_SMALL - MENUITEM "詳細信息(&D)", ID_VIEW_DETAILS, CHECKED + MENUITEM "詳細資料(&D)", ID_VIEW_DETAILS, CHECKED MENUITEM "選擇欄位(&S)...", ID_VIEW_SELECTCOLUMNS POPUP "CPU 記錄(&C)" BEGIN @@ -331,7 +331,7 @@ STRINGTABLE BEGIN IDS_APP_TITLE "工作管理員" IDC_TASKMGR "工作管理員" - IDS_IDLE_PROCESS "系統空閒處理序" + IDS_IDLE_PROCESS "系統空閒處理程序" END STRINGTABLE diff --git a/base/system/diskpart/lang/zh-TW.rc b/base/system/diskpart/lang/zh-TW.rc index 0eaafbf4659..21be6d0cd81 100644 --- a/base/system/diskpart/lang/zh-TW.rc +++ b/base/system/diskpart/lang/zh-TW.rc @@ -1,5 +1,5 @@ /* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ -/* Translation improved by Aobi Chan CL 2020 (eason066(a)gmail.com) */ +/* Translation improved by Chan Chilung 2020 - 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -14,7 +14,7 @@ Usage: DISKPART [/S 檔名] [/T 逾時] [/?]\n\n\ /?\t\t顯示此說明訊息。\n\n" IDS_APP_LICENSE "根據 GNU GPLv2 許可\n" IDS_APP_CURR_COMPUTER "在電腦: %s\n\n" - IDS_APP_LEAVING "\n正在離開 DiskPart ...\n" + IDS_APP_LEAVING "\n正在退出 DiskPart ...\n" IDS_APP_PROMPT "DISKPART> " END @@ -60,15 +60,15 @@ END /* Select command strings */ STRINGTABLE BEGIN - IDS_SELECT_NO_DISK "\n目前沒有選擇磁碟。\nP請選擇一個磁碟,然後再試一次。\n\n" - IDS_SELECT_DISK "\n磁碟 %lu 是所選的磁碟。\n\n" + IDS_SELECT_NO_DISK "\n目前沒有選擇磁碟。\n請選擇一個磁碟,然後再試一次。\n\n" + IDS_SELECT_DISK "\n磁碟 %lu 現在是所選的磁碟。\n\n" IDS_SELECT_DISK_INVALID "\n無效的磁碟。\n\n" IDS_SELECT_NO_PARTITION "\n目前選擇的磁碟沒有磁碟分割。\n請選擇一個磁碟,然後再試一次。\n\n" - IDS_SELECT_PARTITION "\n磁碟分割 %lu 是所選的磁碟分割。\n\n" + IDS_SELECT_PARTITION "\n磁碟分割 %lu 現在是所選的磁碟分割。\n\n" IDS_SELECT_PARTITION_NO_DISK "\n沒有選擇要設定磁碟分割的磁碟。\n請選擇一個磁碟,然後再試一次。\n\n" IDS_SELECT_PARTITION_INVALID "\n無效的磁碟分割。\n\n" IDS_SELECT_NO_VOLUME "\n目前沒有選擇磁碟區。\n請選擇一個磁碟,然後再試一次。\n\n" - IDS_SELECT_VOLUME "\n磁碟區 %lu 是所選的磁碟區。\n\n" + IDS_SELECT_VOLUME "\n磁碟區 %lu 現在是所選的磁碟區。\n\n" END /* Disk Status */ @@ -95,7 +95,7 @@ STRINGTABLE BEGIN IDS_HELP_CMD_DESC_ACTIVE "ACTIVE\t\t- 所選將磁碟分割標記為活動。\n" IDS_HELP_CMD_DESC_ADD "ADD\t\t- 將映象添加到一個簡單磁碟區。\n" - IDS_HELP_CMD_DESC_ASSIGN "ASSIGN\t\t- 為所選的磁碟區分配一個磁碟區代號或裝入點。\n" + IDS_HELP_CMD_DESC_ASSIGN "ASSIGN\t\t- 為所選的磁碟區分配一個代號或裝入點。\n" IDS_HELP_CMD_DESC_ATTACH "ATTACH\t\t- 附加的虛擬磁碟檔案。\n" IDS_HELP_CMD_DESC_ATTRIBUTES "ATTRIBUTES\t- 操縱磁碟區或磁碟的屬性。\n" IDS_HELP_CMD_DESC_AUTOMOUNT "AUTOMOUNT\t- 啟用和停用基本磁碟區的自動裝入。\n" diff --git a/base/system/format/lang/zh-TW.rc b/base/system/format/lang/zh-TW.rc index d52269e3c77..61349085870 100644 --- a/base/system/format/lang/zh-TW.rc +++ b/base/system/format/lang/zh-TW.rc @@ -1,16 +1,16 @@ /* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ -/* Translation improved by Aobi Chan CL 2020 (eason066(a)gmail.com) */ +/* Translation improved by Chan Chilung 2020 - 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN - STRING_HELP "用法:%s 磁碟區: [-FS:檔案系統] [-V:標籤] [-Q] [-A:大小] [-C]\n\n\ - [磁碟區:] 指定要格式化的磁碟機。\n\ + STRING_HELP "用法:%s 磁碟: [-FS:檔案系統] [-V:標籤] [-Q] [-A:大小] [-C]\n\n\ + [磁碟:] 指定要格式化的磁碟代號。\n\ -FS:檔案系統 指定檔案系統的類型 (%s)。\n\ -V:標籤 指定磁碟區標籤。\n\ -Q 執行快速格式化。\n\ - -A:大小 覆寫預設分配單元的大小。在一般情況下,強烈建議使用預設設定。\n\ + -A:大小 覆寫預設分配單元的大小。建議在一般情況下使用預設設定。\n\ NTFS 支援 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n\ FAT 支援 8192, 16K, 32K, 64K, 128K, 256K.\n\ NTFS 壓縮不支援 4096 以上的分配單元大小。\n\ @@ -20,22 +20,22 @@ BEGIN STRING_NO_SUPPORT "不支援的動作" STRING_FMIFS_FAIL "無法定位 FMIFS 進入點。\n\n" STRING_UNKNOW_ARG "未知參數:%s\n" - STRING_DRIVE_PARM "缺少必要的磁碟機參數。\n\n" + STRING_DRIVE_PARM "缺少必要的磁碟參數。\n\n" STRING_ERROR_DRIVE_TYPE "無法獲得磁碟機類型" - STRING_INSERT_DISK "在磁碟機 %C: 中插入一張新的軟碟片\n如果您準備就緒,請按 Enter..." - STRING_NO_VOLUME "無法查詢磁碟區" - STRING_NO_VOLUME_SIZE "無法查詢磁碟區大小" + STRING_INSERT_DISK "在磁碟機 %C: 中插入一張新的軟碟片\n如果您準備就緒,請按 ENTER..." + STRING_NO_VOLUME "無法查詢磁碟" + STRING_NO_VOLUME_SIZE "無法查詢磁碟大小" STRING_FILESYSTEM "檔案系統的類型是 %s。\n" - STRING_LABEL_NAME_EDIT "輸入磁碟區 %C 目前的標籤:" + STRING_LABEL_NAME_EDIT "輸入磁碟 %C 目前的標籤:" STRING_ERROR_LABEL "輸入的磁碟區標籤不正確。\n" - STRING_YN_FORMAT "\n警告:在磁碟機 %C: 上的所有資料都將丟失!\n確認要格式化嗎 (Y/N)?" + STRING_YN_FORMAT "\n警告:在磁碟 %C: 上的所有資料都將丟失!\n確認要格式化嗎 (Y/N)?" STRING_YES_NO_FAQ "YN" - STRING_VERIFYING "正在檢驗" + STRING_VERIFYING "正在驗證" STRING_FAST_FMT "正在快速格式化" STRING_CREATE_FSYS "正在建立檔案系統結構。\n" STRING_FMT_COMPLETE "格式化完成。\n" STRING_VOL_COMPRESS "磁碟區不支援壓縮。\n" - STRING_ENTER_LABEL "輸入磁碟區標籤 (最多 11 個字元,如要略過請直接按 Enter)?" + STRING_ENTER_LABEL "輸入磁碟區標籤 (最多 11 個字元,如要略過請直接按 ENTER)?" STRING_NO_LABEL "無法為磁碟區新增標籤" STRING_FREE_SPACE "\n%I64d 位元組總磁碟空間。\n%I64d 位元組可用。\n" STRING_SERIAL_NUMBER "\n磁碟區的序列號是 %04X-%04X\n" diff --git a/dll/cpl/appwiz/lang/zh-TW.rc b/dll/cpl/appwiz/lang/zh-TW.rc index 76acffcfdaf..10bf23c891c 100644 --- a/dll/cpl/appwiz/lang/zh-TW.rc +++ b/dll/cpl/appwiz/lang/zh-TW.rc @@ -1,10 +1,8 @@ /* * Traditional Chinese resource for appwiz (dll/cpl/appwiz/lang/zh-TW.rc) - * TRANSLATOR: Henry Tang Ih (henrytang2 [at] hotmail [dot] com) - * Luo Yufan (njlyf2011 [at] hotmail [dot] com) - * Aobi Chan CL (eason066 [at] gmail [dot] com) - * CREATED: 2016 - * MODIFIED: 2018, 2020 + * TRANSLATOR: 2016 Henry Tang Ih (henrytang2 [at] hotmail [dot] com) + * 2018 Luo Yufan (njlyf2011 [at] hotmail [dot] com) + * 2020 - 2021 Chan Chilung (eason066 [at] gmail [dot] com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -86,7 +84,7 @@ STRINGTABLE BEGIN IDS_DOWNLOADING "下載中..." IDS_INSTALLING "安裝中..." - IDS_INVALID_SHA "下載的檔案總和檢查碼錯誤。正在中止安裝已損毀的檔案。" + IDS_INVALID_SHA "下載的檔案總和檢查碼錯誤。正在終止安裝已損毀的檔案。" IDS_NEW_INTERNET_SHORTCUT "新增網際網路捷徑" IDS_DWL_FAILED "無法下載 Gecko 套件。請確保在您有網際網路連線的情況下才能進行下載。安裝程式將在不安裝 Gecko 的情況下繼續。" IDS_CANTMAKEINETSHORTCUT "無法建立網際網路捷徑。" diff --git a/dll/cpl/hotplug/hotplug.rc b/dll/cpl/hotplug/hotplug.rc index f6da7f1d01a..6bdb281461b 100644 --- a/dll/cpl/hotplug/hotplug.rc +++ b/dll/cpl/hotplug/hotplug.rc @@ -54,3 +54,6 @@ IDI_HOTPLUG ICON "resources/1.ico" #ifdef LANGUAGE_TR_TR #include "lang/tr-TR.rc" #endif +#ifdef LANGUAGE_ZH_TW + #include "lang/zh-TW.rc" +#endif diff --git a/dll/cpl/hotplug/lang/zh-TW.rc b/dll/cpl/hotplug/lang/zh-TW.rc new file mode 100644 index 00000000000..73ecc634caf --- /dev/null +++ b/dll/cpl/hotplug/lang/zh-TW.rc @@ -0,0 +1,32 @@ +// Chinese Traditional (zh-TW) resources by Chan Chilung <eason066(a)gmail.com> 2021 + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + +IDD_SAFE_REMOVE_HARDWARE_DIALOG DIALOGEX 0, 0, 278, 245 +CAPTION "安全地移除硬體" +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +FONT 9, "新細明體" +BEGIN + ICON IDI_HOTPLUG, IDC_SAFE_REMOVE_ICON, 7, 10, 20, 20 + LTEXT "選擇您要拔除或退出的裝置,然後按 [停止]。當 ReactOS 通知您可以安全地移除裝置時,請將裝置從電腦中拔除。", IDC_STATIC, 36, 10, 234, 24, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "硬體裝置(&H):", IDC_STATIC, 7, 42, 248, 8, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", IDC_SAFE_REMOVE_DEVICE_TREE, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP, 7, 52, 264, 102 + LTEXT "", IDC_SAFE_REMOVE_TEXT, 7, 156, 264, 16, WS_CHILD | WS_VISIBLE | WS_GROUP + PUSHBUTTON "內容(&P)", IDC_SAFE_REMOVE_PROPERTIES, 158, 178, 55, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "停止(&S)", IDC_SAFE_REMOVE_STOP, 216, 178, 55, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_STATIC, "static", SS_CENTER | SS_SUNKEN | WS_CHILD | WS_VISIBLE, 7, 200, 264, 1 + AUTOCHECKBOX "顯示裝置元件(&D)", IDC_SAFE_REMOVE_DISPLAY_COMPONENTS, 7, 208, 140, 10, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "關閉(&C)", IDCLOSE, 216, 224, 55, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + + +/* Menus */ + +IDM_POPUP_DEVICE_TREE MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "停止", IDM_STOP + MENUITEM "內容", IDM_PROPERTIES + END +END diff --git a/dll/cpl/input/lang/zh-TW.rc b/dll/cpl/input/lang/zh-TW.rc index 8e51aecf02e..061be2ff327 100644 --- a/dll/cpl/input/lang/zh-TW.rc +++ b/dll/cpl/input/lang/zh-TW.rc @@ -1,4 +1,5 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + Translation improved by Chan Chilung 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -7,29 +8,29 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "設定" FONT 9, "新細明體" BEGIN - LTEXT "為列表中顯示的每個輸入語言選擇服務。\n使用“添加”和“刪除”按鈕來修改這個列表。", -1, 9, 6, 238, 25 + LTEXT "為列表中顯示的每個輸入語言選擇服務。\n請按 [新增] 和 [刪除] 按鈕來修改這個列表。", -1, 9, 6, 238, 25 CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SINGLESEL | LVS_NOSORTHEADER | LVS_SHOWSELALWAYS | LVS_REPORT, 8, 36, 237, 101 PUSHBUTTON "設為預設值(&S)", IDC_SET_DEFAULT, 101, 159, 144, 14 - PUSHBUTTON "添加(&D)...", IDC_ADD_BUTTON, 27, 142, 70, 14 + PUSHBUTTON "新增(&D)...", IDC_ADD_BUTTON, 27, 142, 70, 14 PUSHBUTTON "刪除(&R)", IDC_REMOVE_BUTTON, 101, 142, 70, 14 PUSHBUTTON "屬性(&P)...", IDC_PROP_BUTTON, 175, 142, 70, 14 GROUPBOX "首選項", -1, 7, 185, 240, 36 - PUSHBUTTON "鍵設定(&K)...", IDC_KEY_SET_BTN, 14, 198, 110, 14 + PUSHBUTTON "按鍵設定(&K)...", IDC_KEY_SET_BTN, 14, 198, 110, 14 END IDD_PROPPAGEADVANCEDSETTINGS DIALOGEX 0, 0, 254, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "高階設定" +CAPTION "進階設定" FONT 9, "新細明體" BEGIN GROUPBOX "系統配置", -1, 7, 7, 240, 70 - AUTOCHECKBOX "關閉高階的文字服務(&T)", IDC_TURNOFFTEXTSVCS_CB, 14, 20, 220, 12 - LTEXT "選擇此覈取方塊以關閉所有程式中的高階的文字服務。\n這不是推薦東亞使用者因為這個命令將關閉語言欄。", -1, 14, 40, 230, 35 + AUTOCHECKBOX "關閉進階的文字服務(&T)", IDC_TURNOFFTEXTSVCS_CB, 14, 20, 220, 12 + LTEXT "選擇此核取方塊以關閉所有程式中的進階的文字服務。\n不推薦東亞使用者使用,因為這個命令將關閉語言欄。", -1, 14, 40, 230, 35 END IDD_KEYSETTINGS DIALOGEX 0, 0, 272, 163 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "高階鍵設定" +CAPTION "進階按鍵設定" FONT 9, "新細明體" BEGIN GROUPBOX "要關閉 Caps Lock", -1, 7, 7, 258, 26 @@ -46,7 +47,7 @@ END IDD_ADD DIALOGEX 20, 20, 227, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "添加輸入語言" +CAPTION "新增輸入語言" FONT 9, "新細明體" BEGIN LTEXT "輸入語言(&I):", -1, 7, 7, 61, 10 @@ -101,14 +102,14 @@ BEGIN IDS_WHATS_THIS "這是什麼?" IDS_LANGUAGE "語言" IDS_LAYOUT "鍵盤佈局" - IDS_REM_QUESTION "確實要刪除選擇的鍵盤佈局嗎?" + IDS_REM_QUESTION "確定要刪除選擇的鍵盤佈局嗎?" IDS_CONFIRMATION "確認" IDS_LAYOUT_EXISTS "此佈局已經存在。" - IDS_LAYOUT_EXISTS2 "此佈局已經存在且無法被添加" + IDS_LAYOUT_EXISTS2 "此佈局已經存在且無法新增" IDS_CTRL_SHIFT "Ctrl+Shift" IDS_LEFT_ALT_SHIFT "左 Alt+Shift" IDS_SWITCH_BET_INLANG "在輸入語言間切換" - IDS_REBOOT_NOW, "Reboot now?" + IDS_REBOOT_NOW, "要立即重新啟動嗎?" END STRINGTABLE @@ -150,7 +151,7 @@ BEGIN IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT "中文(繁體) - 大易" IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT "中文(繁體) - 新倉頡" IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT "中文(繁體) - 新注音" - IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT "中文(繁體) - 註音" + IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT "中文(繁體) - 注音" IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT "中文(繁體) - 速成" IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT "中文(繁體) - Unicode" IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT "中文(繁體) - 美國鍵盤" @@ -163,7 +164,7 @@ BEGIN IDS_DIVEHI_PHONETIC_LAYOUT "第維埃語拼音" IDS_DIVEHI_TYPEWRITER_LAYOUT "第維埃語印刷文字" IDS_DUTCH_LAYOUT "荷蘭" - IDS_ESPERANTO_LAYOUT "世界語" + IDS_ESPERANTO_LAYOUT "世界文" IDS_ESTONIAN_LAYOUT "愛沙尼亞文" IDS_FAEROESE_LAYOUT "法羅文" IDS_FARSI_LAYOUT "波斯文" @@ -249,7 +250,7 @@ BEGIN IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT "美國英語-Dvorak (慣用右手)" IDS_UNITED_STATES_INTERNATIONAL_LAYOUT "美國英語-國際" IDS_URDU_LAYOUT "烏都文" - IDS_US_LAYOUT "美國英語" + IDS_US_LAYOUT "美國" IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT "IBM 阿拉伯文 238_L 美國英語表格" IDS_UZBEK_CYRILLIC_LAYOUT "烏茲別克西里爾文" IDS_VIETNAMESE_LAYOUT "越南文" diff --git a/dll/cpl/powercfg/lang/zh-TW.rc b/dll/cpl/powercfg/lang/zh-TW.rc index 53a1a4c1884..ddf83e17c5e 100644 --- a/dll/cpl/powercfg/lang/zh-TW.rc +++ b/dll/cpl/powercfg/lang/zh-TW.rc @@ -1,4 +1,5 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + Translation improved by Chan Chilung 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -11,7 +12,7 @@ BEGIN LTEXT "請選定對於您使用電腦方式最適合的電源使用方案。請注意,更改下面的設置將修改選定的方案。", -1, 37, 6, 209, 36 GROUPBOX "電源使用方案(&O)", -1, 6, 43, 240, 50 COMBOBOX IDC_ENERGYLIST, 14, 54, 224, 92, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "另存爲(&S)...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED + PUSHBUTTON "另存為(&S)...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED PUSHBUTTON "刪除(&D)", IDC_DELETE_BTN, 183, 72, 55, 14, WS_DISABLED GROUPBOX "未知", IDC_GRPDETAIL, 6, 95, 240, 136 LTEXT "當電腦:", IDC_SAT, 12, 109, 60, 12 @@ -19,7 +20,7 @@ BEGIN ICON IDI_AC, IDC_IAC, 97, 108, 21, 20 LTEXT "使用電池", IDC_SDC, 195, 110, 45, 15 ICON IDI_DC, IDC_IDC, 170, 108, 21, 20 - LTEXT "關閉監視器(&M):", IDC_MONITOR, 13, 148, 84, 10 + LTEXT "關閉顯示器(&M):", IDC_MONITOR, 13, 148, 84, 10 COMBOBOX IDC_MONITORACLIST, 100, 145, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_MONITORDCLIST, 173, 145, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "關閉硬碟(&I):", IDC_DISK, 13, 171, 84, 10 @@ -42,10 +43,10 @@ BEGIN LTEXT "請選定對於您使用電腦方式最適合的電源使用方案。請注意,更改下面的設置將修改選定的方案。", -1, 37, 6, 209, 36 GROUPBOX "電源使用方案(&O)", -1, 6, 43, 240, 50 COMBOBOX IDC_ENERGYLIST, 14, 54, 224, 92, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL - PUSHBUTTON "另存爲(&S)...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED + PUSHBUTTON "另存為(&S)...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED PUSHBUTTON "刪除(&D)", IDC_DELETE_BTN, 183, 72, 55, 14, WS_DISABLED GROUPBOX "未知", IDC_GRPDETAIL, 6, 95, 240, 136 - LTEXT "關閉監視器(&M):", IDC_MONITOR, 13, 148, 84, 10 + LTEXT "關閉顯示器(&M):", IDC_MONITOR, 13, 148, 84, 10 COMBOBOX IDC_MONITORACLIST, 100, 145, 140, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "關閉硬碟(&I):", IDC_DISK, 13, 171, 84, 10 COMBOBOX IDC_DISKACLIST, 100, 167, 140, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -127,13 +128,13 @@ END IDD_SAVEPOWERSCHEME DIALOGEX 0, 0, 190, 62 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Save Scheme" -FONT 8, "MS Shell Dlg" +CAPTION "儲存方案" +FONT 9, "新細明體" BEGIN - LTEXT "Save this power scheme as:", -1, 7, 7, 104, 8 + LTEXT "儲存這個電源使用方案為:", -1, 7, 7, 104, 8 EDITTEXT IDC_SCHEMENAME, 7, 18, 176, 14, ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP - DEFPUSHBUTTON "OK", IDOK, 79, 40, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 133, 40, 50, 14 + DEFPUSHBUTTON "確定", IDOK, 79, 40, 50, 14 + PUSHBUTTON "取消", IDCANCEL, 133, 40, 50, 14 END STRINGTABLE @@ -173,5 +174,5 @@ BEGIN IDS_TIMEOUT16 "從不" IDS_DEL_SCHEME "您確定要刪除電源使用方案嗎: ""%s""?" IDS_DEL_SCHEME_TITLE "刪除方案" - IDS_DEL_SCHEME_ERROR "Unable to delete power scheme" + IDS_DEL_SCHEME_ERROR "無法刪除電源使用方案" END diff --git a/dll/win32/shimgvw/lang/zh-TW.rc b/dll/win32/shimgvw/lang/zh-TW.rc index f03f47fa166..4a987d41cde 100644 --- a/dll/win32/shimgvw/lang/zh-TW.rc +++ b/dll/win32/shimgvw/lang/zh-TW.rc @@ -1,4 +1,5 @@ -/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) + Translation improved by Chan Chilung 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -11,27 +12,27 @@ BEGIN /* Tooltips */ IDS_TOOLTIP_NEXT_PIC "下一張圖片" IDS_TOOLTIP_PREV_PIC "上一張圖片" - IDS_TOOLTIP_BEST_FIT "Best fit to window (Ctrl+B)" - IDS_TOOLTIP_REAL_SIZE "Actual size (Ctrl+A)" - IDS_TOOLTIP_SLIDE_SHOW "Start slideshow (F11)" + IDS_TOOLTIP_BEST_FIT "最符合視窗 (Ctrl+B)" + IDS_TOOLTIP_REAL_SIZE "實際大小 (Ctrl+A)" + IDS_TOOLTIP_SLIDE_SHOW "開始幻燈片放映 (F11)" IDS_TOOLTIP_ZOOM_IN "放大 (+)" IDS_TOOLTIP_ZOOM_OUT "縮小 (-)" IDS_TOOLTIP_ROT_CLOCKW "順時針旋轉 (Ctrl+K)" IDS_TOOLTIP_ROT_COUNCW "逆時針旋轉 (Ctrl+L)" - IDS_TOOLTIP_DELETE "Delete (DEL)" + IDS_TOOLTIP_DELETE "刪除 (DEL)" IDS_TOOLTIP_PRINT "列印 (Ctrl+P)" IDS_TOOLTIP_SAVEAS "另存新檔...(Ctrl+S)" - IDS_TOOLTIP_MODIFY "Modify (Ctrl+E)" - IDS_TOOLTIP_HELP_TOC "Help topics (F1)" + IDS_TOOLTIP_MODIFY "修改 (Ctrl+E)" + IDS_TOOLTIP_HELP_TOC "說明主題 (F1)" END STRINGTABLE BEGIN - IDS_EMF_FILE "EMF 影像" - IDS_GIF_FILE "GIF 影像" - IDS_JPG_FILE "JPEG 影像" - IDS_BMP_FILE "Bitmap 影像" - IDS_PNG_FILE "PNG 影像" - IDS_TIF_FILE "TIF 影像" - IDS_WMF_FILE "WMF 影像" + IDS_EMF_FILE "EMF 圖像" + IDS_GIF_FILE "GIF 圖像" + IDS_JPG_FILE "JPEG 圖像" + IDS_BMP_FILE "Bitmap 圖像" + IDS_PNG_FILE "PNG 圖像" + IDS_TIF_FILE "TIF 圖像" + IDS_WMF_FILE "WMF 圖像" END diff --git a/media/inf/NET_NIC.inf b/media/inf/NET_NIC.inf index 413f698f349..e107627418f 100644 --- a/media/inf/NET_NIC.inf +++ b/media/inf/NET_NIC.inf @@ -28,6 +28,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE103 ReactOS = "ReactOS Team" DisplayClassName = "Network Adapters" +[Strings.0404] +DisplayClassName = "網路配接器" + [Strings.0405] DisplayClassName = "Síťové adaptéry" diff --git a/media/inf/audio.inf b/media/inf/audio.inf index 0d312b2078a..58213218b54 100644 --- a/media/inf/audio.inf +++ b/media/inf/audio.inf @@ -69,6 +69,9 @@ ServiceBinary = %12%\sysaudio.sys ReactOS = "ReactOS Team" AUDIOClassName = "Audio & Videocontroller" +[Strings.0404] +AUDIOClassName = "音頻及視頻控制器" + [Strings.0405] AUDIOClassName = "Řadiče zvuku a obrazu" diff --git a/media/inf/battery.inf b/media/inf/battery.inf index 6142b20bebc..557804e576a 100644 --- a/media/inf/battery.inf +++ b/media/inf/battery.inf @@ -77,6 +77,13 @@ GenericMfg = "(Generic batteries)" ACPI\PNP0C0A.DeviceDesc = "ACPI-compliant control method battery" ACPI\ACPI0003.DeviceDesc = "AC adapter" +[Strings.0404] +BatteryClassName = "電池" + +GenericMfg = "(標準電池)" +ACPI\PNP0C0A.DeviceDesc = "ACPI 相容控制模式電池" +ACPI\ACPI0003.DeviceDesc = "交流配接器" + [Strings.0405] BatteryClassName = "Baterie" GenericMfg = "(Generické baterie)" @@ -110,6 +117,7 @@ BatteryClassName = "סוללות" GenericMfg = "(סוללות כלליות)" ACPI\PNP0C0A.DeviceDesc = "ACPI-compliant control method battery" ACPI\ACPI0003.DeviceDesc = "AC adapter" + [Strings.0415] ReactOS = "Zespół ReactOS" BatteryClassName = "Baterie" diff --git a/media/inf/bth.inf b/media/inf/bth.inf index 51d11ff3f41..6065d2d53bc 100644 --- a/media/inf/bth.inf +++ b/media/inf/bth.inf @@ -62,6 +62,10 @@ ReactOS="ReactOS Team" BTUSB.DeviceDesc="Generic USB Bluetooth Radio" BluetoothClassName="Bluetooth Radios" +[Strings.0404] +BTUSB.DeviceDesc="標準 USB 藍牙無線電" +BluetoothClassName="藍牙無線電" + [Strings.0405] BTUSB.DeviceDesc="Obecný USB Bluetooth vysílač" BluetoothClassName="Bluetooth vysílače" diff --git a/media/inf/c_image.inf b/media/inf/c_image.inf index 16a5749e755..61f92c98c14 100644 --- a/media/inf/c_image.inf +++ b/media/inf/c_image.inf @@ -27,6 +27,9 @@ HKR,,Installer32, 0,"sti_ci.dll,ClassInstall" ReactOS = "ReactOS Team" ImageClassName = "Image" +[Strings.0404] +ImageClassName = "圖像" + [Strings.0a] ReactOS = "Equipo de ReactOS" ImageClassName = "Imagen" diff --git a/media/inf/display.inf b/media/inf/display.inf index b43ae6c4062..219f3f8242a 100644 --- a/media/inf/display.inf +++ b/media/inf/display.inf @@ -82,6 +82,12 @@ DisplayClassName = "Display Adapters" StdMfg = "(Standard display adapters)" VGA.DeviceDesc = "VGA-compatible graphics card" +[Strings.0404] +DisplayClassName = "顯示配接器" + +StdMfg = "(標準顯示配接器)" +VGA.DeviceDesc = "VGA 相容顯示卡" + [Strings.0405] DisplayClassName = "Grafické adaptéry" diff --git a/media/inf/hal.inf b/media/inf/hal.inf index 78d7587fc1a..746a0d55ebc 100644 --- a/media/inf/hal.inf +++ b/media/inf/hal.inf @@ -60,6 +60,17 @@ xbox.DeviceDesc = "Original Xbox (x86 based)" NecMfg = "NEC" pc98_up.DeviceDesc = "Uniprocessor NEC PC-98" +[Strings.0404] +ComputerClassName = "電腦" + +GenericMfg = "(標準電腦)" +acpipic_up.DeviceDesc = "ACPI 單處理器 PC" +e_isa_up.DeviceDesc = "標準單處理器 PC" + +xbox.DeviceDesc = "原版 Xbox (基於 x86)" + +pc98_up.DeviceDesc = "單處理器 NEC PC-98" + [Strings.0405] ComputerClassName = "Počítač" GenericMfg = "(Obecné počítače)" diff --git a/media/inf/hdc.inf b/media/inf/hdc.inf index e85b0377eb1..b9f39f4954c 100644 --- a/media/inf/hdc.inf +++ b/media/inf/hdc.inf @@ -693,6 +693,318 @@ PCI\CC_0104.DeviceDesc = "Generic RAID IDE Controller" PCI\CC_0105.DeviceDesc = "Generic ATA Controller" PCI\CC_0106.DeviceDesc = "Generic Serial ATA Controller" +[Strings.0404] +GenericMfg = "(標準硬碟控制器)" +PCI\VEN_1191&DEV_0005.DeviceDesc="Acard ATP850 ATA-33 控制器" +PCI\VEN_1191&DEV_0006.DeviceDesc="Acard ATP860A ATA-66 控制器" +PCI\VEN_1191&DEV_0007.DeviceDesc="Acard ATP860R ATA-66 控制器" +PCI\VEN_1191&DEV_0008.DeviceDesc="Acard ATP865A ATA-133 控制器" +PCI\VEN_1191&DEV_0009.DeviceDesc="Acard ATP865R ATA-133 控制器" +PCI\VEN_10b9&DEV_5289.DeviceDesc="ALI M5289 SATA 控制器" +PCI\VEN_10b9&DEV_5288.DeviceDesc="ALI M5288 SATA2 控制器" +PCI\VEN_10b9&DEV_5287.DeviceDesc="ALI M5287 SATA 控制器" +PCI\VEN_10b9&DEV_5281.DeviceDesc="ALI M5281 SATA 控制器" +PCI\VEN_10b9&DEV_5229&REV_c5.DeviceDesc="ALI M5229 UDMA6 ATA-133 控制器" +PCI\VEN_10b9&DEV_5229&REV_c4.DeviceDesc="ALI M5229 UDMA5 ATA-100 控制器" +PCI\VEN_10b9&DEV_5229&REV_c2.DeviceDesc="ALI M5229 UDMA4 ATA-66 控制器" +PCI\VEN_10b9&DEV_5229&REV_20.DeviceDesc="ALI M5229 UDMA2 ATA-33 控制器" +PCI\VEN_10b9&DEV_5229.DeviceDesc="ALI M5229 WDMA2 IDE DMA 控制器" +PCI\VEN_1022&DEV_7401.DeviceDesc="AMD 755 ATA-33 控制器" +PCI\VEN_1022&DEV_7409.DeviceDesc="AMD 756 ATA-66 控制器" +PCI\VEN_1022&DEV_7411.DeviceDesc="AMD 766 ATA-100 控制器" +PCI\VEN_1022&DEV_7441.DeviceDesc="AMD 768 ATA-100 控制器" +PCI\VEN_1022&DEV_7469.DeviceDesc="AMD 8111 ATA-133 控制器" +PCI\VEN_1022&DEV_209a.DeviceDesc="AMD CS5536 ATA-100 控制器" +PCI\VEN_1002&DEV_4349.DeviceDesc="ATI IXP200 ATA-100 控制器" +PCI\VEN_1002&DEV_4369.DeviceDesc="ATI IXP300 ATA-133 控制器" +PCI\VEN_1002&DEV_4376.DeviceDesc="ATI IXP400 ATA-133 控制器" +PCI\VEN_1002&DEV_436e.DeviceDesc="ATI IXP300 SATA 控制器" +PCI\VEN_1002&DEV_4379.DeviceDesc="ATI IXP400 SATA 控制器" +PCI\VEN_1002&DEV_437a.DeviceDesc="ATI IXP400 SATA2 控制器" +PCI\VEN_1002&DEV_438c.DeviceDesc="ATI IXP600 ATA-133 控制器" +PCI\VEN_1002&DEV_4380.DeviceDesc="ATI IXP600 SATA 控制器" +PCI\VEN_1002&DEV_439c.DeviceDesc="ATI IXP700 ATA-133 控制器" +PCI\VEN_1002&DEV_4390.DeviceDesc="ATI IXP700 SATA 控制器" +PCI\VEN_1002&DEV_4391.DeviceDesc="ATI IXP700 SATA 控制器" +PCI\VEN_1103&DEV_0004&REV_05.DeviceDesc="HighPoint HPT372 ATA-133 控制器" +PCI\VEN_1103&DEV_0004&REV_03.DeviceDesc="HighPoint HPT370 ATA-100 控制器" +PCI\VEN_1103&DEV_0004&REV_02.DeviceDesc="HighPoint HPT368 ATA-66 控制器" +PCI\VEN_1103&DEV_0004.DeviceDesc="HighPoint HPT366 ATA-66 控制器" +PCI\VEN_1103&DEV_0005&REV_01.DeviceDesc="HighPoint HPT372 ATA-133 控制器" +PCI\VEN_1103&DEV_0005.DeviceDesc="HighPoint HPT372 ATA-66 控制器" +PCI\VEN_1103&DEV_0006&REV_01.DeviceDesc="HighPoint HPT302 ATA-133 控制器" +PCI\VEN_1103&DEV_0007&REV_01.DeviceDesc="HighPoint HPT371 ATA-133 控制器" +PCI\VEN_1103&DEV_0008&REV_07.DeviceDesc="HighPoint HPT374 ATA-133 控制器" +PCI\VEN_8086&DEV_1230.DeviceDesc="Intel PIIX IDE DMA 控制器" +PCI\VEN_8086&DEV_7010.DeviceDesc="Intel PIIX3 IDE DMA 控制器" +PCI\VEN_8086&DEV_7111.DeviceDesc="Intel PIIX4 ATA-44 控制器" +PCI\VEN_8086&DEV_7199.DeviceDesc="Intel PIIX4 ATA-33 控制器" +PCI\VEN_8086&DEV_84ca.DeviceDesc="Intel PIIX4 ATA-33 控制器" +PCI\VEN_8086&DEV_7601.DeviceDesc="Intel ICH0 ATA-33 控制器" +PCI\VEN_8086&DEV_2421.DeviceDesc="Intel ICH ATA-66 控制器" +PCI\VEN_8086&DEV_2411.DeviceDesc="Intel ICH ATA-66 控制器" +PCI\VEN_8086&DEV_244a.DeviceDesc="Intel ICH2 ATA-100 控制器" +PCI\VEN_8086&DEV_244b.DeviceDesc="Intel ICH2 ATA-100 控制器" +PCI\VEN_8086&DEV_248a.DeviceDesc="Intel ICH3 ATA-100 控制器" +PCI\VEN_8086&DEV_248b.DeviceDesc="Intel ICH3 ATA-100 控制器" +PCI\VEN_8086&DEV_24cb.DeviceDesc="Intel ICH4 ATA-100 控制器" +PCI\VEN_8086&DEV_24ca.DeviceDesc="Intel ICH4 ATA-100 控制器" +PCI\VEN_8086&DEV_24db.DeviceDesc="Intel ICH5 EB ATA-100 控制器" +PCI\VEN_8086&DEV_24d1.DeviceDesc="Intel ICH5 EB1 SATA 控制器" +PCI\VEN_8086&DEV_24df.DeviceDesc="Intel ICH5 EB2 SATA 控制器" +PCI\VEN_8086&DEV_25a2.DeviceDesc="Intel 6300ESB ATA-100 控制器" +PCI\VEN_8086&DEV_25a3.DeviceDesc="Intel 6300ESB1 SATA 控制器" +PCI\VEN_8086&DEV_25b0.DeviceDesc="Intel 6300ESB2 SATA 控制器" +PCI\VEN_8086&DEV_266f.DeviceDesc="Intel ICH6 ATA-100 控制器" +PCI\VEN_8086&DEV_2651.DeviceDesc="Intel ICH6 SATA 控制器" +PCI\VEN_8086&DEV_2652.DeviceDesc="Intel ICH6 SATA 控制器" +PCI\VEN_8086&DEV_2653.DeviceDesc="Intel ICH6M SATA 控制器" +PCI\VEN_8086&DEV_27df.DeviceDesc="Intel ICH7 ATA-100 控制器" +PCI\VEN_8086&DEV_27c0.DeviceDesc="Intel ICH7 SATA2 控制器" +PCI\VEN_8086&DEV_27c1.DeviceDesc="Intel ICH7 SATA2 控制器" +PCI\VEN_8086&DEV_27c3.DeviceDesc="Intel ICH7 SATA2 控制器" +PCI\VEN_8086&DEV_27c4.DeviceDesc="Intel ICH7M SATA2 控制器" +PCI\VEN_8086&DEV_27c5.DeviceDesc="Intel ICH7M SATA2 控制器" +PCI\VEN_8086&DEV_27c6.DeviceDesc="Intel ICH7M SATA2 控制器" +PCI\VEN_8086&DEV_269e.DeviceDesc="Intel 63XXESB2 ATA-100 控制器" +PCI\VEN_8086&DEV_2680.DeviceDesc="Intel 63XXESB2 SATA2 控制器" +PCI\VEN_8086&DEV_2681.DeviceDesc="Intel 63XXESB2 SATA2 控制器" +PCI\VEN_8086&DEV_2682.DeviceDesc="Intel 63XXESB2 SATA2 控制器" +PCI\VEN_8086&DEV_2683.DeviceDesc="Intel 63XXESB2 SATA2 控制器" +PCI\VEN_8086&DEV_2820.DeviceDesc="Intel ICH8 SATA2 控制器" +PCI\VEN_8086&DEV_2821.DeviceDesc="Intel ICH8 SATA2 控制器" +PCI\VEN_8086&DEV_2822.DeviceDesc="Intel ICH8 SATA2 控制器" +PCI\VEN_8086&DEV_2824.DeviceDesc="Intel ICH8 SATA2 控制器" +PCI\VEN_8086&DEV_2825.DeviceDesc="Intel ICH8 SATA2 控制器" +PCI\VEN_8086&DEV_2828.DeviceDesc="Intel ICH8M SATA2 控制器" +PCI\VEN_8086&DEV_2829.DeviceDesc="Intel ICH8M SATA2 控制器" +PCI\VEN_8086&DEV_282a.DeviceDesc="Intel ICH8M SATA2 控制器" +PCI\VEN_8086&DEV_2850.DeviceDesc="Intel ICH8M SATA2 控制器" +PCI\VEN_8086&DEV_2920.DeviceDesc="Intel ICH9 SATA2 控制器" +PCI\VEN_8086&DEV_2921.DeviceDesc="Intel ICH9 SATA2 控制器" +PCI\VEN_8086&DEV_2926.DeviceDesc="Intel ICH9 SATA2 控制器" +PCI\VEN_8086&DEV_2923.DeviceDesc="Intel ICH9 SATA2 控制器" +PCI\VEN_8086&DEV_2922.DeviceDesc="Intel ICH9 SATA2 控制器" + +PCI\VEN_8086&DEV_2928.DeviceDesc="Intel ICH9/M-E SATA2 控制器" +PCI\VEN_8086&DEV_2929.DeviceDesc="Intel ICH9/M-E SATA2 控制器" +PCI\VEN_8086&DEV_292d.DeviceDesc="Intel ICH9/M-E SATA2 控制器" +PCI\VEN_8086&DEV_292e.DeviceDesc="Intel ICH9/M-E SATA2 控制器" + +PCI\VEN_8086&DEV_3a00.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a02.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a03.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a06.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a20.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a22.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a23.DeviceDesc="Intel ICH10 SATA2 控制器" +PCI\VEN_8086&DEV_3a26.DeviceDesc="Intel ICH10 SATA2 控制器" + +PCI\VEN_8086&DEV_3b20.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b21.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b22.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b23.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b26.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b28.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b29.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b2d.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b2e.DeviceDesc="Intel PCH SATA2 控制器" +PCI\VEN_8086&DEV_3b2f.DeviceDesc="Intel PCH SATA2 控制器" + +; PCI\VEN_8086&DEV_3200.DeviceDesc="Intel 31244 SATA 控制器" + +PCI\VEN_11ab&DEV_5040.DeviceDesc="Marvell 88SX5040 ATA 控制器" +PCI\VEN_11ab&DEV_5041.DeviceDesc="Marvell 88SX5041 ATA 控制器" +PCI\VEN_11ab&DEV_5080.DeviceDesc="Marvell 88SX5080 ATA 控制器" +PCI\VEN_11ab&DEV_5081.DeviceDesc="Marvell 88SX5081 ATA 控制器" +PCI\VEN_11ab&DEV_6041.DeviceDesc="Marvell 88SX6041 ATA 控制器" +PCI\VEN_11ab&DEV_6081.DeviceDesc="Marvell 88SX6081 ATA 控制器" + +PCI\VEN_11ab&DEV_6101.DeviceDesc="Marvell 88SX6101 ATA-133 控制器" +PCI\VEN_11ab&DEV_6145.DeviceDesc="Marvell 88SX6145 ATA-133 控制器" +PCI\VEN_10de&DEV_01bc.DeviceDesc="nVidia nForce ATA-100 控制器" +PCI\VEN_10de&DEV_0065.DeviceDesc="nVidia nForce2 ATA-133 控制器" +PCI\VEN_10de&DEV_0085.DeviceDesc="nVidia nForce2 Pro ATA-133 控制器" +PCI\VEN_10de&DEV_008e.DeviceDesc="nVidia nForce2 Pro S1 SATA 控制器" +PCI\VEN_10de&DEV_00d5.DeviceDesc="nVidia nForce3 ATA-133 控制器" +PCI\VEN_10de&DEV_00e5.DeviceDesc="nVidia nForce3 Pro ATA-133 控制器" +PCI\VEN_10de&DEV_00e3.DeviceDesc="nVidia nForce3 Pro S1 SATA 控制器" +PCI\VEN_10de&DEV_00ee.DeviceDesc="nVidia nForce3 Pro S2 SATA 控制器" +PCI\VEN_10de&DEV_0035.DeviceDesc="nVidia nForce MCP ATA-133 控制器" +PCI\VEN_10de&DEV_0036.DeviceDesc="nVidia nForce MCP S1 SATA 控制器" +PCI\VEN_10de&DEV_003e.DeviceDesc="nVidia nForce MCP S2 SATA 控制器" +PCI\VEN_10de&DEV_0053.DeviceDesc="nVidia nForce CK804 ATA-133 控制器" +PCI\VEN_10de&DEV_0054.DeviceDesc="nVidia nForce CK804 S1 SATA2 控制器" +PCI\VEN_10de&DEV_0055.DeviceDesc="nVidia nForce CK804 S2 SATA2 控制器" +PCI\VEN_10de&DEV_0265.DeviceDesc="nVidia nForce MCP51 ATA-133 控制器" +PCI\VEN_10de&DEV_0266.DeviceDesc="nVidia nForce MCP51 S1 SATA2 控制器" +PCI\VEN_10de&DEV_0267.DeviceDesc="nVidia nForce MCP51 S2 SATA2 控制器" +PCI\VEN_10de&DEV_036e.DeviceDesc="nVidia nForce MCP55 ATA-133 控制器" +PCI\VEN_10de&DEV_037e.DeviceDesc="nVidia nForce MCP55 S1 SATA2 控制器" +PCI\VEN_10de&DEV_037f.DeviceDesc="nVidia nForce MCP55 S2 SATA2 控制器" +PCI\VEN_10de&DEV_03ec.DeviceDesc="nVidia nForce MCP61 ATA-133 控制器" +PCI\VEN_10de&DEV_03e7.DeviceDesc="nVidia nForce MCP61 S1 SATA2 控制器" +PCI\VEN_10de&DEV_03f6.DeviceDesc="nVidia nForce MCP61 S2 SATA2 控制器" +PCI\VEN_10de&DEV_03f7.DeviceDesc="nVidia nForce MCP61 S3 SATA2 控制器" +PCI\VEN_10de&DEV_0448.DeviceDesc="nVidia nForce MCP65 ATA-133 控制器" +PCI\VEN_10de&DEV_0560.DeviceDesc="nVidia nForce MCP67 ATA-133 控制器" +PCI\VEN_10de&DEV_056c.DeviceDesc="nVidia nForce MCP73 ATA-133 控制器" +PCI\VEN_10de&DEV_0759.DeviceDesc="nVidia nForce MCP77 ATA-133 控制器" +PCI\VEN_100b&DEV_0502.DeviceDesc="National Geode SC1100 ATA-33 控制器" +PCI\VEN_105a&DEV_4d33.DeviceDesc="Promise PDC20246 ATA-33 控制器" +PCI\VEN_105a&DEV_4d38.DeviceDesc="Promise PDC20262 ATA-66 控制器" +PCI\VEN_105a&DEV_0d38.DeviceDesc="Promise PDC20263 ATA-66 控制器" +PCI\VEN_105a&DEV_0d30.DeviceDesc="Promise PDC20265 ATA-100 控制器" +PCI\VEN_105a&DEV_4d30.DeviceDesc="Promise PDC20267 ATA-100 控制器" +PCI\VEN_105a&DEV_4d68.DeviceDesc="Promise PDC20268 ATA-100 控制器" +PCI\VEN_105a&DEV_4d69.DeviceDesc="Promise PDC20269 ATA-133 控制器" +PCI\VEN_105a&DEV_6268.DeviceDesc="Promise PDC20270 ATA-100 控制器" +PCI\VEN_105a&DEV_6269.DeviceDesc="Promise PDC20271 ATA-133 控制器" +PCI\VEN_105a&DEV_1275.DeviceDesc="Promise PDC20275 ATA-133 控制器" +PCI\VEN_105a&DEV_5275.DeviceDesc="Promise PDC20276 ATA-133 控制器" +PCI\VEN_105a&DEV_7275.DeviceDesc="Promise PDC20277 ATA-133 控制器" +PCI\VEN_105a&DEV_3318.DeviceDesc="Promise PDC20318 SATA 控制器" +PCI\VEN_105a&DEV_3319.DeviceDesc="Promise PDC20319 SATA 控制器" +PCI\VEN_105a&DEV_3371.DeviceDesc="Promise PDC20371 SATA 控制器" +PCI\VEN_105a&DEV_3375.DeviceDesc="Promise PDC20375 SATA 控制器" +PCI\VEN_105a&DEV_3376.DeviceDesc="Promise PDC20376 SATA 控制器" +PCI\VEN_105a&DEV_3377.DeviceDesc="Promise PDC20377 SATA 控制器" +PCI\VEN_105a&DEV_3373.DeviceDesc="Promise PDC20378 SATA 控制器" +PCI\VEN_105a&DEV_3372.DeviceDesc="Promise PDC20379 SATA 控制器" +PCI\VEN_105a&DEV_6617.DeviceDesc="Promise PDC20617 ATA-133 控制器" +PCI\VEN_105a&DEV_6626.DeviceDesc="Promise PDC20618 ATA-133 控制器" +PCI\VEN_105a&DEV_6629.DeviceDesc="Promise PDC20619 ATA-133 控制器" +PCI\VEN_105a&DEV_6620.DeviceDesc="Promise PDC20620 ATA-133 控制器" + +PCI\VEN_105a&DEV_6621.DeviceDesc="Promise PDC20621 ATA-133 控制器" +PCI\VEN_105a&DEV_6622.DeviceDesc="Promise PDC20622 ATA-133 控制器" + +PCI\VEN_1166&DEV_0211.DeviceDesc="ServerWorks ROSB4 ATA-33 控制器" +PCI\VEN_1166&DEV_0212&REV_92.DeviceDesc="ServerWorks CSB5 ATA-100 控制器" +PCI\VEN_1166&DEV_0212.DeviceDesc="ServerWorks CSB5 ATA-66 控制器" +PCI\VEN_1166&DEV_0213.DeviceDesc="ServerWorks CSB6 ATA-100 控制器" +PCI\VEN_1166&DEV_0217.DeviceDesc="ServerWorks CSB6 ATA-66 控制器" +PCI\VEN_1166&DEV_0214.DeviceDesc="ServerWorks HT1000 ATA-100 控制器" +PCI\VEN_1166&DEV_024b.DeviceDesc="ServerWorks HT1000 SATA 控制器" +PCI\VEN_1166&DEV_024a.DeviceDesc="ServerWorks HT1000 SATA 控制器" +PCI\VEN_1166&DEV_0240.DeviceDesc="ServerWorks K2 SATA 控制器" +PCI\VEN_1166&DEV_0241.DeviceDesc="ServerWorks Frodo4 SATA 控制器" +PCI\VEN_1166&DEV_0242.DeviceDesc="ServerWorks Frodo8 SATA 控制器" +PCI\VEN_1095&DEV_3114.DeviceDesc="SiI 3114 SATA 控制器" +PCI\VEN_1095&DEV_3512&REV_02.DeviceDesc="SiI 3512 SATA 控制器" +PCI\VEN_1095&DEV_3112&REV_02.DeviceDesc="SiI 3112 SATA 控制器" +PCI\VEN_1095&DEV_0240&REV_02.DeviceDesc="SiI 3112 SATA 控制器" +PCI\VEN_1095&DEV_3512.DeviceDesc="SiI 3512 SATA 控制器" +PCI\VEN_1095&DEV_3112.DeviceDesc="SiI 3112 SATA 控制器" +PCI\VEN_1095&DEV_0240.DeviceDesc="SiI 3112 SATA 控制器" +PCI\VEN_1095&DEV_0680.DeviceDesc="SiI 0680 ATA-133 控制器" +PCI\VEN_1095&DEV_0649.DeviceDesc="CMD 649 ATA-100 控制器" +PCI\VEN_1095&DEV_0648.DeviceDesc="CMD 648 ATA-66 控制器" +PCI\VEN_1095&DEV_0646&REV_07.DeviceDesc="CMD 646U2 ATA-33 控制器" +PCI\VEN_1095&DEV_0646.DeviceDesc="CMD 646 IDE DMA 控制器" +PCI\VEN_1095&DEV_0640.DeviceDesc="CMD 640 IDE 控制器" + +; PCI\VEN_1039&DEV_0963.DeviceDesc="SiS 963 IDE 控制器" +; PCI\VEN_1039&DEV_0962.DeviceDesc="SiS 640 IDE 控制器" + +; PCI\VEN_1039&DEV_0755.DeviceDesc="SiS 755 IDE 控制器" +; PCI\VEN_1039&DEV_0752.DeviceDesc="SiS 752 IDE 控制器" +; PCI\VEN_1039&DEV_0751.DeviceDesc="SiS 751 IDE 控制器" +; PCI\VEN_1039&DEV_0750.DeviceDesc="SiS 750 IDE 控制器" +; PCI\VEN_1039&DEV_0748.DeviceDesc="SiS 748 IDE 控制器" +; PCI\VEN_1039&DEV_0746.DeviceDesc="SiS 746 IDE 控制器" +; PCI\VEN_1039&DEV_0745.DeviceDesc="SiS 745 IDE 控制器" +; PCI\VEN_1039&DEV_0740.DeviceDesc="SiS 740 IDE 控制器" +; PCI\VEN_1039&DEV_0735.DeviceDesc="SiS 735 IDE 控制器" +; PCI\VEN_1039&DEV_0733.DeviceDesc="SiS 733 IDE 控制器" +; PCI\VEN_1039&DEV_0730.DeviceDesc="SiS 730 IDE 控制器" + +; PCI\VEN_1039&DEV_0658.DeviceDesc="SiS 658 IDE 控制器" +; PCI\VEN_1039&DEV_0655.DeviceDesc="SiS 655 IDE 控制器" +; PCI\VEN_1039&DEV_0652.DeviceDesc="SiS 652 IDE 控制器" +; PCI\VEN_1039&DEV_0651.DeviceDesc="SiS 651 IDE 控制器" +; PCI\VEN_1039&DEV_0650.DeviceDesc="SiS 650 IDE 控制器" +; PCI\VEN_1039&DEV_0648.DeviceDesc="SiS 648 IDE 控制器" +; PCI\VEN_1039&DEV_0646.DeviceDesc="SiS 646 IDE 控制器" +; PCI\VEN_1039&DEV_0645.DeviceDesc="SiS 645 IDE 控制器" +; PCI\VEN_1039&DEV_0640.DeviceDesc="SiS 640 IDE 控制器" +; PCI\VEN_1039&DEV_0635.DeviceDesc="SiS 635 IDE 控制器" +; PCI\VEN_1039&DEV_0633.DeviceDesc="SiS 633 IDE 控制器" +; PCI\VEN_1039&DEV_0630.DeviceDesc="SiS 630 IDE 控制器" +; PCI\VEN_1039&DEV_0620.DeviceDesc="SiS 620 IDE 控制器" + +; PCI\VEN_1039&DEV_0550.DeviceDesc="SiS 550 IDE 控制器" +; PCI\VEN_1039&DEV_0540.DeviceDesc="SiS 540 IDE 控制器" +; PCI\VEN_1039&DEV_0530.DeviceDesc="SiS 530 IDE 控制器" + +PCI\VEN_1039&DEV_5513&REV_c2.DeviceDesc="SiS ATA-xxx 控制器" +PCI\VEN_1039&DEV_5513.DeviceDesc="SiS ATA-xxx 控制器" +PCI\VEN_1039&DEV_0601.DeviceDesc="SiS ATA-xxx 控制器" + +; PCI\VEN_1106&DEV_0586&REV_41.DeviceDesc="VIA 82C586B 控制器" +; PCI\VEN_1106&DEV_0586&REV_40.DeviceDesc="VIA 82C586B 控制器" +; PCI\VEN_1106&DEV_0586&REV_02.DeviceDesc="VIA 82C586B 控制器" +; PCI\VEN_1106&DEV_0586.DeviceDesc="VIA 82C586 控制器" +; PCI\VEN_1106&DEV_0596&REV_12.DeviceDesc="VIA 82C596B 控制器" +; PCI\VEN_1106&DEV_0596.DeviceDesc="VIA 82C596 控制器" +; PCI\VEN_1106&DEV_0686&REV_40.DeviceDesc="VIA 82C686B 控制器" +; PCI\VEN_1106&DEV_0686&REV_10.DeviceDesc="VIA 82C686A 控制器" +; PCI\VEN_1106&DEV_0686.DeviceDesc="VIA 82C686 控制器" +; PCI\VEN_1106&DEV_8231.DeviceDesc="VIA 8231 控制器" +; PCI\VEN_1106&DEV_3074.DeviceDesc="VIA 8233 控制器" +; PCI\VEN_1106&DEV_3109.DeviceDesc="VIA 8233C 控制器" +; PCI\VEN_1106&DEV_3147.DeviceDesc="VIA 8233A 控制器" +; PCI\VEN_1106&DEV_3177.DeviceDesc="VIA 8235 控制器" + +PCI\VEN_1106&DEV_0571.DeviceDesc="VIA ATA-xxx 控制器" +PCI\VEN_1106&DEV_3164.DeviceDesc="VIA 6410 控制器" +PCI\VEN_1106&DEV_3149.DeviceDesc="VIA 6420 控制器" +PCI\VEN_1106&DEV_3249.DeviceDesc="VIA 6421 控制器" +PCI\VEN_1106&DEV_0591.DeviceDesc="VIA 8237A 控制器" +PCI\VEN_1106&DEV_5337.DeviceDesc="VIA 8237S 控制器" + +PCI\VEN_1106&DEV_3349.DeviceDesc="VIA 8251 控制器" + +PCI\VEN_1080&DEV_c693.DeviceDesc="Cypress 82C693 IDE DMA 控制器" + +; PCI\VEN_105a&DEV_4d68.DeviceDesc="Promise TX2 ATA-100 控制器" +; PCI\VEN_105a&DEV_6268.DeviceDesc="Promise TX2 ATA-100 控制器" + +; PCI\VEN_105a&DEV_4d69.DeviceDesc="Promise TX2 ATA-133 控制器" +; PCI\VEN_105a&DEV_5275.DeviceDesc="Promise TX2 ATA-133 控制器" +; PCI\VEN_105a&DEV_6269.DeviceDesc="Promise TX2 ATA-133 控制器" +; PCI\VEN_105a&DEV_7275.DeviceDesc="Promise TX2 ATA-133 控制器" + +; PCI\VEN_105a&DEV_4d33.DeviceDesc="Promise Promise Ultra/FastTrak-33 控制器" + +; PCI\VEN_105a&DEV_0d38.DeviceDesc="Promise Promise FastTrak-66 控制器" +; PCI\VEN_105a&DEV_4d38.DeviceDesc="Promise Promise Ultra/FastTrak-66 控制器" + +; PCI\VEN_105a&DEV_4d30.DeviceDesc="Promise Promise Ultra/FastTrak-100 控制器" +; PCI\VEN_105a&DEV_0d30.DeviceDesc="Promise OEM ATA-100 控制器" + +; PCI\VEN_1103&DEV_0004.DeviceDesc="HighPoint HPT366/368/370/372 控制器" +; PCI\VEN_1103&DEV_0005.DeviceDesc="HighPoint HPT372 控制器" +; PCI\VEN_1103&DEV_0008.DeviceDesc="HighPoint HPT374 控制器" + +PCI\VEN_16ca&DEV_0001.DeviceDesc="Cenatek Rocket Drive IDE DMA 控制器" +PCI\VEN_1078&DEV_0102.DeviceDesc="Cyrix 5530 ATA-33 控制器" +PCI\VEN_1042&DEV_0102.DeviceDesc="RZ 100x IDE 控制器" +PCI\VEN_1283&DEV_8172.DeviceDesc="IT8172 ATA-33 控制器" +PCI\VEN_1283&DEV_8212.DeviceDesc="IT8212F ATA-133 控制器" +PCI\VEN_169c&DEV_0044.DeviceDesc="Netcell SR3000/5000 ATA-33 控制器" +PCI\VEN_3388&DEV_8013.DeviceDesc="HiNT VXII EIDE IDE DMA 控制器" +PCI\VEN_ffff&DEV_ffff&REV_ff.DeviceDesc="IDE 控制器" + +;Compatible adapters +UniATA_Name = "標準 ATA 驅動程式" +*PNP0600.PriDeviceDesc = "主 IDE 通道" +*PNP0600.SecDeviceDesc = "次 IDE 通道" +PCI\CC_0101.DeviceDesc = "雙通道 PCI BusMaster IDE 控制器" +PCI\CC_0104.DeviceDesc = "標準 RAID IDE 控制器" +PCI\CC_0105.DeviceDesc = "標準 ATA 控制器" +PCI\CC_0106.DeviceDesc = "標準序列 ATA 控制器" + [Strings.0405] HDCClassName = "IDE řadiče ATA/ATAPI" GenericMfg = "(Obecné řadiče pevných disků)" @@ -2897,4 +3209,3 @@ PCI\CC_0101.DeviceDesc = "双通道 PCI BusMaster IDE 控制器" PCI\CC_0104.DeviceDesc = "通用 RAID IDE 控制器" PCI\CC_0105.DeviceDesc = "通用 ATA 控制器" PCI\CC_0106.DeviceDesc = "通用串口 ATA 控制器" - diff --git a/media/inf/input.inf b/media/inf/input.inf index e1f94b52ca8..4cf1921226d 100644 --- a/media/inf/input.inf +++ b/media/inf/input.inf @@ -92,6 +92,13 @@ USB\VID_045E&PID_0039.DeviceDesc="Microsoft IntelliMouse Optical (USB)" USB\VID_045E&PID_0040.DeviceDesc="Microsoft Wheel Mouse Optical (USB)" USB\VID_045E&PID_0047.DeviceDesc="Microsoft IntelliMouse Explorer 3.0 (USB)" +[Strings.0404] +HID.ClassName = "人體學介面裝置" +HID.DeviceDesc = "USB 人體學介面裝置" + +HID_DEVICE = "HID 相容裝置" +StdMfg = "(標準人體學介面裝置)" + [Strings.0405] HID.ClassName = "Zařízení standardu HID" HID.DeviceDesc = "USB zařízení standardu HID" diff --git a/media/inf/keyboard.inf b/media/inf/keyboard.inf index f9f37024574..f8e3c9a102a 100644 --- a/media/inf/keyboard.inf +++ b/media/inf/keyboard.inf @@ -106,6 +106,12 @@ StdMfg = "(Standard keyboards)" LocationOverride = "plugged in to keyboard port" *PNP0303.DeviceDesc = "IBM PC/AT keyboard" +[Strings.0404] +KeyboardClassName = "鍵盤" +HID.KeyboardDevice = "HID 鍵盤" +StdMfg = "(標準鍵盤)" +*PNP0303.DeviceDesc = "IBM PC/AT 鍵盤" + [Strings.0405] KeyboardClassName = "Klávesnice" HID.KeyboardDevice = "Klávesnice standardu HID" diff --git a/media/inf/legcydrv.inf b/media/inf/legcydrv.inf index 51b64551778..dd5679523c7 100644 --- a/media/inf/legcydrv.inf +++ b/media/inf/legcydrv.inf @@ -22,6 +22,9 @@ HKR, , EnumPropPages32, 0, "syssetup.dll,LegacyDriverPropPageProvider" ReactOS = "ReactOS Team" LegacyDriverClassName = "Non-Plug and Play Drivers" +[Strings.0404] +LegacyDriverClassName = "非隨插即用驅動程式" + [Strings.0405] LegacyDriverClassName = "Zařízení nepodporující Plug and Play" diff --git a/media/inf/machine.inf b/media/inf/machine.inf index dddb1b32162..a4ef69ab3c1 100644 --- a/media/inf/machine.inf +++ b/media/inf/machine.inf @@ -209,6 +209,54 @@ PCI\VEN_10DE&DEV_01B8.DeviceDesc = "nVidia nForce PCI to PCI Bridge" PCI\VEN_10DE&DEV_02A5.DeviceDesc = "nVidia MCPX CPU Bridge" PCI\VEN_10DE&DEV_02A6.DeviceDesc = "nVidia MCPX Memory Controller" +[Strings.0404] +GenericMfg = "(標準系統裝置)" +*PNP0000.DeviceDesc = "可編程插斷控制器" +*PNP0001.DeviceDesc = "EISA 可編程插斷控制器" +*PNP0100.DeviceDesc = "系統計時器" +*PNP0103.DeviceDesc = "高精確度事件計時器" +*PNP0200.DeviceDesc = "DMA 控制器" +*PNP0800.DeviceDesc = "系統揚聲器" +*PNP0A00.DeviceDesc = "ISA 匯流排" +*PNP0A03.DeviceDesc = "PCI 匯流排" +*PNP0A05.DeviceDesc = "標準 ACPI 匯流排" +*PNP0A06.DeviceDesc = "擴展 I/O 匯流排 / 標準容器裝置" +*PNP0A08.DeviceDesc = "PCI 匯流排" +*PNP0B00.DeviceDesc = "AT 實時時鐘" +*PNP0C01.DeviceDesc = "系統板" +*PNP0C02.DeviceDesc = "主板資源" +*PNP0C04.DeviceDesc = "數學輔助處理器" +*PNP0C0B.DeviceDesc = "ACPI 風扇" +*PNP0C0C.DeviceDesc = "ACPI 電源按鈕裝置" +*PNP0C0D.DeviceDesc = "ACPI 蓋子" +*PNP0C0E.DeviceDesc = "ACPI 休眠按鈕裝置" +*PNP0C0F.DeviceDesc = "PCI 中斷連接裝置" +*PNP0C15.DeviceDesc = "擴充埠" +ACPI\FixedButton.DeviceDesc = "ACPI 固定功能按鈕" +ISAPNP\ReadDataPort.DeviceDesc = "ISAPNP 讀取數據埠" +PCI\CC_0500.DeviceDesc = "標準 PCI 隨機存取記憶體控制器" +PCI\CC_0600.DeviceDesc = "標準 CPU - PCI 橋接器" +PCI\CC_0601.DeviceDesc = "標準 PCI - ISA 橋接器" +PCI\CC_0604.DeviceDesc = "標準 PCI - PCI 橋接器" +*ThermalZone.DeviceDesc = "ACPI 溫度監控" +PCI\CC_0C05.DeviceDesc = "SMBus 控制器" +SWENUM.DeviceDesc = "隨插即用軟體匯流排枚舉器" + +*INT0800.DeviceDesc = "Intel 82802 韌體集線器控制器" +PCI\VEN_8086&DEV_7000.DeviceDesc = "Intel 82371SB PIIX3 PCI - ISA 橋接器" +PCI\VEN_8086&DEV_7110.DeviceDesc = "Intel 82371AB/EB PCI - ISA 橋接器" +PCI\VEN_8086&DEV_7113.DeviceDesc = "Intel 82371AB/EB 電源管理控制器" +PCI\VEN_8086&DEV_7180.DeviceDesc = "Intel 82443LX/EX Pentium(R) II CPU - PCI 橋接器" +PCI\VEN_8086&DEV_7190.DeviceDesc = "Intel 82443BX/ZX/DX Pentium(R) II CPU - PCI 橋接器" +PCI\VEN_8086&DEV_7192.DeviceDesc = "Intel 82443BX/ZX/DX Pentium(R) II CPU - PCI 橋接器" + +PCI\VEN_10DE&DEV_01B2.DeviceDesc = "nVidia nForce PCI - ISA 橋接器" +PCI\VEN_10DE&DEV_01B4.DeviceDesc = "nVidia nForce SMBus 控制器" +PCI\VEN_10DE&DEV_01B7.DeviceDesc = "nVidia nForce AGP - PCI 橋接器" +PCI\VEN_10DE&DEV_01B8.DeviceDesc = "nVidia nForce PCI - PCI 橋接器" +PCI\VEN_10DE&DEV_02A5.DeviceDesc = "nVidia MCPX CPU 橋接器" +PCI\VEN_10DE&DEV_02A6.DeviceDesc = "nVidia MCPX 記憶體控制器" + [Strings.0405] SystemClassName = "Systémová zařízení" diff --git a/media/inf/monitor.inf b/media/inf/monitor.inf index 38699faf99e..5eef0ba4c3a 100644 --- a/media/inf/monitor.inf +++ b/media/inf/monitor.inf @@ -57,6 +57,13 @@ StdMfg = "(Standard monitor types)" DefaultMonitor.DeviceDesc = "Default Monitor" PnPMonitor.DeviceDesc = "Plug and Play Monitor" +[Strings.0404] +MonitorClassName = "顯示器" + +StdMfg = "(標準顯示器類型)" +DefaultMonitor.DeviceDesc = "預設顯示器" +PnPMonitor.DeviceDesc = "隨插即用顯示器" + [Strings.0405] MonitorClassName = "Monitory" StdMfg = "(Obecné monitory)" diff --git a/media/inf/msmouse.inf b/media/inf/msmouse.inf index e6353789417..b8ff7444fc4 100644 --- a/media/inf/msmouse.inf +++ b/media/inf/msmouse.inf @@ -189,6 +189,30 @@ MSMfg = "Microsoft" NecMfg = "NEC" *nEC1F00.DeviceDesc = "NEC PC-98 Bus Mouse" +[Strings.0404] +MouseClassName = "滑鼠和其他指標裝置" + +StdMfg = "(標準滑鼠)" +SERIAL_MOUSE.DeviceDesc = "標準序列滑鼠" +PS2_MOUSE.DeviceDesc = "標準 PS/2 滑鼠" +HID_MOUSE.DeviceDesc = "HID 滑鼠" +*PNP0F0D.DeviceDesc = "標準 InPort 滑鼠" +*PNP0F11.DeviceDesc = "標準匯流排滑鼠" +*PNP0F13.DeviceDesc = "用於 PS/2 風格滑鼠的 PS/2 連接埠" + +*IBM3780.DeviceDesc = "IBM PS/2 Trackpoint 指點桿" + +*PNP0F08.DeviceDesc = "Logitech 序列滑鼠" +*PNP0F12.DeviceDesc = "Logitech PS/2 風格滑鼠" +*PNP0F15.DeviceDesc = "Logitech 匯流排滑鼠" + +*PNP0F00.DeviceDesc = "Microsoft 匯流排滑鼠" +*PNP0F01.DeviceDesc = "Microsoft 序列滑鼠" +*PNP0F02.DeviceDesc = "Microsoft InPort 滑鼠" +*PNP0F03.DeviceDesc = "Microsoft PS/2 風格滑鼠" + +*nEC1F00.DeviceDesc = "NEC PC-98 匯流排滑鼠" + [Strings.0405] MouseClassName = "Myši a jiná polohovací zařízení" diff --git a/media/inf/nettcpip.inf b/media/inf/nettcpip.inf index 502d49e3340..b30bd9fd4f2 100644 --- a/media/inf/nettcpip.inf +++ b/media/inf/nettcpip.inf @@ -301,6 +301,14 @@ DHCPCLIENT_NAME = "DHCP Client" DHCPCLIENT_DESC = "Attempts to obtain network settings automatically from an available DHCP server" TCPIP_DEF = "Transmission Control Protocol/Internet Protocol" +[Strings.0404] +MS_TCPIP.DisplayName = "網際網路通訊協定第四版 (TCP/IPv4)" +DNSCLIENT_NAME = "DNS 用戶端" +DNSCLIENT_DESC = "快取本地 DNS 查詢的服務" +DHCPCLIENT_NAME = "DHCP 用戶端" +DHCPCLIENT_DESC = "嘗試從可用的 DHCP 伺服器中自動取得網路設定" +TCPIP_DEF = "傳輸控制協議 / 互聯網協議" + [Strings.0a] ReactOS = "Equipo de ReactOS" diff --git a/media/inf/scsi.inf b/media/inf/scsi.inf index 73863434119..02d809d4b18 100644 --- a/media/inf/scsi.inf +++ b/media/inf/scsi.inf @@ -77,6 +77,13 @@ GenericMfg = "(Standard SCSI and RAID controllers)" GEN_SCSIADAPTER.DeviceDesc = "SCSI/RAID Host Controller" PCI\VEN_104B&CC_0100.DeviceDesc = "BusLogic SCSI Controller" +[Strings.0404] +SCSIClassName = "SCSI / RAID 控制器" + +GenericMfg = "(標準 SCSI / RAID 控制器)" +GEN_SCSIADAPTER.DeviceDesc = "SCSI/RAID 主機控制器" +PCI\VEN_104B&CC_0100.DeviceDesc = "BusLogic SCSI 控制器" + [Strings.0405] SCSIClassName = "SCSI a RAID řadiče" diff --git a/media/inf/shortcuts.inf b/media/inf/shortcuts.inf index 076fa0db147..d17db6a6a91 100644 --- a/media/inf/shortcuts.inf +++ b/media/inf/shortcuts.inf @@ -201,6 +201,76 @@ WINMINE_DESC=Минички SPIDER_TITLE=Пасианс „Паяк“ SPIDER_DESC=Пасианс „Паяк“ +; Traditional Chinese +[Strings.0404] +ACCESSORIES=附屬應用程式 +SYSTOOLS=系統管理工具 +ACCESSIBILITY=協助工具 +ENTERTAINMENT=娛樂 +COMMUNICATIONS=通訊 +GAMES=遊樂場 + +README_TITLE=讀我檔案 +README_DESC=ReactOS 讀我檔案 + +CMD_TITLE=命令提示字元 +CMD_DESC=命令提示字元 +EXPLORER_TITLE=ReactOS 檔案總管 +EXPLORER_DESC=啟動檔案總管 +RAPPS_TITLE=ReactOS 應用程式管理員 +RAPPS_TITLE_SHORT=應用程式管理員 +RAPPS_DESC=下載並安裝其它應用程式 +SERVMAN_TITLE=服務 +SERVMAN_DESC=服務 +DEVMGMT_TITLE=裝置管理員 +DEVMGMT_DESC=裝置管理員 +EVENTVWR_TITLE=事件檢視器 +EVENTVWR_DESC=啟動事件檢視器 +MSCONFIG_TITLE=系統設定 +MSCONFIG_DESC=啟動系統設定 +CALC_TITLE=小算盤 +CALC_DESC=小算盤 +NOTEPAD_TITLE=記事本 +NOTEPAD_DESC=記事本 +MSTSC_TITLE=遠端桌面連線 +MSTSC_DESC=啟動遠端桌面連線 +WORDPAD_TITLE=WordPad +WORDPAD_DESC=WordPad +MSPAINT_TITLE=小畫家 +MSPAINT_DESC=小畫家 +CHARMAP_TITLE=字元對應表 +CHARMAP_DESC=字元對應表 +CLIPBRD_TITLE=剪貼本檢視器 +CLIPBRD_DESC=剪貼本檢視器 +KBSWITCH_TITLE=鍵盤配置切換器 +KBSWITCH_DESC=啟動鍵盤配置切換器 +REGEDIT_TITLE=登錄編輯程式 +REGEDIT_DESC=啟動登錄編輯程式 +DXDIAG_TITLE=ReactX 診斷工具 +DXDIAG_DESC=啟動 ReactX 診斷工具 +TASKMGR_TITLE=工作管理員 +TASKMGR_DESC=啟動工作管理員 +MAGNIFY_TITLE=放大鏡 +MAGNIFY_DESC=放大鏡 +OSK_TITLE=螢幕小鍵盤 +OSK_DESC=啟動螢幕小鍵盤 +MPLAY_TITLE=媒體播放器 +MPLAY_DESC=啟動媒體播放器 +SNDVOL_TITLE=音量控制 +SNDVOL_DESC=啟動音量控制 +SNDREC32_TITLE=錄音機 +SNDREC32_DESC=啟動錄音機 +SOL_TITLE=接龍 +SOL_DESC=接龍 +WINMINE_TITLE=踩地雷 +WINMINE_DESC=踩地雷 +SPIDER_TITLE=連環新接龍 +SPIDER_DESC=連環新接龍 +UTILMAN_TITLE=協助工具管理員 +UTILMAN_DESC=啟動協助工具管理員 +IEXPLORE_TITLE=Wine Internet Explorer +IEXPLORE_DESC=Wine 網際網路瀏覽器 + ; Czech [Strings.0405] ACCESSORIES=Příslušenství @@ -1557,69 +1627,3 @@ WINMINE_TITLE=扫雷 WINMINE_DESC=扫雷 SPIDER_TITLE=蜘蛛纸牌 SPIDER_DESC=蜘蛛纸牌 - -; Traditional Chinese -[Strings.0404] -ACCESSORIES=附屬應用程式 -SYSTOOLS=系統管理工具 -ACCESSIBILITY=協助工具 -ENTERTAINMENT=娛樂 -COMMUNICATIONS=通訊 -GAMES=遊樂場 - -README_TITLE=讀我檔案 -README_DESC=ReactOS 讀我檔案 - -CMD_TITLE=命令提示字元 -CMD_DESC=命令提示字元 -EXPLORER_TITLE=ReactOS 檔案總管 -EXPLORER_DESC=ReactOS 檔案總管 -RAPPS_TITLE=ReactOS 應用程式管理員 -RAPPS_TITLE_SHORT=應用程式管理員 -RAPPS_DESC=下載並安裝其它應用程式 -SERVMAN_TITLE=服務 -SERVMAN_DESC=服務 -DEVMGMT_TITLE=裝置管理員 -DEVMGMT_DESC=裝置管理員 -EVENTVWR_TITLE=事件檢視器 -EVENTVWR_DESC=啓動事件檢視器 -MSCONFIG_TITLE=系統設定 -MSCONFIG_DESC=啓動系統設定 -CALC_TITLE=小算盤 -CALC_DESC=小算盤 -NOTEPAD_TITLE=記事本 -NOTEPAD_DESC=記事本 -MSTSC_TITLE=遠端桌面連線 -MSTSC_DESC=啓動遠端桌面連線 -WORDPAD_TITLE=WordPad -WORDPAD_DESC=WordPad -MSPAINT_TITLE=小畫家 -MSPAINT_DESC=小畫家 -CHARMAP_TITLE=字元對應表 -CHARMAP_DESC=字元對應表 -CLIPBRD_TITLE=剪貼本檢視器 -CLIPBRD_DESC=剪貼本檢視器 -KBSWITCH_TITLE=鍵盤配置切換器 -KBSWITCH_DESC=啓動鍵盤配置切換器 -REGEDIT_TITLE=登錄編輯程式 -REGEDIT_DESC=啓動登錄編輯程式 -DXDIAG_TITLE=ReactX 診斷工具 -DXDIAG_DESC=啓動 ReactX 診斷工具 -TASKMGR_TITLE=工作管理員 -TASKMGR_DESC=啟動工作管理員 -MAGNIFY_TITLE=放大鏡 -MAGNIFY_DESC=放大鏡 -OSK_TITLE=螢幕小鍵盤 -OSK_DESC=啓動螢幕小鍵盤 -MPLAY_TITLE=媒體播放器 -MPLAY_DESC=啓動媒體播放器 -SNDVOL_TITLE=音量控制 -SNDVOL_DESC=啓動音量控制 -SNDREC32_TITLE=錄音機 -SNDREC32_DESC=啓動錄音機 -SOL_TITLE=接龍 -SOL_DESC=接龍 -WINMINE_TITLE=踩地雷 -WINMINE_DESC=踩地雷 -SPIDER_TITLE=連環新接龍 -SPIDER_DESC=連環新接龍 diff --git a/media/inf/unknown.inf b/media/inf/unknown.inf index abb7942668c..68546839e2c 100644 --- a/media/inf/unknown.inf +++ b/media/inf/unknown.inf @@ -20,6 +20,9 @@ HKR, , Icon, 0, "-18" ReactOS = "ReactOS Team" UnknownClassName = "Other Devices" +[Strings.0404] +UnknownClassName = "其他裝置" + [Strings.0405] UnknownClassName = "Ostatní zařízení" diff --git a/media/inf/usb.inf b/media/inf/usb.inf index 01f03500a91..f0f7117a27c 100644 --- a/media/inf/usb.inf +++ b/media/inf/usb.inf @@ -64,10 +64,10 @@ GenericMfg = "(Generic USB Hubs)" USB\COMPOSITE.DeviceDesc = "USB Composite Device" USB\CLASS_09.DeviceDesc = "Generic USB Hub" -; Spanish -[Strings.0C0A] -GenericMfg = "(Concentrador raíz USB estándar)" -USB\CLASS_09.DeviceDesc = "Concentrador raíz USB estándar" +[Strings.0404] +GenericMfg = "(標準 USB 集線器)" +USB\COMPOSITE.DeviceDesc = "USB 複合裝置" +USB\CLASS_09.DeviceDesc = "標準 USB 集線器" [Strings.0405] GenericMfg = "(Obecné USB rozbočovače)" @@ -78,6 +78,11 @@ USB\CLASS_09.DeviceDesc = "Obecný USB rozbočovač" GenericMfg = "(Generischer USB-Hub)" USB\CLASS_09.DeviceDesc = "Generischer USB-Hub" +; Spanish +[Strings.0C0A] +GenericMfg = "(Concentrador raíz USB estándar)" +USB\CLASS_09.DeviceDesc = "Concentrador raíz USB estándar" + [Strings.0a] GenericMfg = "(Concentrador raíz USB estándar)" USB\CLASS_09.DeviceDesc = "Concentrador raíz USB estándar" @@ -136,4 +141,4 @@ USB\CLASS_09.DeviceDesc = "Standartinis USB šakotuvas" [Strings.0804] GenericMfg = "(通用 USB 集线器)" USB\COMPOSITE.DeviceDesc = "USB 聚合设备" -USB\CLASS_09.DeviceDesc = "通用 USB 集线器" \ No newline at end of file +USB\CLASS_09.DeviceDesc = "通用 USB 集线器" diff --git a/media/inf/usbport.inf b/media/inf/usbport.inf index e199992156f..991d34921e3 100644 --- a/media/inf/usbport.inf +++ b/media/inf/usbport.inf @@ -129,6 +129,18 @@ IntelMfg = "Intel" PCI\VEN_8086&DEV_7020&CC_0C0300.DeviceDesc = "Intel 82371SB PIIX3 USB controller" PCI\VEN_8086&DEV_7112&CC_0C0300.DeviceDesc = "Intel 82371AB/EB/MB PIIX4 USB controller" +[Strings.0404] +USBClassName = "USB 控制器" + +GenericMfg = "(標準 USB 裝置)" +PCI\CC_0C0300.DeviceDesc = "UHCI USB 控制器" +PCI\CC_0C0310.DeviceDesc = "OHCI USB 控制器" +PCI\CC_0C0320.DeviceDesc = "EHCI USB 控制器" +USB\ROOT_HUB.DeviceDesc = "根集線器" + +PCI\VEN_8086&DEV_7020&CC_0C0300.DeviceDesc = "Intel 82371SB PIIX3 USB 控制器" +PCI\VEN_8086&DEV_7112&CC_0C0300.DeviceDesc = "Intel 82371AB/EB/MB PIIX4 USB 控制器" + [Strings.0405] USBClassName = "USB řadiče" diff --git a/media/inf/wmiacpi.inf b/media/inf/wmiacpi.inf index 858442cbb56..a753719bfa2 100644 --- a/media/inf/wmiacpi.inf +++ b/media/inf/wmiacpi.inf @@ -36,6 +36,10 @@ ReactOS = "ReactOS Team" GenericMfg = "(Generic system devices)" *PNP0C14.DeviceDesc = "WMI for ACPI" +[Strings.0404] +GenericMfg = "(標準系統裝置)" +*PNP0C14.DeviceDesc = "ACPI 的 WMI" + [Strings.0405] GenericMfg = "(Generická systémová zařízení)" diff --git a/modules/rosapps/applications/sysutils/ctm/ctm.rc b/modules/rosapps/applications/sysutils/ctm/ctm.rc index 60e3cc8997a..3ba39784ae3 100644 --- a/modules/rosapps/applications/sysutils/ctm/ctm.rc +++ b/modules/rosapps/applications/sysutils/ctm/ctm.rc @@ -41,3 +41,6 @@ #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif +#ifdef LANGUAGE_ZH_TW + #include "lang/zh-TW.rc" +#endif diff --git a/modules/rosapps/applications/sysutils/ctm/lang/zh-TW.rc b/modules/rosapps/applications/sysutils/ctm/lang/zh-TW.rc new file mode 100644 index 00000000000..ba074604436 --- /dev/null +++ b/modules/rosapps/applications/sysutils/ctm/lang/zh-TW.rc @@ -0,0 +1,32 @@ +// Chinese Traditional (zh-TW) resources by Chan Chilung <eason066(a)gmail.com> 2021 + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "主控台工作管理員,由 Aleksey Bragin <aleksey(a)reactos.org> 開發" + + IDS_COLUMN_NUMBER "# " + IDS_COLUMN_IMAGENAME "映像名稱 " + IDS_COLUMN_PID "PID " + IDS_COLUMN_CPU "CPU" + IDS_COLUMN_MEM "記憶體使用量" + IDS_COLUMN_MEM_UNIT "KB" + IDS_COLUMN_PF "分頁錯誤" + + IDS_IDLE_PROCESS "系統空閒處理程序" + IDS_YES "Y" + IDS_NO "N" + + IDS_MENU "按鍵: Q - 退出, K - 終止程序" + IDS_MENU_QUIT "Q" + IDS_MENU_KILL_PROCESS "K" + + IDS_KILL_PROCESS "您確定要終止這個處理程序嗎? (Y/N)" + IDS_KILL_PROCESS_ERR1 "無法終止這個處理程序..." + IDS_KILL_PROCESS_ERR2 "無法終止處理程序 %d (無法執行 OpenProcess)" + + IDS_CTM_GENERAL_ERR1 "ctm: 無法使用主控台。" + IDS_CTM_GENERAL_ERR2 "ctm: 輸入主控台無法執行 GetConsoleMode()。" + IDS_CTM_GENERAL_ERR3 "ctm: 輸出主控台無法執行 GetConsoleMode()。" +END diff --git a/win32ss/user/user32/lang/zh-TW.rc b/win32ss/user/user32/lang/zh-TW.rc index b9b73390155..d54cab217f4 100644 --- a/win32ss/user/user32/lang/zh-TW.rc +++ b/win32ss/user/user32/lang/zh-TW.rc @@ -1,5 +1,5 @@ /* Translation has been created by Luo Yufan 2019 <njlyf2011(a)hotmail.com> */ -/* Improved by Aobi Chan CL (eason066(a)gmail.com) */ +/* Translation improved by Chan Chilung 2021 (eason066(a)gmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -66,7 +66,7 @@ BEGIN IDS_HUNG_UP_TITLE "沒有回應。" IDS_OK "確定" IDS_CANCEL "取消" - IDS_ABORT "中止(&A)" + IDS_ABORT "終止(&A)" IDS_RETRY "重試(&R)" IDS_IGNORE "忽略(&I)" IDS_YES "是(&Y)"
3 years, 9 months
1
0
0
0
[reactos] 01/01: [SHELL32] Avoid code duplication on FAT and EXT2/BtrFS related FSs insertion (#3505)
by George Bișoc
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5fbf5e78e137f89f73e2f…
commit 5fbf5e78e137f89f73e2f42817e52aacfc748450 Author: George Bișoc <george.bisoc(a)reactos.org> AuthorDate: Tue Mar 9 16:17:23 2021 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 9 16:17:23 2021 +0100 [SHELL32] Avoid code duplication on FAT and EXT2/BtrFS related FSs insertion (#3505) This is a slight refactor of InsertDefaultClusterSizeForFs() code with the goal to avoid having the same code for FAT-related and EXT2/BtrFS filesystems. --- dll/win32/shell32/dialogs/drive.cpp | 161 ++++++++++++------------------------ 1 file changed, 51 insertions(+), 110 deletions(-) diff --git a/dll/win32/shell32/dialogs/drive.cpp b/dll/win32/shell32/dialogs/drive.cpp index 6c6b0f39590..0b22f83af02 100644 --- a/dll/win32/shell32/dialogs/drive.cpp +++ b/dll/win32/shell32/dialogs/drive.cpp @@ -41,7 +41,7 @@ GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNum DWORD ClusterSize; if (!wcsicmp(szFs, L"FAT16") || - !wcsicmp(szFs, L"FAT")) //REACTOS HACK + !wcsicmp(szFs, L"FAT")) // REACTOS HACK { if (TotalNumberOfBytes->QuadPart <= (16 * 1024 * 1024)) ClusterSize = 2048; @@ -208,6 +208,8 @@ static VOID InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) { WCHAR wszBuf[100] = {0}; + WCHAR wszDefaultSize[100] = {0}; + PCWSTR pwszFsSizeLimit; WCHAR szDrive[] = L"C:\\"; INT iSelIndex; ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes; @@ -229,146 +231,85 @@ InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) return; if (!wcsicmp(wszBuf, L"FAT16") || - !wcsicmp(wszBuf, L"FAT")) //REACTOS HACK + !wcsicmp(wszBuf, L"FAT")) // REACTOS HACK { - if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) - { - TRACE("FAT16 is not supported on drive larger than 4G current %lu\n", TotalNumberOfBytes.QuadPart); - SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); - return; - } - - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) - { - hDlgCtrl = GetDlgItem(hwndDlg, 28680); - SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); - } - - SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); + pwszFsSizeLimit = L"4GB"; } else if (!wcsicmp(wszBuf, L"FAT32")) { - if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) - { - TRACE("FAT32 is not supported on drive larger than 32G current %lu\n", TotalNumberOfBytes.QuadPart); - SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); - return; - } - - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) - { - hDlgCtrl = GetDlgItem(hwndDlg, 28680); - SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); - } - - SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); + pwszFsSizeLimit = L"32GB"; } else if (!wcsicmp(wszBuf, L"FATX")) { - if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) - { - TRACE("FATX supports drives smaller than 1G (FATX16) and up to 32G (FATX32), current size -> %lu\n", TotalNumberOfBytes.QuadPart); - SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); - return; - } - - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) - { - hDlgCtrl = GetDlgItem(hwndDlg, 28680); - SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); - } - - SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); + pwszFsSizeLimit = L"1GB/32GB"; } else if (!wcsicmp(wszBuf, L"NTFS")) { - if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) - { - TRACE("NTFS is not supported on drive larger than 2TB current %lu\n", TotalNumberOfBytes.QuadPart); - SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); - return; - } - - hDlgCtrl = GetDlgItem(hwndDlg, 28680); - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) - { - SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); - } - ClusterSize = 512; - for (lIndex = 0; lIndex < 4; lIndex++) - { - TotalNumberOfBytes.QuadPart = ClusterSize; - if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, wszBuf, _countof(wszBuf))) - { - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - } - ClusterSize *= 2; - } - - EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE); + pwszFsSizeLimit = L"256TB"; } else if (!wcsicmp(wszBuf, L"EXT2")) + { + pwszFsSizeLimit = L"32TB"; + } + else + { + pwszFsSizeLimit = L"16EB"; + } + + if (!wcsicmp(wszBuf, L"FAT16") || + !wcsicmp(wszBuf, L"FAT") || // REACTOS HACK + !wcsicmp(wszBuf, L"FAT32") || + !wcsicmp(wszBuf, L"FATX") || + !wcsicmp(wszBuf, L"NTFS") || + !wcsicmp(wszBuf, L"EXT2") || + !wcsicmp(wszBuf, L"BtrFS")) { if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) { - TRACE("EXT2 is not supported on drive larger than 32T current %lu\n", TotalNumberOfBytes.QuadPart); + TRACE("%S is not supported on drive larger than %S, current size: %lu\n", wszBuf, pwszFsSizeLimit, TotalNumberOfBytes.QuadPart); SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); return; } - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) + if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszDefaultSize, _countof(wszDefaultSize))) { - hDlgCtrl = GetDlgItem(hwndDlg, 28680); + hDlgCtrl = GetDlgItem(hwndDlg, 28680); // Get the window handle of "allocation unit size" combobox SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszDefaultSize); if (lIndex != CB_ERR) SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); } - EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE); - } - else if (!wcsicmp(wszBuf, L"BtrFS")) - { - if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes)) + if (!wcsicmp(wszBuf, L"NTFS")) { - TRACE("BtrFS is not supported on drive larger than 16E current %lu\n", TotalNumberOfBytes.QuadPart); - SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); - return; + ClusterSize = 512; + for (lIndex = 0; lIndex < 4; lIndex++) + { + TotalNumberOfBytes.QuadPart = ClusterSize; + if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, wszDefaultSize, _countof(wszDefaultSize))) + { + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszDefaultSize); + if (lIndex != CB_ERR) + SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); + } + ClusterSize *= 2; + } } - if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, wszBuf, _countof(wszBuf))) + SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0); + if (!wcsicmp(wszBuf, L"EXT2") || + !wcsicmp(wszBuf, L"BtrFS") || + !wcsicmp(wszBuf, L"NTFS")) { - hDlgCtrl = GetDlgItem(hwndDlg, 28680); - SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); - lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf); - if (lIndex != CB_ERR) - SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); - SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); + /* Enable the "Enable Compression" button */ + EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE); + } + else + { + /* Disable the "Enable Compression" button */ + EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE); } - - EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE); } else {
3 years, 9 months
1
0
0
0
[reactos] 01/01: [FREELDR] Remove a few useless code lines (#3503)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=25e1235fe7218f631df10…
commit 25e1235fe7218f631df10c13dbc55a279b6acfbf Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Tue Mar 9 16:02:11 2021 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 9 16:02:11 2021 +0100 [FREELDR] Remove a few useless code lines (#3503) CORE-14516 --- boot/freeldr/freeldr/lib/fs/ext2.c | 4 +--- boot/freeldr/freeldr/lib/fs/fat.c | 4 +--- boot/freeldr/freeldr/ntldr/inffile.c | 12 +----------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/boot/freeldr/freeldr/lib/fs/ext2.c b/boot/freeldr/freeldr/lib/fs/ext2.c index 65fae203e30..fa68cd9d96a 100644 --- a/boot/freeldr/freeldr/lib/fs/ext2.c +++ b/boot/freeldr/freeldr/lib/fs/ext2.c @@ -522,7 +522,7 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex]; // - // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer + // Now do the read and update BytesRead & FilePointer // if (!Ext2ReadPartialBlock(Volume, BlockNumber, 0, (ULONG)BytesToRead, Buffer)) { @@ -533,8 +533,6 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO *BytesRead += BytesToRead; } Ext2FileInfo->FilePointer += BytesToRead; - BytesToRead -= BytesToRead; - Buffer = (PVOID)((ULONG_PTR)Buffer + (ULONG_PTR)BytesToRead); } return TRUE; diff --git a/boot/freeldr/freeldr/lib/fs/fat.c b/boot/freeldr/freeldr/lib/fs/fat.c index af0bcb1e7fd..1b98b63a27b 100644 --- a/boot/freeldr/freeldr/lib/fs/fat.c +++ b/boot/freeldr/freeldr/lib/fs/fat.c @@ -1341,7 +1341,7 @@ BOOLEAN FatReadFile(PFAT_FILE_INFO FatFileInfo, ULONG BytesToRead, ULONG* BytesR ASSERT(!FAT_IS_END_CLUSTER(FatFileInfo->CurrentCluster)); // - // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer + // Now do the read and update BytesRead & FilePointer // if (!FatReadPartialCluster(Volume, FatFileInfo->CurrentCluster, 0, BytesToRead, Buffer)) { @@ -1352,8 +1352,6 @@ BOOLEAN FatReadFile(PFAT_FILE_INFO FatFileInfo, ULONG BytesToRead, ULONG* BytesR *BytesRead += BytesToRead; } FatFileInfo->FilePointer += BytesToRead; - BytesToRead -= BytesToRead; - Buffer = (PVOID)((ULONG_PTR)Buffer + BytesToRead); } return TRUE; diff --git a/boot/freeldr/freeldr/ntldr/inffile.c b/boot/freeldr/freeldr/ntldr/inffile.c index eced0fe0ee7..a9dd7152eaf 100644 --- a/boot/freeldr/freeldr/ntldr/inffile.c +++ b/boot/freeldr/freeldr/ntldr/inffile.c @@ -1505,17 +1505,7 @@ InfGetData ( if (Key != NULL) *Key = CacheKey->Key; - if (Data != NULL) - { - if (CacheKey->FirstField == NULL) - { - *Data = NULL; - } - else - { - *Data = CacheKey->FirstField->Data; - } - } + *Data = (CacheKey->FirstField == NULL) ? NULL : CacheKey->FirstField->Data; return TRUE; }
3 years, 9 months
1
0
0
0
[reactos] 01/01: [DOC] 3rd Party Files.txt: Use complete MS Windows Driver Samples URLs (#3515)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=309f707e7f4a05eb00710…
commit 309f707e7f4a05eb00710bedd1adbf5702bf320e Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Tue Mar 9 15:43:17 2021 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Mar 9 15:43:17 2021 +0100 [DOC] 3rd Party Files.txt: Use complete MS Windows Driver Samples URLs (#3515) Addendum to 119f102. --- media/doc/3rd Party Files.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt index a2d2c1b5392..febb43e4683 100644 --- a/media/doc/3rd Party Files.txt +++ b/media/doc/3rd Party Files.txt @@ -85,7 +85,7 @@ Title: Microsoft CDFS File System Driver Path: drivers/filesystems/cdfs Used Version: git commit f73e552 License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/filesys
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/filesys/cdfs
Title: Ext2Fsd Path: drivers/filesystems/ext2 @@ -119,7 +119,7 @@ Title: Microsoft fastfat File System Driver Path: drivers/filesystems/fastfat_new Used Version: git commit 16022c5 License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/filesys
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/filesys/fas…
Title: VirtIO NetKVM Windows guest driver Path: drivers/network/dd/netkvm @@ -131,25 +131,25 @@ Title: Microsoft CDROM Storage Class Driver Path: drivers/storage/class/cdrom_new Used Version: git commit 96eb96d License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage/cla…
Title: Microsoft ClassPnP Storage Class Driver Library Path: drivers/storage/class/classpnp Used Version: git commit 88541f7 License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage/cla…
Title: Microsoft Disk Class Driver Path: drivers/storage/class/disk_new Used Version: git commit 3428c5f License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage/cla…
Title: Microsoft Super Floppy (sfloppy) Storage Class Driver Path: drivers/storage/floppy_new Used Version: git commit 8fb512a License: MS-PL (
https://spdx.org/licenses/MS-PL.html
) -URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage
+URL:
https://github.com/microsoft/Windows-driver-samples/tree/master/storage/sfl…
Title: Universal ATA driver for Windows Path: drivers/storage/ide/uniata
3 years, 9 months
1
0
0
0
[reactos] 01/01: [CDROM_NEW] CMakeLists.txt: Add cdrom.rc (#3513)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0cf1169dd04d1dcf9c0ac…
commit 0cf1169dd04d1dcf9c0acbe195a0289f2705ac2a Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Mon Mar 8 19:10:43 2021 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Mar 8 19:10:43 2021 +0100 [CDROM_NEW] CMakeLists.txt: Add cdrom.rc (#3513) Addendum to 83b85e2. CORE-17129 --- drivers/storage/class/cdrom_new/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/storage/class/cdrom_new/CMakeLists.txt b/drivers/storage/class/cdrom_new/CMakeLists.txt index f67e5ff3aeb..d4bd2dd924c 100644 --- a/drivers/storage/class/cdrom_new/CMakeLists.txt +++ b/drivers/storage/class/cdrom_new/CMakeLists.txt @@ -17,7 +17,7 @@ list(APPEND SOURCE zpodd.c cdrom.h) -add_library(cdrom MODULE ${SOURCE}) +add_library(cdrom MODULE ${SOURCE} cdrom.rc) set_module_type(cdrom kernelmodedriver) if(GCC OR CLANG)
3 years, 9 months
1
0
0
0
[reactos] 01/01: initial commit (#3506)
by Arnav Bhatt
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=06f57e169635f5d05bee8…
commit 06f57e169635f5d05bee8412a2bd46325ac7a209 Author: Arnav Bhatt <arnavbhatt288(a)gmail.com> AuthorDate: Sat Mar 6 18:13:05 2021 +0000 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Mar 6 19:13:05 2021 +0100 initial commit (#3506) --- dll/win32/msgina/shutdown.c | 24 ++++++++++++++++-------- dll/win32/shell32/dialogs/dialogs.cpp | 24 ++++++++++++++++-------- dll/win32/shell32/lang/pl-PL.rc | 18 +++++++++--------- 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/dll/win32/msgina/shutdown.c b/dll/win32/msgina/shutdown.c index 8f319db0a74..6ea696d5031 100644 --- a/dll/win32/msgina/shutdown.c +++ b/dll/win32/msgina/shutdown.c @@ -396,12 +396,6 @@ DrawIconOnOwnerDrawnButtons( } } - /* If the owner draw button has keyboard focus make it the default button */ - if (pdis->itemState & ODS_FOCUS) - { - SendMessageW(GetParent(pdis->hwndItem), DM_SETDEFID, pdis->CtlID, 0); - } - /* Draw it on the required button */ bRet = BitBlt(pdis->hDC, (rect.right - rect.left - CX_BITMAP) / 2, @@ -502,7 +496,7 @@ LoadShutdownSelState(VOID) static INT_PTR CALLBACK -HotButtonSubclass( +OwnerDrawButtonSubclass( HWND hButton, UINT uMsg, WPARAM wParam, @@ -568,6 +562,20 @@ HotButtonSubclass( InvalidateRect(hButton, NULL, FALSE); break; } + + /* Whenever one of the buttons gets the keyboard focus, set it as default button */ + case WM_SETFOCUS: + { + SendMessageW(GetParent(hButton), DM_SETDEFID, buttonID, 0); + break; + } + + /* Otherwise, set IDCANCEL as default button */ + case WM_KILLFOCUS: + { + SendMessageW(GetParent(hButton), DM_SETDEFID, IDCANCEL, 0); + break; + } } return CallWindowProcW(pContext->OldButtonProc, hButton, uMsg, wParam, lParam); } @@ -968,7 +976,7 @@ ShutdownOnInit( for (int i = 0; i < NUMBER_OF_BUTTONS; i++) { SetWindowLongPtrW(GetDlgItem(hDlg, IDC_BUTTON_HIBERNATE + i), GWLP_USERDATA, (LONG_PTR)pContext); - SetWindowLongPtrW(GetDlgItem(hDlg, IDC_BUTTON_HIBERNATE + i), GWLP_WNDPROC, (LONG_PTR)HotButtonSubclass); + SetWindowLongPtrW(GetDlgItem(hDlg, IDC_BUTTON_HIBERNATE + i), GWLP_WNDPROC, (LONG_PTR)OwnerDrawButtonSubclass); } /* Update the choice description based on the current selection */ diff --git a/dll/win32/shell32/dialogs/dialogs.cpp b/dll/win32/shell32/dialogs/dialogs.cpp index 3fbdf639aa4..2094bc8d188 100644 --- a/dll/win32/shell32/dialogs/dialogs.cpp +++ b/dll/win32/shell32/dialogs/dialogs.cpp @@ -1169,12 +1169,6 @@ BOOL DrawIconOnOwnerDrawnButtons(DRAWITEMSTRUCT* pdis, PLOGOFF_DLG_CONTEXT pCont } } - /* If the owner draw button has keyboard focus make it the default button */ - if (pdis->itemState & ODS_FOCUS) - { - SendMessageW(GetParent(pdis->hwndItem), DM_SETDEFID, pdis->CtlID, 0); - } - /* Draw it on the required button */ bRet = BitBlt(pdis->hDC, (rect.right - rect.left - CX_BITMAP) / 2, @@ -1187,7 +1181,7 @@ BOOL DrawIconOnOwnerDrawnButtons(DRAWITEMSTRUCT* pdis, PLOGOFF_DLG_CONTEXT pCont return bRet; } -INT_PTR CALLBACK HotButtonSubclass(HWND hButton, UINT uMsg, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK OwnerDrawButtonSubclass(HWND hButton, UINT uMsg, WPARAM wParam, LPARAM lParam) { PLOGOFF_DLG_CONTEXT pContext; pContext = (PLOGOFF_DLG_CONTEXT)GetWindowLongPtrW(hButton, GWLP_USERDATA); @@ -1233,6 +1227,20 @@ INT_PTR CALLBACK HotButtonSubclass(HWND hButton, UINT uMsg, WPARAM wParam, LPARA InvalidateRect(hButton, NULL, FALSE); break; } + + /* Whenever one of the buttons gets the keyboard focus, set it as default button */ + case WM_SETFOCUS: + { + SendMessageW(GetParent(hButton), DM_SETDEFID, buttonID, 0); + break; + } + + /* Otherwise, set IDCANCEL as default button */ + case WM_KILLFOCUS: + { + SendMessageW(GetParent(hButton), DM_SETDEFID, IDCANCEL, 0); + break; + } } return CallWindowProcW(pContext->OldButtonProc, hButton, uMsg, wParam, lParam); } @@ -1366,7 +1374,7 @@ static VOID FancyLogoffOnInit(HWND hwnd, PLOGOFF_DLG_CONTEXT pContext) { pContext->bIsButtonHot[i] = FALSE; SetWindowLongPtrW(GetDlgItem(hwnd, IDC_LOG_OFF_BUTTON + i), GWLP_USERDATA, (LONG_PTR)pContext); - SetWindowLongPtrW(GetDlgItem(hwnd, IDC_LOG_OFF_BUTTON + i), GWLP_WNDPROC, (LONG_PTR)HotButtonSubclass); + SetWindowLongPtrW(GetDlgItem(hwnd, IDC_LOG_OFF_BUTTON + i), GWLP_WNDPROC, (LONG_PTR)OwnerDrawButtonSubclass); } } diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index 49802558c64..ce3cb3a85f0 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -499,18 +499,18 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 95, 39, 50, 14 END -IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 208, 122 +IDD_LOG_OFF_FANCY DIALOGEX 0, 0, 278, 122 STYLE NOT WS_VISIBLE | DS_CENTER | DS_SHELLFONT | WS_BORDER | WS_POPUP FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_DLG_BG, IDC_STATIC, "STATIC", SS_BITMAP | SS_REALSIZECONTROL, 0, 0, 208, 122 - CONTROL IDB_REACTOS_FLAG, IDC_STATIC, "STATIC", SS_BITMAP, 176, 1, 32, 26 - PUSHBUTTON "&Przełącz użytkownika", IDC_SWITCH_USER_BUTTON, 55, 46, 22, 20, BS_OWNERDRAW | WS_DISABLED | WS_GROUP - PUSHBUTTON "&Wyloguj", IDC_LOG_OFF_BUTTON, 132, 46, 22, 20, BS_OWNERDRAW - PUSHBUTTON "Anuluj", IDCANCEL, 162, 103, 40, 12, WS_GROUP | BS_FLAT - LTEXT "Wylogowywanie z systemu ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 170, 19 - CTEXT "Przełącz użytkownika", IDC_SWITCH_USER_STATIC, 41, 70, 51, 11 - CTEXT "Wyloguj", IDC_LOG_OFF_STATIC, 118, 70, 51, 11 + CONTROL IDB_DLG_BG, IDC_STATIC, "STATIC", SS_BITMAP | SS_REALSIZECONTROL, 0, 0, 278, 122 + CONTROL IDB_REACTOS_FLAG, IDC_STATIC, "STATIC", SS_BITMAP, 245, 1, 32, 26 + PUSHBUTTON "&Przełącz użytkownika", IDC_SWITCH_USER_BUTTON, 86, 46, 22, 20, BS_OWNERDRAW | WS_GROUP + PUSHBUTTON "&Wyloguj", IDC_LOG_OFF_BUTTON, 169, 46, 22, 20, BS_OWNERDRAW + PUSHBUTTON "Anuluj", IDCANCEL, 232, 103, 40, 12, WS_GROUP | BS_FLAT + LTEXT "Wylogowywanie z systemu ReactOS", IDC_LOG_OFF_TEXT_STATIC, 4, 7, 232, 19 + CTEXT "Przełącz użytkownika", IDC_SWITCH_USER_STATIC, 52, 70, 90, 11 + CTEXT "Wyloguj", IDC_LOG_OFF_STATIC, 155, 70, 51, 11 END IDD_DISCONNECT DIALOGEX 0, 0, 188, 60
3 years, 9 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200