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
6204bbc3
Commit
6204bbc3
authored
Feb 14, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/comboex: Remove child windows subclass on window destruction.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69d90522
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
comboex.c
dlls/comctl32/comboex.c
+23
-15
No files found.
dlls/comctl32/comboex.c
View file @
6204bbc3
...
...
@@ -1502,10 +1502,10 @@ static void COMBOEX_ResetContent (COMBOEX_INFO *infoPtr)
static
LRESULT
COMBOEX_Destroy
(
COMBOEX_INFO
*
infoPtr
)
{
if
(
infoPtr
->
hwndCombo
)
RemoveWindowSubclass
(
infoPtr
->
hwndCombo
,
COMBOEX_ComboWndProc
,
COMBO_SUBCLASSID
);
SetWindowSubclass
(
infoPtr
->
hwndCombo
,
COMBOEX_ComboWndProc
,
COMBO_SUBCLASSID
,
0
);
if
(
infoPtr
->
hwndEdit
)
RemoveWindowSubclass
(
infoPtr
->
hwndEdit
,
COMBOEX_EditWndProc
,
EDIT_SUBCLASSID
);
SetWindowSubclass
(
infoPtr
->
hwndEdit
,
COMBOEX_EditWndProc
,
EDIT_SUBCLASSID
,
0
);
COMBOEX_FreeText
(
&
infoPtr
->
edit
);
COMBOEX_ResetContent
(
infoPtr
);
...
...
@@ -1668,7 +1668,11 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
TRACE
(
"hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p
\n
"
,
hwnd
,
uMsg
,
wParam
,
lParam
,
infoPtr
);
if
(
!
infoPtr
)
return
0
;
if
(
uMsg
==
WM_NCDESTROY
)
RemoveWindowSubclass
(
hwnd
,
COMBOEX_EditWndProc
,
EDIT_SUBCLASSID
);
if
(
!
infoPtr
)
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
...
...
@@ -1823,11 +1827,14 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
TRACE
(
"hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p
\n
"
,
hwnd
,
uMsg
,
wParam
,
lParam
,
infoPtr
);
if
(
!
infoPtr
)
return
0
;
if
(
uMsg
==
WM_NCDESTROY
)
RemoveWindowSubclass
(
hwnd
,
COMBOEX_ComboWndProc
,
COMBO_SUBCLASSID
);
if
(
!
infoPtr
)
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
case
WM_DRAWITEM
:
/*
* The only way this message should come is from the
...
...
@@ -1835,7 +1842,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
* that ComboEx knows this is listbox.
*/
((
DRAWITEMSTRUCT
*
)
lParam
)
->
itemState
|=
ODS_COMBOEXLBOX
;
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
case
WM_ERASEBKGND
:
hDC
=
(
HDC
)
wParam
;
...
...
@@ -1844,7 +1851,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
TRACE
(
"erasing (%s)
\n
"
,
wine_dbgstr_rect
(
&
rect
));
ExtTextOutW
(
hDC
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
0
,
0
,
0
);
SetBkColor
(
hDC
,
obkc
);
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
case
WM_SETCURSOR
:
/*
...
...
@@ -1858,7 +1865,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
nmmse
.
pt
.
y
=
0
;
nmmse
.
dwHitInfo
=
lParam
;
COMBOEX_Notify
(
infoPtr
,
NM_SETCURSOR
,
(
NMHDR
*
)
&
nmmse
);
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
case
WM_LBUTTONDOWN
:
GetClientRect
(
hwnd
,
&
rect
);
...
...
@@ -1868,15 +1875,15 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
if
(
PtInRect
(
&
rect
,
pt
))
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
infoPtr
->
flags
|=
WCBE_MOUSECAPTURED
;
SetCapture
(
hwnd
);
break
;
return
0
;
case
WM_LBUTTONUP
:
if
(
!
(
infoPtr
->
flags
&
WCBE_MOUSECAPTURED
))
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
ReleaseCapture
();
infoPtr
->
flags
&=
~
WCBE_MOUSECAPTURED
;
...
...
@@ -1885,7 +1892,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
}
else
{
SendMessageW
(
hwnd
,
CB_SHOWDROPDOWN
,
TRUE
,
0
);
}
break
;
return
0
;
case
WM_MOUSEMOVE
:
if
(
(
infoPtr
->
flags
&
WCBE_MOUSECAPTURED
)
&&
...
...
@@ -1894,7 +1901,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
COMBOEX_NotifyDragBegin
(
infoPtr
,
edit_text
);
infoPtr
->
flags
|=
WCBE_MOUSEDRAGGED
;
}
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
break
;
case
WM_COMMAND
:
switch
(
HIWORD
(
wParam
))
{
...
...
@@ -1975,9 +1982,10 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
break
;
}
/* fall through */
default:
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
)
;
;
}
return
0
;
return
DefSubclassProc
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
...
...
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