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
186a79cb
Commit
186a79cb
authored
Jul 24, 2001
by
Jukka Heinonen
Committed by
Alexandre Julliard
Jul 24, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WNDPROC handlers now check whether HWND argument is valid.
parent
c0ccd263
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
36 deletions
+66
-36
button.c
controls/button.c
+8
-4
combo.c
controls/combo.c
+10
-5
edit.c
controls/edit.c
+9
-5
icontitle.c
controls/icontitle.c
+3
-0
listbox.c
controls/listbox.c
+26
-18
scroll.c
controls/scroll.c
+2
-0
static.c
controls/static.c
+8
-4
No files found.
controls/button.c
View file @
186a79cb
...
...
@@ -407,12 +407,14 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
*/
static
LRESULT
WINAPI
ButtonWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
;
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
res
=
ButtonWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
@@ -422,12 +424,14 @@ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
*/
static
LRESULT
WINAPI
ButtonWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
;
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
res
=
ButtonWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
controls/combo.c
View file @
186a79cb
...
...
@@ -1863,7 +1863,6 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM wParam, LPARAM lParam )
static
LRESULT
ComboWndProc_locked
(
WND
*
pWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
if
(
pWnd
)
{
LPHEADCOMBO
lphc
=
CB_GETPTR
(
pWnd
);
HWND
hwnd
=
pWnd
->
hwndSelf
;
...
...
@@ -2255,8 +2254,6 @@ static LRESULT ComboWndProc_locked( WND* pWnd, UINT message,
}
return
unicode
?
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
)
:
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
}
return
CB_ERR
;
}
/***********************************************************************
...
...
@@ -2267,10 +2264,14 @@ static LRESULT ComboWndProc_locked( WND* pWnd, UINT message,
*/
static
LRESULT
WINAPI
ComboWndProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
retvalue
=
0
;
WND
*
pWnd
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
retvalue
=
ComboWndProc_locked
(
pWnd
,
message
,
wParam
,
lParam
,
FALSE
);
if
(
pWnd
)
{
retvalue
=
ComboWndProc_locked
(
pWnd
,
message
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
pWnd
);
}
return
retvalue
;
}
...
...
@@ -2279,9 +2280,13 @@ static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPA
*/
static
LRESULT
WINAPI
ComboWndProcW
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
retvalue
=
0
;
WND
*
pWnd
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
retvalue
=
ComboWndProc_locked
(
pWnd
,
message
,
wParam
,
lParam
,
TRUE
);
if
(
pWnd
)
{
retvalue
=
ComboWndProc_locked
(
pWnd
,
message
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
pWnd
);
}
return
retvalue
;
}
controls/edit.c
View file @
186a79cb
...
...
@@ -395,7 +395,7 @@ static LRESULT WINAPI EditWndProc_locked( WND *wnd, UINT msg,
switch
(
msg
)
{
case
WM_DESTROY
:
DPRINTF_EDIT_MSG32
(
"WM_DESTROY"
);
EDIT_WM_Destroy
(
wnd
,
es
);
if
(
es
)
EDIT_WM_Destroy
(
wnd
,
es
);
result
=
0
;
goto
END
;
...
...
@@ -1121,12 +1121,14 @@ static LRESULT WINAPI EditWndProc_locked( WND *wnd, UINT msg,
*/
LRESULT
WINAPI
EditWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
;
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
res
=
EditWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
@@ -1136,12 +1138,14 @@ LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
*/
LRESULT
WINAPI
EditWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
;
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
res
=
EditWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
controls/icontitle.c
View file @
186a79cb
...
...
@@ -200,6 +200,9 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
LRESULT
retvalue
;
WND
*
wnd
=
WIN_FindWndPtr
(
hWnd
);
if
(
!
wnd
)
return
0
;
switch
(
msg
)
{
case
WM_CREATE
:
...
...
controls/listbox.c
View file @
186a79cb
...
...
@@ -2466,7 +2466,6 @@ static LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
LB_DESCR
*
descr
;
HWND
hwnd
=
wnd
->
hwndSelf
;
if
(
!
wnd
)
return
0
;
if
(
!
(
descr
=
*
(
LB_DESCR
**
)
wnd
->
wExtra
))
{
if
(
msg
==
WM_CREATE
)
...
...
@@ -3022,10 +3021,14 @@ static LRESULT WINAPI ListBoxWndProc_locked( WND* wnd, UINT msg,
*/
static
LRESULT
WINAPI
ListBoxWndProcA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
res
=
ListBoxWndProc_locked
(
wndPtr
,
msg
,
wParam
,
lParam
,
FALSE
);
if
(
wndPtr
)
{
res
=
ListBoxWndProc_locked
(
wndPtr
,
msg
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
@@ -3034,10 +3037,14 @@ static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARA
*/
static
LRESULT
WINAPI
ListBoxWndProcW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
res
=
ListBoxWndProc_locked
(
wndPtr
,
msg
,
wParam
,
lParam
,
TRUE
);
if
(
wndPtr
)
{
res
=
ListBoxWndProc_locked
(
wndPtr
,
msg
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
res
;
}
...
...
@@ -3051,9 +3058,6 @@ static LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
{
LRESULT
lRet
=
0
;
HWND
hwnd
;
if
(
wnd
)
{
LB_DESCR
*
descr
=
*
(
LB_DESCR
**
)
wnd
->
wExtra
;
TRACE_
(
combo
)(
"[%04x]: msg %s wp %08x lp %08lx
\n
"
,
...
...
@@ -3068,13 +3072,12 @@ static LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
switch
(
msg
)
{
case
WM_CREATE
:
#define lpcs ((LPCREATESTRUCTA)lParam)
TRACE_
(
combo
)(
"
\t
passed parent handle = 0x%08x
\n
"
,
(
UINT
)
lpcs
->
lpCreateParams
);
{
CREATESTRUCTA
*
lpcs
=
(
CREATESTRUCTA
*
)
lParam
;
TRACE_
(
combo
)(
"
\t
passed parent handle = %p
\n
"
,
lpcs
->
lpCreateParams
);
lphc
=
(
LPHEADCOMBO
)(
lpcs
->
lpCreateParams
);
#undef lpcs
return
LISTBOX_Create
(
wnd
,
lphc
);
}
case
WM_MOUSEMOVE
:
if
(
(
TWEAK_WineLook
>
WIN31_LOOK
)
&&
(
CB_GETTYPE
(
lphc
)
!=
CBS_SIMPLE
)
)
...
...
@@ -3145,10 +3148,7 @@ static LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
if
(
(
lParam
==
(
LPARAM
)
-
1
)
||
(
!
PtInRect
(
&
clientRect
,
mousePos
))
)
{
LISTBOX_MoveCaret
(
wnd
,
descr
,
lphc
->
droppedIndex
,
FALSE
);
LISTBOX_MoveCaret
(
wnd
,
descr
,
lphc
->
droppedIndex
,
FALSE
);
}
}
return
LISTBOX_HandleLButtonUp
(
wnd
,
descr
);
...
...
@@ -3195,7 +3195,7 @@ static LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
DefWindowProcA
(
hwnd
,
msg
,
wParam
,
lParam
);
TRACE_
(
combo
)(
"
\t
default on msg [%04x]
\n
"
,
(
UINT16
)
msg
);
}
return
lRet
;
}
...
...
@@ -3211,10 +3211,14 @@ static LRESULT WINAPI ComboLBWndProc_locked( WND* wnd, UINT msg,
LRESULT
WINAPI
ComboLBWndProcA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
=
0
;
WND
*
wnd
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
res
=
ComboLBWndProc_locked
(
wnd
,
msg
,
wParam
,
lParam
,
FALSE
);
if
(
wnd
)
{
res
=
ComboLBWndProc_locked
(
wnd
,
msg
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
wnd
);
}
return
res
;
}
...
...
@@ -3223,9 +3227,13 @@ LRESULT WINAPI ComboLBWndProcA( HWND hwnd, UINT msg,
*/
LRESULT
WINAPI
ComboLBWndProcW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
res
=
0
;
WND
*
wnd
=
WIN_FindWndPtr
(
hwnd
);
LRESULT
res
=
ComboLBWndProc_locked
(
wnd
,
msg
,
wParam
,
lParam
,
TRUE
);
if
(
wnd
)
{
res
=
ComboLBWndProc_locked
(
wnd
,
msg
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
wnd
);
}
return
res
;
}
controls/scroll.c
View file @
186a79cb
...
...
@@ -1125,6 +1125,8 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
*/
static
LRESULT
WINAPI
ScrollBarWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hwnd
))
return
0
;
switch
(
message
)
{
case
WM_CREATE
:
...
...
controls/static.c
View file @
186a79cb
...
...
@@ -356,12 +356,14 @@ END:
*/
static
LRESULT
WINAPI
StaticWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
lResult
;
LRESULT
lResult
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
lResult
=
StaticWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
FALSE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
lResult
;
}
...
...
@@ -370,12 +372,14 @@ static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
*/
static
LRESULT
WINAPI
StaticWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LRESULT
lResult
;
LRESULT
lResult
=
0
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
)
{
lResult
=
StaticWndProc_locked
(
wndPtr
,
uMsg
,
wParam
,
lParam
,
TRUE
);
WIN_ReleaseWndPtr
(
wndPtr
);
}
return
lResult
;
}
...
...
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