Author: jimtabor
Date: Fri Nov 11 13:04:37 2011
New Revision: 54351
URL:
http://svn.reactos.org/svn/reactos?rev=54351&view=rev
Log:
[Shell32]
- Fix edit control window procedure, see Bug 4856.
Modified:
trunk/reactos/dll/win32/shell32/autocomplete.cpp
Modified: trunk/reactos/dll/win32/shell32/autocomplete.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/autocomp…
==============================================================================
--- trunk/reactos/dll/win32/shell32/autocomplete.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/autocomplete.cpp [iso-8859-1] Fri Nov 11 13:04:37
2011
@@ -39,6 +39,10 @@
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
*/
@@ -63,6 +67,8 @@
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);
}
@@ -125,7 +131,8 @@
this->hwndEdit = hwndEdit;
this->initialized = TRUE;
wpOrigEditProc = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC, (LONG_PTR)
ACEditSubclassProc);
- SetWindowLongPtrW(hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
+// SetWindowLongPtrW(hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
+ SetPropW( hwndEdit, autocomplete_propertyW, (HANDLE)this );
if (options & ACO_AUTOSUGGEST)
{
@@ -249,7 +256,7 @@
*/
LRESULT APIENTRY CAutoComplete::ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
LPARAM lParam)
{
- CAutoComplete *pThis = (CAutoComplete *)GetWindowLongPtrW(hwnd,
GWLP_USERDATA);
+ CAutoComplete *pThis = (CAutoComplete *)GetPropW(hwnd,
autocomplete_propertyW);;//GetWindowLongPtrW(hwnd, GWLP_USERDATA);
LPOLESTR strs;
HRESULT hr;
WCHAR hwndText[255];