Author: gadamopoulos
Date: Thu Feb 26 18:44:34 2015
New Revision: 66473
URL:
http://svn.reactos.org/svn/reactos?rev=66473&view=rev
Log:
[BROWSEUI]
- Moce CAutoComplete from shell32 to browseui where it belongs
Added:
trunk/reactos/dll/win32/browseui/CAutoComplete.cpp
- copied, changed from r66418, trunk/reactos/dll/win32/shell32/CAutoComplete.cpp
trunk/reactos/dll/win32/browseui/CAutoComplete.h
- copied unchanged from r66418, trunk/reactos/dll/win32/shell32/CAutoComplete.h
trunk/reactos/dll/win32/browseui/res/autocomplete.rgs
- copied unchanged from r66418,
trunk/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs
Removed:
trunk/reactos/dll/win32/shell32/CAutoComplete.cpp
trunk/reactos/dll/win32/shell32/CAutoComplete.h
trunk/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs
Modified:
trunk/reactos/dll/win32/browseui/CMakeLists.txt
trunk/reactos/dll/win32/browseui/browseui.cpp
trunk/reactos/dll/win32/browseui/browseui.rc
trunk/reactos/dll/win32/browseui/precomp.h
trunk/reactos/dll/win32/browseui/resource.h
trunk/reactos/dll/win32/shell32/CMakeLists.txt
trunk/reactos/dll/win32/shell32/precomp.h
trunk/reactos/dll/win32/shell32/rgs_res.rc
trunk/reactos/dll/win32/shell32/shell32.cpp
trunk/reactos/dll/win32/shell32/shresdef.h
Copied: trunk/reactos/dll/win32/browseui/CAutoComplete.cpp (from r66418,
trunk/reactos/dll/win32/shell32/CAutoComplete.cpp)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/CAutoCo…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CAutoComplete.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/CAutoComplete.cpp [iso-8859-1] Thu Feb 26 18:44:34
2015
@@ -37,8 +37,6 @@
#include "precomp.h"
-WINE_DEFAULT_DEBUG_CHANNEL(shell);
-
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};
@@ -169,7 +167,7 @@
if (key)
{
wcscpy(key, pwzsRegKeyPath);
- value = const_cast<WCHAR *>(strrchrW(key, '\\'));
+ value = const_cast<WCHAR *>(wcsrchr(key, '\\'));
if (value)
{
@@ -435,7 +433,7 @@
if (hr != S_OK)
break;
- if ((LPWSTR)strstrW(strs, hwndText) == strs)
+ if ((LPWSTR)wcsstr(strs, hwndText) == strs)
{
if (pThis->options & ACO_AUTOAPPEND)
Modified: trunk/reactos/dll/win32/browseui/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/CMakeLists.txt [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -17,6 +17,7 @@
brandband.cpp
browseui.cpp
browseuiord.cpp
+ CAutoComplete.cpp
commonbrowser.cpp
desktopipc.cpp
explorerband.cpp
Modified: trunk/reactos/dll/win32/browseui/browseui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
==============================================================================
--- trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/browseui.cpp [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -27,6 +27,7 @@
BEGIN_OBJECT_MAP(ObjectMap)
+OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
OBJECT_ENTRY(CLSID_ACLMulti, CACLMulti)
OBJECT_ENTRY(CLSID_SH_AddressBand, CAddressBand)
OBJECT_ENTRY(CLSID_AddressEditBox, CAddressEditBox)
Modified: trunk/reactos/dll/win32/browseui/browseui.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/browseu…
==============================================================================
--- trunk/reactos/dll/win32/browseui/browseui.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/browseui.rc [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -43,6 +43,7 @@
IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs"
IDR_EXPLORERBAND REGISTRY "res/explorerband.rgs"
IDR_PROGRESSDIALOG REGISTRY "res/progressdialog.rgs"
+IDR_AUTOCOMPLETE REGISTRY "res/autocomplete.rgs"
/*
* Everything specific to any language goes
Modified: trunk/reactos/dll/win32/browseui/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/precomp…
==============================================================================
--- trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -20,6 +20,7 @@
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
+#include <undocuser.h>
#include <perhist.h>
#include <exdispid.h>
#include <strsafe.h>
@@ -35,6 +36,7 @@
#include "aclmulti.h"
#include "addressband.h"
#include "addresseditbox.h"
+#include "CAutoComplete.h"
#include "bandproxy.h"
#include "bandsite.h"
#include "bandsitemenu.h"
Modified: trunk/reactos/dll/win32/browseui/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/resourc…
==============================================================================
--- trunk/reactos/dll/win32/browseui/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/resource.h [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -84,6 +84,7 @@
#define IDR_REGTREEOPTIONS 138
#define IDR_EXPLORERBAND 139
#define IDR_PROGRESSDIALOG 140
+#define IDR_AUTOCOMPLETE 141
#define IDS_SMALLICONS 12301
#define IDS_LARGEICONS 12302
Removed: trunk/reactos/dll/win32/shell32/CAutoComplete.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CAutoCom…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CAutoComplete.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CAutoComplete.cpp (removed)
@@ -1,533 +0,0 @@
-/*
- * AutoComplete interfaces implementation.
- *
- * Copyright 2004 Maxime Bellengé <maxime.bellenge(a)laposte.net>
- * Copyright 2009 Andrew Hill
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * 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
-
- TODO:
- - implement ACO_SEARCH style
- - implement ACO_FILTERPREFIXES style
- - implement ACO_USETAB style
- - implement ACO_RTLREADING style
-
- */
-
-#include "precomp.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(shell);
-
-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};
-
-/**************************************************************************
- * IAutoComplete_Constructor
- */
-CAutoComplete::CAutoComplete()
-{
- enabled = TRUE;
- initialized = FALSE;
- options = ACO_AUTOAPPEND;
- wpOrigEditProc = NULL;
- hwndListBox = NULL;
- txtbackup = NULL;
- quickComplete = NULL;
- hwndEdit = NULL;
- wpOrigLBoxProc = NULL;
-}
-
-/**************************************************************************
- * IAutoComplete_Destructor
- */
-CAutoComplete::~CAutoComplete()
-{
- TRACE(" destroying IAutoComplete(%p)\n", this);
- HeapFree(GetProcessHeap(), 0, quickComplete);
- HeapFree(GetProcessHeap(), 0, txtbackup);
- RemovePropW(hwndEdit, autocomplete_propertyW);
- SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC, (LONG_PTR)wpOrigEditProc);
- if (hwndListBox)
- DestroyWindow(hwndListBox);
-}
-
-/******************************************************************************
- * IAutoComplete_fnEnable
- */
-HRESULT WINAPI CAutoComplete::Enable(BOOL fEnable)
-{
- HRESULT hr = S_OK;
-
- TRACE("(%p)->(%s)\n", this, (fEnable) ? "true" :
"false");
-
- enabled = fEnable;
-
- return hr;
-}
-
-/******************************************************************************
- * IAutoComplete_fnInit
- */
-HRESULT WINAPI CAutoComplete::Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR
pwzsRegKeyPath, LPCOLESTR pwszQuickComplete)
-{
- static const WCHAR lbName[] =
{'L','i','s','t','B','o','x',0};
-
- TRACE("(%p)->(0x%08lx, %p, %s, %s)\n",
- this, hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath),
debugstr_w(pwszQuickComplete));
-
- if (options & ACO_AUTOSUGGEST)
- TRACE(" ACO_AUTOSUGGEST\n");
- if (options & ACO_AUTOAPPEND)
- TRACE(" ACO_AUTOAPPEND\n");
- if (options & ACO_SEARCH)
- FIXME(" ACO_SEARCH not supported\n");
- if (options & ACO_FILTERPREFIXES)
- FIXME(" ACO_FILTERPREFIXES not supported\n");
- if (options & ACO_USETAB)
- FIXME(" ACO_USETAB not supported\n");
- if (options & ACO_UPDOWNKEYDROPSLIST)
- TRACE(" ACO_UPDOWNKEYDROPSLIST\n");
- if (options & ACO_RTLREADING)
- FIXME(" ACO_RTLREADING not supported\n");
-
- if (!hwndEdit || !punkACL)
- return E_INVALIDARG;
-
- if (this->initialized)
- {
- WARN("Autocompletion object is already initialized\n");
- /* This->hwndEdit is set to NULL when the edit window is destroyed. */
- return this->hwndEdit ? E_FAIL : E_UNEXPECTED;
- }
-
- if (!SUCCEEDED(punkACL->QueryInterface(IID_PPV_ARG(IEnumString,&enumstr))))
- {
- TRACE("No IEnumString interface\n");
- return E_NOINTERFACE;
- }
-
- this->hwndEdit = hwndEdit;
- this->initialized = TRUE;
- wpOrigEditProc = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC, (LONG_PTR)
ACEditSubclassProc);
-// SetWindowLongPtrW(hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
- SetPropW( hwndEdit, autocomplete_propertyW, (HANDLE)this );
-
- if (options & ACO_AUTOSUGGEST)
- {
- HWND hwndParent;
-
- hwndParent = GetParent(hwndEdit);
-
- /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks
ugly */
- hwndListBox = CreateWindowExW(0, lbName, 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);
-
- if (hwndListBox)
- {
- wpOrigLBoxProc = (WNDPROC)SetWindowLongPtrW(hwndListBox, GWLP_WNDPROC,
(LONG_PTR)ACLBoxSubclassProc);
- SetWindowLongPtrW(hwndListBox, GWLP_USERDATA, (LONG_PTR)this);
- }
- }
-
- if (pwzsRegKeyPath)
- {
- WCHAR *key;
- WCHAR result[MAX_PATH];
- WCHAR *value;
- HKEY hKey = 0;
- LONG res;
- LONG len;
-
- /* pwszRegKeyPath contains the key as well as the value, so we split */
- key = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
(wcslen(pwzsRegKeyPath) + 1) * sizeof(WCHAR));
-
- if (key)
- {
- wcscpy(key, pwzsRegKeyPath);
- value = const_cast<WCHAR *>(strrchrW(key, '\\'));
-
- 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)
- {
- res = RegQueryValueW(hKey, value, result, &len);
- if (res == ERROR_SUCCESS)
- {
- quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, len * sizeof(WCHAR));
- wcscpy(quickComplete, result);
- }
- RegCloseKey(hKey);
- }
- }
-
- HeapFree(GetProcessHeap(), 0, key);
- }
- else
- {
- TRACE("HeapAlloc Failed when trying to alloca %d bytes\n",
(wcslen(pwzsRegKeyPath) + 1) * sizeof(WCHAR));
- return S_FALSE;
- }
- }
-
- if ((pwszQuickComplete) && (!quickComplete))
- {
- quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
(wcslen(pwszQuickComplete) + 1) * sizeof(WCHAR));
-
- if (quickComplete)
- {
- wcscpy(quickComplete, pwszQuickComplete);
- }
- else
- {
- TRACE("HeapAlloc Failed when trying to alloca %d bytes\n",
(wcslen(pwszQuickComplete) + 1) * sizeof(WCHAR));
- return S_FALSE;
- }
- }
-
- return S_OK;
-}
-
-/**************************************************************************
- * IAutoComplete_fnGetOptions
- */
-HRESULT WINAPI CAutoComplete::GetOptions(DWORD *pdwFlag)
-{
- HRESULT hr = S_OK;
-
- TRACE("(%p) -> (%p)\n", this, pdwFlag);
-
- *pdwFlag = options;
-
- return hr;
-}
-
-/**************************************************************************
- * IAutoComplete_fnSetOptions
- */
-HRESULT WINAPI CAutoComplete::SetOptions(DWORD dwFlag)
-{
- HRESULT hr = S_OK;
-
- TRACE("(%p) -> (0x%x)\n", this, dwFlag);
-
- options = (AUTOCOMPLETEOPTIONS)dwFlag;
-
- return hr;
-}
-
-/*
- Window procedure for autocompletion
- */
-LRESULT APIENTRY CAutoComplete::ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam)
-{
- CAutoComplete *pThis = static_cast<CAutoComplete *>(GetPropW(hwnd,
autocomplete_propertyW));//GetWindowLongPtrW(hwnd, GWLP_USERDATA);
- LPOLESTR strs;
- HRESULT hr;
- WCHAR hwndText[255];
- WCHAR *hwndQCText;
- RECT r;
- BOOL control, filled, displayall = FALSE;
- int cpt, height, sel;
-
- if (!pThis->enabled)
- {
- return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
- }
-
- switch (uMsg)
- {
- case CB_SHOWDROPDOWN:
- {
- ShowWindow(pThis->hwndListBox, SW_HIDE);
- }; break;
-
- case WM_KILLFOCUS:
- {
- if ((pThis->options & ACO_AUTOSUGGEST) && ((HWND)wParam !=
pThis->hwndListBox))
- {
- ShowWindow(pThis->hwndListBox, SW_HIDE);
- }
- return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam,
lParam);
- }; break;
-
- case WM_KEYUP:
- {
- GetWindowTextW(hwnd, (LPWSTR)hwndText, 255);
-
- switch(wParam)
- {
- case VK_RETURN:
- {
- /* If quickComplete is set and control is pressed, replace the string
*/
- control = GetKeyState(VK_CONTROL) & 0x8000;
- if (control && pThis->quickComplete)
- {
- hwndQCText = (WCHAR *)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
-
(wcslen(pThis->quickComplete)+wcslen(hwndText))*sizeof(WCHAR));
- sel = swprintf(hwndQCText, pThis->quickComplete, hwndText);
- SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText);
- SendMessageW(hwnd, EM_SETSEL, 0, sel);
- HeapFree(GetProcessHeap(), 0, hwndQCText);
- }
-
- ShowWindow(pThis->hwndListBox, SW_HIDE);
- return 0;
- }; break;
-
- case VK_LEFT:
- case VK_RIGHT:
- {
- return 0;
- }; break;
-
- 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->options & (ACO_AUTOSUGGEST |
ACO_UPDOWNKEYDROPSLIST))
- && (!IsWindowVisible(pThis->hwndListBox) && (!
*hwndText)) )
- {
- /* We must display all the entries */
- displayall = TRUE;
- }
- else
- {
- if (IsWindowVisible(pThis->hwndListBox))
- {
- int count;
-
- count = SendMessageW(pThis->hwndListBox, LB_GETCOUNT, 0,
0);
- /* Change the selection */
- sel = SendMessageW(pThis->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->hwndListBox, LB_SETCURSEL, sel, 0);
-
- if (sel != -1)
- {
- WCHAR *msg;
- int len;
-
- len = SendMessageW(pThis->hwndListBox, LB_GETTEXTLEN,
sel, (LPARAM)NULL);
- msg = (WCHAR *)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, (len + 1) * sizeof(WCHAR));
-
- if (msg)
- {
- SendMessageW(pThis->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->txtbackup);
- SendMessageW(hwnd, EM_SETSEL,
wcslen(pThis->txtbackup), wcslen(pThis->txtbackup));
- }
- }
- return 0;
- }
- }; break;
-
- case VK_BACK:
- case VK_DELETE:
- {
- if ((! *hwndText) && (pThis->options &
ACO_AUTOSUGGEST))
- {
- ShowWindow(pThis->hwndListBox, SW_HIDE);
- return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg,
wParam, lParam);
- }
-
- if (pThis->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:
- ;
- }
-
- SendMessageW(pThis->hwndListBox, LB_RESETCONTENT, 0, 0);
-
- HeapFree(GetProcessHeap(), 0, pThis->txtbackup);
-
- pThis->txtbackup = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
(wcslen(hwndText)+1)*sizeof(WCHAR));
-
- if (pThis->txtbackup)
- {
- wcscpy(pThis->txtbackup, hwndText);
- }
- else
- {
- TRACE("HeapAlloc failed to allocate %d bytes\n",
(wcslen(hwndText)+1)*sizeof(WCHAR));
- }
-
- /* Returns if there is no text to search and we doesn't want to display
all the entries */
- if ((!displayall) && (! *hwndText) )
- break;
-
- pThis->enumstr->Reset();
- filled = FALSE;
-
- for(cpt = 0;;)
- {
- hr = pThis->enumstr->Next(1, &strs, NULL);
- if (hr != S_OK)
- break;
-
- if ((LPWSTR)strstrW(strs, hwndText) == strs)
- {
-
- if (pThis->options & ACO_AUTOAPPEND)
- {
- SetWindowTextW(hwnd, strs);
- SendMessageW(hwnd, EM_SETSEL, wcslen(hwndText), wcslen(strs));
- break;
- }
-
- if (pThis->options & ACO_AUTOSUGGEST)
- {
- SendMessageW(pThis->hwndListBox, LB_ADDSTRING, 0,
(LPARAM)strs);
- filled = TRUE;
- cpt++;
- }
- }
- }
-
- if (pThis->options & ACO_AUTOSUGGEST)
- {
- if (filled)
- {
- height = SendMessageW(pThis->hwndListBox, LB_GETITEMHEIGHT, 0,
0);
- SendMessageW(pThis->hwndListBox, LB_CARETOFF, 0, 0);
- GetWindowRect(hwnd, &r);
- SetParent(pThis->hwndListBox, HWND_DESKTOP);
- /* It seems that Windows XP displays 7 lines at most
- and otherwise displays a vertical scroll bar */
- SetWindowPos(pThis->hwndListBox, HWND_TOP,
- r.left, r.bottom + 1, r.right - r.left, min(height * 7, height *
(cpt + 1)),
- SWP_SHOWWINDOW );
- }
- else
- {
- ShowWindow(pThis->hwndListBox, SW_HIDE);
- }
- }
-
- }; break;
-
- default:
- {
- return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam,
lParam);
- }
-
- }
-
- return 0;
-}
-
-LRESULT APIENTRY CAutoComplete::ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam)
-{
- CAutoComplete *pThis = reinterpret_cast<CAutoComplete
*>(GetWindowLongPtrW(hwnd, GWLP_USERDATA));
- WCHAR *msg;
- int sel, len;
-
- switch (uMsg)
- {
- case WM_MOUSEMOVE:
- {
- sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam);
- SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0);
- }; break;
-
- case WM_LBUTTONDOWN:
- {
- sel = SendMessageW(hwnd, LB_GETCURSEL, 0, 0);
-
- if (sel < 0)
- break;
-
- len = SendMessageW(pThis->hwndListBox, LB_GETTEXTLEN, sel, 0);
- msg = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) *
sizeof(WCHAR));
-
- if (msg)
- {
- SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg);
- SendMessageW(pThis->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg);
- SendMessageW(pThis->hwndEdit, EM_SETSEL, 0, wcslen(msg));
- ShowWindow(hwnd, SW_HIDE);
-
- HeapFree(GetProcessHeap(), 0, msg);
- }
- else
- {
- TRACE("HeapAlloc failed to allocate %d bytes\n", (len + 1) *
sizeof(WCHAR));
- }
-
- }; break;
-
- default:
- return CallWindowProcW(pThis->wpOrigLBoxProc, hwnd, uMsg, wParam,
lParam);
- }
- return 0;
-}
Removed: trunk/reactos/dll/win32/shell32/CAutoComplete.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CAutoCom…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CAutoComplete.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CAutoComplete.h (removed)
@@ -1,66 +0,0 @@
-/*
- * AutoComplete interfaces implementation.
- *
- * Copyright 2004 Maxime Bellengé <maxime.bellenge(a)laposte.net>
- * Copyright 2009 Andrew Hill
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef _AUTOCOMPLETE_H_
-#define _AUTOCOMPLETE_H_
-
-class CAutoComplete :
- public CComCoClass<CAutoComplete, &CLSID_AutoComplete>,
- public CComObjectRootEx<CComMultiThreadModelNoCS>,
- public IAutoComplete2
-{
-private:
- BOOL enabled;
- BOOL initialized;
- HWND hwndEdit;
- HWND hwndListBox;
- WNDPROC wpOrigEditProc;
- WNDPROC wpOrigLBoxProc;
- WCHAR *txtbackup;
- WCHAR *quickComplete;
- CComPtr<IEnumString> enumstr;
- AUTOCOMPLETEOPTIONS options;
-public:
-
- CAutoComplete();
- ~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);
-
- // 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);
-
-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)
-END_COM_MAP()
-};
-
-#endif /* _AUTOCOMPLETE_H_ */
Modified: trunk/reactos/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -16,7 +16,6 @@
${REACTOS_SOURCE_DIR})
list(APPEND SOURCE
- CAutoComplete.cpp
CMenuBand.cpp
CMenuDeskBar.cpp
CIDLDataObj.cpp
Modified: trunk/reactos/dll/win32/shell32/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -48,7 +48,6 @@
#include "CShellItem.h"
#include "CShellLink.h"
#include "CDropTargetHelper.h"
-#include "CAutoComplete.h"
#include "folders/CFSFolder.h"
#include "folders/CDrivesFolder.h"
#include "folders/CDesktopFolder.h"
Removed: trunk/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/rgs/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs (removed)
@@ -1,13 +0,0 @@
-HKCR
-{
- NoRemove CLSID
- {
- ForceRemove {00BB2763-6A77-11D0-A535-00C04FD7D062} = s 'Shell ReactOS
AutoComplete'
- {
- InprocServer32 = s '%MODULE%'
- {
- val ThreadingModel = s 'Apartment'
- }
- }
- }
-}
Modified: trunk/reactos/dll/win32/shell32/rgs_res.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/rgs_res.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/rgs_res.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/rgs_res.rc [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -1,7 +1,6 @@
/* REGISTRY */
IDR_ADMINFOLDERSHORTCUT REGISTRY "res/rgs/adminfoldershortcut.rgs"
-IDR_AUTOCOMPLETE REGISTRY "res/rgs/autocomplete.rgs"
IDR_CONTROLPANEL REGISTRY "res/rgs/controlpanel.rgs"
IDR_DRAGDROPHELPER REGISTRY "res/rgs/dragdrophelper.rgs"
IDR_FOLDEROPTIONS REGISTRY "res/rgs/folderoptions.rgs"
Modified: trunk/reactos/dll/win32/shell32/shell32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -160,7 +160,6 @@
OBJECT_ENTRY(CLSID_ShellLink, CShellLink)
OBJECT_ENTRY(CLSID_DragDropHelper, CDropTargetHelper)
OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder)
- OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder)
OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder)
OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder)
Modified: trunk/reactos/dll/win32/shell32/shresdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Thu Feb 26 18:44:34 2015
@@ -540,7 +540,6 @@
/* Registrar scripts (RGS) */
#define IDR_ADMINFOLDERSHORTCUT 128
-#define IDR_AUTOCOMPLETE 129
#define IDR_CONTROLPANEL 130
#define IDR_DRAGDROPHELPER 131
#define IDR_FOLDEROPTIONS 132