Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4145fe0e
Commit
4145fe0e
authored
Feb 01, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Feb 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Store the autocompletion object pointer in a window property rather…
shell32: Store the autocompletion object pointer in a window property rather than in the window user data.
parent
4dc30448
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
autocomplete.c
dlls/shell32/autocomplete.c
+5
-3
autocomplete.c
dlls/shell32/tests/autocomplete.c
+7
-0
No files found.
dlls/shell32/autocomplete.c
View file @
4145fe0e
...
...
@@ -82,7 +82,9 @@ typedef struct
static
const
IAutoComplete2Vtbl
acvt
;
static
const
IAutoCompleteDropDownVtbl
acdropdownvt
;
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
};
/*
converts This to an interface pointer
*/
...
...
@@ -273,7 +275,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit(
This
->
initialized
=
TRUE
;
This
->
hwndEdit
=
hwndEdit
;
This
->
wpOrigEditProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hwndEdit
,
GWLP_WNDPROC
,
(
LONG_PTR
)
ACEditSubclassProc
);
Set
WindowLongPtrW
(
hwndEdit
,
GWLP_USERDATA
,
(
LONG_PTR
)
This
);
Set
PropW
(
hwndEdit
,
autocomplete_propertyW
,
This
);
if
(
This
->
options
&
ACO_AUTOSUGGEST
)
create_listbox
(
This
);
...
...
@@ -464,7 +466,7 @@ static const IAutoCompleteDropDownVtbl acdropdownvt =
*/
static
LRESULT
APIENTRY
ACEditSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
IAutoCompleteImpl
*
This
=
GetPropW
(
hwnd
,
autocomplete_propertyW
);
LPOLESTR
strs
;
HRESULT
hr
;
WCHAR
hwndText
[
255
];
...
...
dlls/shell32/tests/autocomplete.c
View file @
4145fe0e
...
...
@@ -141,6 +141,7 @@ static IAutoComplete *test_init(void)
HRESULT
r
;
IAutoComplete
*
ac
;
IUnknown
*
acSource
;
LONG_PTR
user_data
;
/* AutoComplete instance */
r
=
CoCreateInstance
(
&
CLSID_AutoComplete
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -163,10 +164,16 @@ static IAutoComplete *test_init(void)
}
ok
(
r
==
S_OK
,
"no IID_IACList (0x%08x)
\n
"
,
r
);
user_data
=
GetWindowLongPtrA
(
hEdit
,
GWLP_USERDATA
);
ok
(
user_data
==
0
,
"Expected the edit control user data to be zero
\n
"
);
/* bind to edit control */
r
=
IAutoComplete_Init
(
ac
,
hEdit
,
acSource
,
NULL
,
NULL
);
ok
(
r
==
S_OK
,
"Init returned 0x%08x
\n
"
,
r
);
user_data
=
GetWindowLongPtrA
(
hEdit
,
GWLP_USERDATA
);
ok
(
user_data
==
0
,
"Expected the edit control user data to be zero
\n
"
);
IUnknown_Release
(
acSource
);
return
ac
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment