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
2247af32
Commit
2247af32
authored
Sep 04, 2002
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Sep 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Rename WIN_Handle16 to HWDN_16 and make it a macro.
- Prepare user.dll for the change of HWND to a void*.
parent
65ea73fe
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
110 additions
and
105 deletions
+110
-105
listbox.c
controls/listbox.c
+4
-3
static.c
controls/static.c
+7
-5
client.c
dlls/user/dde/client.c
+7
-7
msg16.c
dlls/user/msg16.c
+4
-4
property.c
dlls/user/property.c
+2
-1
wnd16.c
dlls/user/wnd16.c
+28
-28
dga2.c
dlls/x11drv/dga2.c
+1
-1
event.c
dlls/x11drv/event.c
+2
-2
win.h
include/win.h
+2
-4
dialog.c
windows/dialog.c
+4
-4
hook.c
windows/hook.c
+7
-7
mdi.c
windows/mdi.c
+3
-3
message.c
windows/message.c
+5
-3
spy.c
windows/spy.c
+7
-7
struct32.c
windows/struct32.c
+4
-4
win.c
windows/win.c
+8
-7
winhelp.c
windows/winhelp.c
+1
-1
winproc.c
windows/winproc.c
+14
-14
No files found.
controls/listbox.c
View file @
2247af32
...
...
@@ -32,6 +32,7 @@
#include "user.h"
#include "controls.h"
#include "wine/debug.h"
#include "win.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
listbox
);
WINE_DECLARE_DEBUG_CHANNEL
(
combo
);
...
...
@@ -106,7 +107,7 @@ typedef struct
#define SEND_NOTIFICATION(hwnd,descr,code) \
(SendMessageW( (descr)->owner, WM_COMMAND, \
MAKEWPARAM( GetWindowLongA((hwnd),GWL_ID), (code)), (hwnd) ))
MAKEWPARAM( GetWindowLongA((hwnd),GWL_ID), (code)), (
LPARAM)(
hwnd) ))
#define ISWIN31 (LOWORD(GetVersion()) == 0x0a03)
...
...
@@ -2351,7 +2352,7 @@ static LRESULT LISTBOX_HandleChar( HWND hwnd, LB_DESCR *descr, WCHAR charW )
{
caret
=
SendMessageW
(
descr
->
owner
,
WM_CHARTOITEM
,
MAKEWPARAM
(
charW
,
descr
->
focus_item
),
hwnd
);
(
LPARAM
)
hwnd
);
if
(
caret
==
-
2
)
return
0
;
}
if
(
caret
==
-
1
)
...
...
@@ -3012,7 +3013,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
LPDRAGINFO16
dragInfo
=
MapSL
(
lParam
);
dragInfo
->
l
=
LISTBOX_GetItemFromPoint
(
descr
,
dragInfo
->
pt
.
x
,
dragInfo
->
pt
.
y
);
return
SendMessage16
(
descr
->
owner
,
msg
,
wParam
,
lParam
);
return
SendMessage16
(
HWND_16
(
descr
->
owner
)
,
msg
,
wParam
,
lParam
);
}
break
;
...
...
controls/static.c
View file @
2247af32
...
...
@@ -417,7 +417,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
dis
.
itemData
=
0
;
GetClientRect
(
hwnd
,
&
dis
.
rcItem
);
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
hwnd
);
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
(
LPARAM
)
hwnd
);
SendMessageW
(
GetParent
(
hwnd
),
WM_DRAWITEM
,
id
,
(
LPARAM
)
&
dis
);
}
...
...
@@ -465,9 +465,11 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
if
((
style
&
SS_NOPREFIX
)
||
((
style
&
SS_TYPEMASK
)
!=
SS_SIMPLE
))
{
hBrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
hwnd
);
hBrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
(
LPARAM
)
hwnd
);
if
(
!
hBrush
)
/* did the app forget to call defwindowproc ? */
hBrush
=
DefWindowProcW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
hwnd
);
hBrush
=
DefWindowProcW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
(
LPARAM
)
hwnd
);
FillRect
(
hdc
,
&
rc
,
hBrush
);
}
if
(
!
IsWindowEnabled
(
hwnd
))
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
));
...
...
@@ -526,7 +528,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
HICON
hIcon
;
GetClientRect
(
hwnd
,
&
rc
);
hbrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
hwnd
);
hbrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
(
LPARAM
)
hwnd
);
FillRect
(
hdc
,
&
rc
,
hbrush
);
if
((
hIcon
=
GetWindowLongA
(
hwnd
,
HICON_GWL_OFFSET
)))
DrawIcon
(
hdc
,
rc
.
left
,
rc
.
top
,
hIcon
);
...
...
@@ -541,7 +543,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
HBITMAP
oldbitmap
;
GetClientRect
(
hwnd
,
&
rc
);
hbrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
hwnd
);
hbrush
=
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSTATIC
,
hdc
,
(
LPARAM
)
hwnd
);
FillRect
(
hdc
,
&
rc
,
hbrush
);
if
((
hIcon
=
GetWindowLongA
(
hwnd
,
HICON_GWL_OFFSET
)))
...
...
dlls/user/dde/client.c
View file @
2247af32
...
...
@@ -355,7 +355,7 @@ static WDML_QUEUE_STATE WDML_HandleAdviseReply(WDML_CONV* pConv, MSG* msg, WDML_
UINT
uiLo
,
uiHi
;
HSZ
hsz
;
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
{
return
WDML_QS_PASS
;
}
...
...
@@ -440,7 +440,7 @@ static WDML_QUEUE_STATE WDML_HandleUnadviseReply(WDML_CONV* pConv, MSG* msg, WDM
UINT
uiLo
,
uiHi
;
HSZ
hsz
;
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
{
return
WDML_QS_PASS
;
}
...
...
@@ -512,7 +512,7 @@ static WDML_QUEUE_STATE WDML_HandleRequestReply(WDML_CONV* pConv, MSG* msg, WDML
UINT
uiLo
,
uiHi
;
HSZ
hsz
;
if
(
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
return
WDML_QS_PASS
;
switch
(
msg
->
message
)
...
...
@@ -674,7 +674,7 @@ static WDML_QUEUE_STATE WDML_HandleExecuteReply(WDML_CONV* pConv, MSG* msg, WDML
DDEACK
ddeAck
;
UINT
uiLo
,
uiHi
;
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
msg
->
message
!=
WM_DDE_ACK
||
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
{
return
WDML_QS_PASS
;
}
...
...
@@ -751,7 +751,7 @@ static WDML_QUEUE_STATE WDML_HandlePokeReply(WDML_CONV* pConv, MSG* msg, WDML_XA
UINT
uiLo
,
uiHi
;
HSZ
hsz
;
if
(
msg
->
message
!=
WM_DDE_ACK
&&
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
msg
->
message
!=
WM_DDE_ACK
&&
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
{
return
WDML_QS_PASS
;
}
...
...
@@ -804,7 +804,7 @@ static WDML_QUEUE_STATE WDML_HandleTerminateReply(WDML_CONV* pConv, MSG* msg, WD
return
WDML_QS_SWALLOWED
;
}
if
(
WIN_GetFullHandle
(
msg
->
wParam
)
!=
pConv
->
hwndServer
)
if
(
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
)
!=
pConv
->
hwndServer
)
{
FIXME
(
"hmmm shouldn't happen
\n
"
);
return
WDML_QS_PASS
;
...
...
@@ -891,7 +891,7 @@ static WDML_QUEUE_STATE WDML_HandleIncomingData(WDML_CONV* pConv, MSG* msg, HDDE
*/
static
WDML_QUEUE_STATE
WDML_HandleIncomingTerminate
(
WDML_CONV
*
pConv
,
MSG
*
msg
,
HDDEDATA
*
hdd
)
{
if
(
pConv
->
hwndServer
!=
WIN_GetFullHandle
(
msg
->
wParam
))
if
(
pConv
->
hwndServer
!=
WIN_GetFullHandle
(
(
HWND
)
msg
->
wParam
))
return
WDML_QS_PASS
;
pConv
->
wStatus
|=
ST_TERMINATED
;
...
...
dlls/user/msg16.c
View file @
2247af32
...
...
@@ -166,7 +166,7 @@ BOOL16 WINAPI PeekMessage32_16( MSG32_16 *msg16, HWND16 hwnd16,
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
1
,
0
,
MWMO_ALERTABLE
);
if
(
!
PeekMessageW
(
&
msg
,
hwnd
,
first
,
last
,
flags
))
return
FALSE
;
msg16
->
msg
.
hwnd
=
WIN_Handle
16
(
msg
.
hwnd
);
msg16
->
msg
.
hwnd
=
HWND_
16
(
msg
.
hwnd
);
msg16
->
msg
.
lParam
=
msg
.
lParam
;
msg16
->
msg
.
time
=
msg
.
time
;
msg16
->
msg
.
pt
.
x
=
(
INT16
)
msg
.
pt
.
x
;
...
...
@@ -203,7 +203,7 @@ BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd16, UINT16 first,
if
(
USER16_AlertableWait
)
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
INFINITE
,
0
,
MWMO_ALERTABLE
);
GetMessageW
(
&
msg
,
hwnd
,
first
,
last
);
msg16
->
msg
.
hwnd
=
WIN_Handle
16
(
msg
.
hwnd
);
msg16
->
msg
.
hwnd
=
HWND_
16
(
msg
.
hwnd
);
msg16
->
msg
.
lParam
=
msg
.
lParam
;
msg16
->
msg
.
time
=
msg
.
time
;
msg16
->
msg
.
pt
.
x
=
(
INT16
)
msg
.
pt
.
x
;
...
...
@@ -281,14 +281,14 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
}
}
if
(
!
(
wndPtr
=
WIN_GetPtr
(
msg
->
hwnd
)))
if
(
!
(
wndPtr
=
WIN_GetPtr
(
HWND_32
(
msg
->
hwnd
)
)))
{
if
(
msg
->
hwnd
)
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
0
;
}
if
(
wndPtr
==
WND_OTHER_PROCESS
)
{
if
(
IsWindow
(
msg
->
hwnd
))
if
(
IsWindow
16
(
msg
->
hwnd
))
ERR
(
"cannot dispatch msg to other process window %x
\n
"
,
msg
->
hwnd
);
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
0
;
...
...
dlls/user/property.c
View file @
2247af32
...
...
@@ -24,6 +24,7 @@
#include "wingdi.h"
#include "wine/winuser16.h"
#include "wine/server.h"
#include "win.h"
/* size of buffer needed to store an atom string */
#define ATOM_BUFFER_SIZE 256
...
...
@@ -298,7 +299,7 @@ INT WINAPI EnumPropsExW(HWND hwnd, PROPENUMPROCEXW func, LPARAM lParam)
INT16
WINAPI
EnumProps16
(
HWND16
hwnd
,
PROPENUMPROC16
func
)
{
int
ret
=
-
1
,
i
,
count
;
property_data_t
*
list
=
get_properties
(
hwnd
,
&
count
);
property_data_t
*
list
=
get_properties
(
HWND_32
(
hwnd
)
,
&
count
);
if
(
list
)
{
...
...
dlls/user/wnd16.c
View file @
2247af32
...
...
@@ -40,7 +40,7 @@ struct wnd_enum_info
static
BOOL
CALLBACK
wnd_enum_callback
(
HWND
hwnd
,
LPARAM
param
)
{
const
struct
wnd_enum_info
*
info
=
(
struct
wnd_enum_info
*
)
param
;
return
WIN_CallTo16_word_wl
(
info
->
proc
,
hwnd
,
info
->
param
);
return
WIN_CallTo16_word_wl
(
info
->
proc
,
HWND_16
(
hwnd
)
,
info
->
param
);
}
/* convert insert after window handle to 32-bit */
...
...
@@ -74,7 +74,7 @@ BOOL16 WINAPI KillTimer16( HWND16 hwnd, UINT16 id )
*/
HWND16
WINAPI
SetCapture16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
SetCapture
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
SetCapture
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -92,7 +92,7 @@ BOOL16 WINAPI ReleaseCapture16(void)
*/
HWND16
WINAPI
SetFocus16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
SetFocus
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
SetFocus
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -101,7 +101,7 @@ HWND16 WINAPI SetFocus16( HWND16 hwnd )
*/
HWND16
WINAPI
GetFocus16
(
void
)
{
return
WIN_Handle
16
(
GetFocus
()
);
return
HWND_
16
(
GetFocus
()
);
}
...
...
@@ -158,7 +158,7 @@ HWND16 WINAPI WindowFromPoint16( POINT16 pt )
POINT
pt32
;
CONV_POINT16TO32
(
&
pt
,
&
pt32
);
return
WIN_Handle
16
(
WindowFromPoint
(
pt32
)
);
return
HWND_
16
(
WindowFromPoint
(
pt32
)
);
}
...
...
@@ -319,7 +319,7 @@ BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd )
*/
HWND16
WINAPI
GetParent16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
GetParent
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
GetParent
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -357,7 +357,7 @@ BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd )
*/
HWND16
WINAPI
FindWindow16
(
LPCSTR
className
,
LPCSTR
title
)
{
return
WIN_Handle
16
(
FindWindowA
(
className
,
title
));
return
HWND_
16
(
FindWindowA
(
className
,
title
));
}
...
...
@@ -419,7 +419,7 @@ INT16 WINAPI GetClassName16( HWND16 hwnd, LPSTR buffer, INT16 count )
*/
HWND16
WINAPI
SetActiveWindow16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
SetActiveWindow
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
SetActiveWindow
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -428,7 +428,7 @@ HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
*/
HWND16
WINAPI
GetActiveWindow16
(
void
)
{
return
WIN_Handle
16
(
GetActiveWindow
()
);
return
HWND_
16
(
GetActiveWindow
()
);
}
...
...
@@ -530,7 +530,7 @@ BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
*/
HWND16
WINAPI
GetDlgItem16
(
HWND16
hwndDlg
,
INT16
id
)
{
return
WIN_Handle
16
(
GetDlgItem
(
WIN_Handle32
(
hwndDlg
),
(
UINT16
)
id
));
return
HWND_
16
(
GetDlgItem
(
WIN_Handle32
(
hwndDlg
),
(
UINT16
)
id
));
}
...
...
@@ -679,7 +679,7 @@ BOOL16 WINAPI FlashWindow16( HWND16 hwnd, BOOL16 bInvert )
*/
HWND16
WINAPI
WindowFromDC16
(
HDC16
hDC
)
{
return
WIN_Handle
16
(
WindowFromDC
(
hDC
)
);
return
HWND_
16
(
WindowFromDC
(
hDC
)
);
}
...
...
@@ -778,7 +778,7 @@ BOOL16 WINAPI OpenClipboard16( HWND16 hwnd )
*/
HWND16
WINAPI
GetClipboardOwner16
(
void
)
{
return
WIN_Handle
16
(
GetClipboardOwner
()
);
return
HWND_
16
(
GetClipboardOwner
()
);
}
...
...
@@ -787,7 +787,7 @@ HWND16 WINAPI GetClipboardOwner16(void)
*/
HWND16
WINAPI
SetClipboardViewer16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
SetClipboardViewer
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
SetClipboardViewer
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -796,7 +796,7 @@ HWND16 WINAPI SetClipboardViewer16( HWND16 hwnd )
*/
HWND16
WINAPI
GetClipboardViewer16
(
void
)
{
return
WIN_Handle
16
(
GetClipboardViewer
()
);
return
HWND_
16
(
GetClipboardViewer
()
);
}
...
...
@@ -950,7 +950,7 @@ HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
{
POINT
pt32
;
CONV_POINT16TO32
(
&
pt
,
&
pt32
);
return
WIN_Handle
16
(
ChildWindowFromPoint
(
WIN_Handle32
(
hwndParent
),
pt32
));
return
HWND_
16
(
ChildWindowFromPoint
(
WIN_Handle32
(
hwndParent
),
pt32
));
}
...
...
@@ -994,7 +994,7 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func, LPARAM lPara
HWND16
WINAPI
GetNextDlgGroupItem16
(
HWND16
hwndDlg
,
HWND16
hwndCtrl
,
BOOL16
fPrevious
)
{
return
WIN_Handle
16
(
GetNextDlgGroupItem
(
WIN_Handle32
(
hwndDlg
),
return
HWND_
16
(
GetNextDlgGroupItem
(
WIN_Handle32
(
hwndDlg
),
WIN_Handle32
(
hwndCtrl
),
fPrevious
));
}
...
...
@@ -1005,7 +1005,7 @@ HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
HWND16
WINAPI
GetNextDlgTabItem16
(
HWND16
hwndDlg
,
HWND16
hwndCtrl
,
BOOL16
fPrevious
)
{
return
WIN_Handle
16
(
GetNextDlgTabItem
(
WIN_Handle32
(
hwndDlg
),
return
HWND_
16
(
GetNextDlgTabItem
(
WIN_Handle32
(
hwndDlg
),
WIN_Handle32
(
hwndCtrl
),
fPrevious
));
}
...
...
@@ -1015,7 +1015,7 @@ HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
*/
HWND16
WINAPI
GetTopWindow16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
GetTopWindow
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
GetTopWindow
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -1045,7 +1045,7 @@ BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
*/
HWND16
WINAPI
SetParent16
(
HWND16
hwndChild
,
HWND16
hwndNewParent
)
{
return
WIN_Handle
16
(
SetParent
(
WIN_Handle32
(
hwndChild
),
WIN_Handle32
(
hwndNewParent
)
));
return
HWND_
16
(
SetParent
(
WIN_Handle32
(
hwndChild
),
WIN_Handle32
(
hwndNewParent
)
));
}
...
...
@@ -1054,7 +1054,7 @@ HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
*/
HWND16
WINAPI
GetCapture16
(
void
)
{
return
WIN_Handle
16
(
GetCapture
()
);
return
HWND_
16
(
GetCapture
()
);
}
...
...
@@ -1081,7 +1081,7 @@ INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd )
*/
HWND16
WINAPI
GetOpenClipboardWindow16
(
void
)
{
return
WIN_Handle
16
(
GetOpenClipboardWindow
()
);
return
HWND_
16
(
GetOpenClipboardWindow
()
);
}
...
...
@@ -1120,7 +1120,7 @@ BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp )
*/
HWND16
WINAPI
GetWindow16
(
HWND16
hwnd
,
WORD
rel
)
{
return
WIN_Handle
16
(
GetWindow
(
WIN_Handle32
(
hwnd
),
rel
)
);
return
HWND_
16
(
GetWindow
(
WIN_Handle32
(
hwnd
),
rel
)
);
}
...
...
@@ -1186,7 +1186,7 @@ BOOL16 WINAPI SetSystemMenu16( HWND16 hwnd, HMENU16 hMenu )
*/
HWND16
WINAPI
GetDesktopWindow16
(
void
)
{
return
WIN_Handle
16
(
GetDesktopWindow
()
);
return
HWND_
16
(
GetDesktopWindow
()
);
}
...
...
@@ -1195,7 +1195,7 @@ HWND16 WINAPI GetDesktopWindow16(void)
*/
HWND16
WINAPI
GetLastActivePopup16
(
HWND16
hwnd
)
{
return
WIN_Handle
16
(
GetLastActivePopup
(
WIN_Handle32
(
hwnd
)
));
return
HWND_
16
(
GetLastActivePopup
(
WIN_Handle32
(
hwnd
)
));
}
...
...
@@ -1353,7 +1353,7 @@ HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uF
{
POINT
pt32
;
CONV_POINT16TO32
(
&
pt
,
&
pt32
);
return
WIN_Handle
16
(
ChildWindowFromPointEx
(
WIN_Handle32
(
hwndParent
),
pt32
,
uFlags
));
return
HWND_
16
(
ChildWindowFromPointEx
(
WIN_Handle32
(
hwndParent
),
pt32
,
uFlags
));
}
...
...
@@ -1407,7 +1407,7 @@ BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
*/
HWND16
WINAPI
FindWindowEx16
(
HWND16
parent
,
HWND16
child
,
LPCSTR
className
,
LPCSTR
title
)
{
return
WIN_Handle
16
(
FindWindowExA
(
WIN_Handle32
(
parent
),
WIN_Handle32
(
child
),
return
HWND_
16
(
FindWindowExA
(
WIN_Handle32
(
parent
),
WIN_Handle32
(
child
),
className
,
title
));
}
...
...
@@ -1517,7 +1517,7 @@ BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
*/
HWND16
WINAPI
GetShellWindow16
(
void
)
{
return
WIN_Handle
16
(
GetShellWindow
()
);
return
HWND_
16
(
GetShellWindow
()
);
}
...
...
@@ -1526,7 +1526,7 @@ HWND16 WINAPI GetShellWindow16(void)
*/
HWND16
WINAPI
GetForegroundWindow16
(
void
)
{
return
WIN_Handle
16
(
GetForegroundWindow
()
);
return
HWND_
16
(
GetForegroundWindow
()
);
}
...
...
dlls/x11drv/dga2.c
View file @
2247af32
...
...
@@ -143,7 +143,7 @@ static DWORD PASCAL X11DRV_XF86DGA2_SetMode(LPDDHAL_SETMODEDATA data)
KeyPressMask
|
KeyReleaseMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
);
X11DRV_EVENT_SetDGAStatus
(
ddlocal
->
hWnd
,
dga_event
);
X11DRV_EVENT_SetDGAStatus
(
(
HWND
)
ddlocal
->
hWnd
,
dga_event
);
X11DRV_EVENT_SetInputMethod
(
X11DRV_INPUT_RELATIVE
);
}
dga_dev
=
new_dev
;
...
...
dlls/x11drv/event.c
View file @
2247af32
...
...
@@ -1058,7 +1058,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
&
x
,
&
y
,
(
int
*
)
&
u
.
pt_aux
.
x
,
(
int
*
)
&
u
.
pt_aux
.
y
,
(
unsigned
int
*
)
&
aux_long
);
lpDragInfo
->
hScope
=
hWnd
;
lpDragInfo
->
hScope
=
HWND_16
(
hWnd
)
;
lpDragInfo
->
pt
.
x
=
(
INT16
)
x
;
lpDragInfo
->
pt
.
y
=
(
INT16
)
y
;
/* find out drop point and drop window */
...
...
@@ -1110,7 +1110,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
if
(
lpDrop
)
{
WND
*
pDropWnd
=
WIN_FindWndPtr
(
lpDragInfo
->
hScope
);
WND
*
pDropWnd
=
WIN_FindWndPtr
(
HWND_32
(
lpDragInfo
->
hScope
)
);
lpDrop
->
pFiles
=
sizeof
(
DROPFILES
);
lpDrop
->
pt
.
x
=
x
;
lpDrop
->
pt
.
y
=
y
;
...
...
include/win.h
View file @
2247af32
...
...
@@ -121,10 +121,8 @@ inline static HWND WIN_GetFullHandle( HWND hwnd )
return
hwnd
;
}
inline
static
HWND16
WIN_Handle16
(
HWND
hwnd
)
{
return
LOWORD
(
hwnd
);
}
#define HWND_16(hwnd32) (LOWORD(hwnd32))
#define HWND_32(hwnd16) ((HWND)(ULONG_PTR)(hwnd16))
inline
static
WND
*
WIN_FindWndPtr16
(
HWND16
hwnd
)
{
...
...
windows/dialog.c
View file @
2247af32
...
...
@@ -452,7 +452,7 @@ static BOOL DIALOG_CreateControls( HWND hwnd, LPCSTR template, const DLG_TEMPLAT
MulDiv
(
info
.
y
,
dlgInfo
->
yBaseUnit
,
8
),
MulDiv
(
info
.
cx
,
dlgInfo
->
xBaseUnit
,
4
),
MulDiv
(
info
.
cy
,
dlgInfo
->
yBaseUnit
,
8
),
WIN_Handle
16
(
hwnd
),
(
HMENU16
)
info
.
id
,
HWND_
16
(
hwnd
),
(
HMENU16
)
info
.
id
,
instance
,
(
LPVOID
)
segptr
));
UnMapLS
(
segptr
);
}
...
...
@@ -812,7 +812,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
hwnd
=
WIN_Handle32
(
CreateWindowEx16
(
template
.
exStyle
,
template
.
className
,
template
.
caption
,
template
.
style
&
~
WS_VISIBLE
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
,
WIN_Handle
16
(
owner
),
dlgInfo
->
hMenu
,
hInst
,
NULL
));
HWND_
16
(
owner
),
dlgInfo
->
hMenu
,
hInst
,
NULL
));
else
hwnd
=
CreateWindowExW
(
template
.
exStyle
,
(
LPCWSTR
)
template
.
className
,
(
LPCWSTR
)
template
.
caption
,
...
...
@@ -836,7 +836,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
SetWindowLongW
(
hwnd
,
DWL_WINE_DIALOGINFO
,
(
LONG
)
dlgInfo
);
switch
(
procType
)
{
case
WIN_PROC_16
:
SetWindowLong16
(
WIN_Handle
16
(
hwnd
),
DWL_DLGPROC
,
(
LONG
)
dlgProc
);
break
;
case
WIN_PROC_16
:
SetWindowLong16
(
HWND_
16
(
hwnd
),
DWL_DLGPROC
,
(
LONG
)
dlgProc
);
break
;
case
WIN_PROC_32A
:
SetWindowLongA
(
hwnd
,
DWL_DLGPROC
,
(
LONG
)
dlgProc
);
break
;
case
WIN_PROC_32W
:
SetWindowLongW
(
hwnd
,
DWL_DLGPROC
,
(
LONG
)
dlgProc
);
break
;
default:
break
;
...
...
@@ -973,7 +973,7 @@ HWND16 WINAPI CreateDialogIndirectParam16( HINSTANCE16 hInst,
HWND16
owner
,
DLGPROC16
dlgProc
,
LPARAM
param
)
{
return
WIN_Handle
16
(
DIALOG_CreateIndirect
(
hInst
,
dlgTemplate
,
WIN_Handle32
(
owner
),
return
HWND_
16
(
DIALOG_CreateIndirect
(
hInst
,
dlgTemplate
,
WIN_Handle32
(
owner
),
(
DLGPROC
)
dlgProc
,
param
,
WIN_PROC_16
,
FALSE
));
}
...
...
windows/hook.c
View file @
2247af32
...
...
@@ -189,7 +189,7 @@ static LRESULT call_hook_16_to_32( HOOKPROC proc, INT id, INT code, WPARAM wpara
cs32
.
lpszClass
=
MapSL
(
cs16
->
lpszClass
);
ret
=
proc
(
code
,
wparam
,
(
LPARAM
)
&
cbtcw32
);
}
cbtcw16
->
hwndInsertAfter
=
WIN_Handle
16
(
cbtcw32
.
hwndInsertAfter
);
cbtcw16
->
hwndInsertAfter
=
HWND_
16
(
cbtcw32
.
hwndInsertAfter
);
break
;
}
case
HCBT_ACTIVATE
:
...
...
@@ -338,7 +338,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
CWPSTRUCT16
cwp16
;
MSGPARAM16
mp16
;
cwp16
.
hwnd
=
WIN_Handle
16
(
cwp32
->
hwnd
);
cwp16
.
hwnd
=
HWND_
16
(
cwp32
->
hwnd
);
cwp16
.
lParam
=
cwp32
->
lParam
;
if
(
unicode
)
...
...
@@ -375,7 +375,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
STRUCT32_CREATESTRUCT32Ato16
(
cbtcw32
->
lpcs
,
&
cs16
);
cbtcw16
.
lpcs
=
(
CREATESTRUCT16
*
)
MapLS
(
&
cs16
);
cbtcw16
.
hwndInsertAfter
=
WIN_Handle
16
(
cbtcw32
->
hwndInsertAfter
);
cbtcw16
.
hwndInsertAfter
=
HWND_
16
(
cbtcw32
->
hwndInsertAfter
);
lparam
=
MapLS
(
&
cbtcw16
);
if
(
unicode
)
...
...
@@ -406,7 +406,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
CBTACTIVATESTRUCT16
cas16
;
cas16
.
fMouse
=
cas32
->
fMouse
;
cas16
.
hWndActive
=
WIN_Handle
16
(
cas32
->
hWndActive
);
cas16
.
hWndActive
=
HWND_
16
(
cas32
->
hWndActive
);
lparam
=
MapLS
(
&
cas16
);
ret
=
call_hook_16
(
proc
,
id
,
code
,
wparam
,
lparam
);
...
...
@@ -420,7 +420,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
ms16
.
pt
.
x
=
ms32
->
pt
.
x
;
ms16
.
pt
.
y
=
ms32
->
pt
.
y
;
ms16
.
hwnd
=
WIN_Handle
16
(
ms32
->
hwnd
);
ms16
.
hwnd
=
HWND_
16
(
ms32
->
hwnd
);
ms16
.
wHitTestCode
=
ms32
->
wHitTestCode
;
ms16
.
dwExtraInfo
=
ms32
->
dwExtraInfo
;
...
...
@@ -450,7 +450,7 @@ static LRESULT call_hook_32_to_16( HOOKPROC16 proc, INT id, INT code, WPARAM wpa
ms16
.
pt
.
x
=
ms32
->
pt
.
x
;
ms16
.
pt
.
y
=
ms32
->
pt
.
y
;
ms16
.
hwnd
=
WIN_Handle
16
(
ms32
->
hwnd
);
ms16
.
hwnd
=
HWND_
16
(
ms32
->
hwnd
);
ms16
.
wHitTestCode
=
ms32
->
wHitTestCode
;
ms16
.
dwExtraInfo
=
ms32
->
dwExtraInfo
;
...
...
@@ -1099,7 +1099,7 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam
ret
=
(
BOOL16
)
CallMsgFilterA
(
&
msg32
,
(
INT
)
code
);
lpmsg16_32
->
msg
.
hwnd
=
WIN_Handle
16
(
msg32
.
hwnd
);
lpmsg16_32
->
msg
.
hwnd
=
HWND_
16
(
msg32
.
hwnd
);
lpmsg16_32
->
msg
.
message
=
msg32
.
message
;
lpmsg16_32
->
msg
.
wParam
=
LOWORD
(
msg32
.
wParam
);
lpmsg16_32
->
msg
.
lParam
=
msg32
.
lParam
;
...
...
windows/mdi.c
View file @
2247af32
...
...
@@ -566,7 +566,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
seg_cs16
=
MapLS
(
&
cs16
);
hwnd
=
WIN_Handle32
(
CreateWindow16
(
cs
->
szClass
,
cs
->
szTitle
,
style
,
cs16
.
x
,
cs16
.
y
,
cs16
.
cx
,
cs16
.
cy
,
WIN_Handle
16
(
parent
),
(
HMENU
)
wIDmenu
,
HWND_
16
(
parent
),
(
HMENU
)
wIDmenu
,
cs16
.
hOwner
,
(
LPVOID
)
seg_cs16
));
UnMapLS
(
seg_cs16
);
UnMapLS
(
title
);
...
...
@@ -1447,7 +1447,7 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
MDINEXTMENU
next_menu
;
DefFrameProcW
(
WIN_Handle32
(
hwnd
),
WIN_Handle32
(
hwndMDIClient
),
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
WIN_Handle
16
(
next_menu
.
hwndNext
)
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
HWND_
16
(
next_menu
.
hwndNext
)
);
}
default:
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -1614,7 +1614,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
{
MDINEXTMENU
next_menu
;
DefMDIChildProcW
(
WIN_Handle32
(
hwnd
),
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
WIN_Handle
16
(
next_menu
.
hwndNext
)
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
HWND_
16
(
next_menu
.
hwndNext
)
);
}
default:
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
windows/message.c
View file @
2247af32
...
...
@@ -499,7 +499,8 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
if
((
hittest
==
HTERROR
)
||
(
hittest
==
HTNOWHERE
))
{
SendMessageA
(
msg
->
hwnd
,
WM_SETCURSOR
,
msg
->
hwnd
,
MAKELONG
(
hittest
,
raw_message
));
SendMessageA
(
msg
->
hwnd
,
WM_SETCURSOR
,
(
WPARAM
)
msg
->
hwnd
,
MAKELONG
(
hittest
,
raw_message
));
return
FALSE
;
}
...
...
@@ -523,7 +524,7 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
if
(
msg
->
hwnd
!=
GetActiveWindow
()
&&
hwndTop
!=
GetDesktopWindow
())
{
LONG
ret
=
SendMessageA
(
msg
->
hwnd
,
WM_MOUSEACTIVATE
,
hwndTop
,
LONG
ret
=
SendMessageA
(
msg
->
hwnd
,
WM_MOUSEACTIVATE
,
(
WPARAM
)
hwndTop
,
MAKELONG
(
hittest
,
raw_message
)
);
switch
(
ret
)
...
...
@@ -555,7 +556,8 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
/* Windows sends the normal mouse message as the message parameter
in the WM_SETCURSOR message even if it's non-client mouse message */
SendMessageA
(
msg
->
hwnd
,
WM_SETCURSOR
,
msg
->
hwnd
,
MAKELONG
(
hittest
,
raw_message
));
SendMessageA
(
msg
->
hwnd
,
WM_SETCURSOR
,
(
WPARAM
)
msg
->
hwnd
,
MAKELONG
(
hittest
,
raw_message
));
return
!
eatMsg
;
}
...
...
windows/spy.c
View file @
2247af32
...
...
@@ -2256,7 +2256,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
{
case
SPY_DISPATCHMESSAGE16
:
TRACE
(
"%*s(%04x) %-16s message [%04x] %s dispatched wp=%04x lp=%08lx
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
indent
,
""
,
HWND_
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
sp_e
.
msg_name
,
wParam
,
lParam
);
break
;
...
...
@@ -2270,7 +2270,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case
SPY_SENDMESSAGE
:
{
char
taskName
[
30
];
HTASK16
hTask
=
GetWindowTask16
(
WIN_Handle
16
(
hWnd
)
);
HTASK16
hTask
=
GetWindowTask16
(
HWND_
16
(
hWnd
)
);
if
(
hTask
==
GetCurrentTask
())
strcpy
(
taskName
,
"self"
);
else
if
(
!
hTask
)
strcpy
(
taskName
,
"Wine"
);
...
...
@@ -2282,7 +2282,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
if
(
iFlag
==
SPY_SENDMESSAGE16
)
TRACE
(
"%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
indent
,
""
,
HWND_
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
sp_e
.
msg_name
,
taskName
,
wParam
,
lParam
);
else
{
TRACE
(
"%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx
\n
"
,
...
...
@@ -2296,7 +2296,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
case
SPY_DEFWNDPROC16
:
if
(
SPY_ExcludeDWP
)
return
;
TRACE
(
"%*s(%04x) DefWindowProc16: %s [%04x] wp=%04x lp=%08lx
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
sp_e
.
msg_name
,
msg
,
wParam
,
lParam
);
indent
,
""
,
HWND_
16
(
hWnd
),
sp_e
.
msg_name
,
msg
,
wParam
,
lParam
);
break
;
case
SPY_DEFWNDPROC
:
...
...
@@ -2340,7 +2340,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
{
case
SPY_RESULT_DEFWND16
:
TRACE
(
" %*s(%04x) DefWindowProc16: %s [%04x] returned %08lx
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
sp_e
.
msg_name
,
msg
,
lReturn
);
indent
,
""
,
HWND_
16
(
hWnd
),
sp_e
.
msg_name
,
msg
,
lReturn
);
break
;
case
SPY_RESULT_DEFWND
:
...
...
@@ -2350,7 +2350,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
case
SPY_RESULT_OK16
:
TRACE
(
" %*s(%04x) %-16s message [%04x] %s returned %08lx
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
indent
,
""
,
HWND_
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
sp_e
.
msg_name
,
lReturn
);
break
;
...
...
@@ -2363,7 +2363,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
case
SPY_RESULT_INVALIDHWND16
:
WARN
(
" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND
\n
"
,
indent
,
""
,
WIN_Handle
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
sp_e
.
msg_name
);
indent
,
""
,
HWND_
16
(
hWnd
),
debugstr_w
(
sp_e
.
wnd_name
),
msg
,
sp_e
.
msg_name
);
break
;
case
SPY_RESULT_INVALIDHWND
:
...
...
windows/struct32.c
View file @
2247af32
...
...
@@ -35,7 +35,7 @@ void STRUCT32_MSG16to32(const MSG16 *msg16,MSG *msg32)
void
STRUCT32_MSG32to16
(
const
MSG
*
msg32
,
MSG16
*
msg16
)
{
msg16
->
hwnd
=
WIN_Handle
16
(
msg32
->
hwnd
);
msg16
->
hwnd
=
HWND_
16
(
msg32
->
hwnd
);
msg16
->
message
=
msg32
->
message
;
msg16
->
wParam
=
msg32
->
wParam
;
msg16
->
lParam
=
msg32
->
lParam
;
...
...
@@ -64,8 +64,8 @@ void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16 *from, MINMAXINFO *to )
void
STRUCT32_WINDOWPOS32to16
(
const
WINDOWPOS
*
from
,
WINDOWPOS16
*
to
)
{
to
->
hwnd
=
WIN_Handle
16
(
from
->
hwnd
);
to
->
hwndInsertAfter
=
WIN_Handle
16
(
from
->
hwndInsertAfter
);
to
->
hwnd
=
HWND_
16
(
from
->
hwnd
);
to
->
hwndInsertAfter
=
HWND_
16
(
from
->
hwndInsertAfter
);
to
->
x
=
from
->
x
;
to
->
y
=
from
->
y
;
to
->
cx
=
from
->
cx
;
...
...
@@ -92,7 +92,7 @@ void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCTA* from,
to
->
lpCreateParams
=
from
->
lpCreateParams
;
to
->
hInstance
=
(
HINSTANCE16
)
from
->
hInstance
;
to
->
hMenu
=
(
HMENU16
)
from
->
hMenu
;
to
->
hwndParent
=
WIN_Handle
16
(
from
->
hwndParent
);
to
->
hwndParent
=
HWND_
16
(
from
->
hwndParent
);
to
->
cy
=
from
->
cy
;
to
->
cx
=
from
->
cx
;
to
->
y
=
from
->
y
;
...
...
windows/win.c
View file @
2247af32
...
...
@@ -1254,7 +1254,7 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
cs
.
lpszClass
=
className
;
cs
.
dwExStyle
=
exStyle
;
return
WIN_Handle
16
(
WIN_CreateWindowEx
(
&
cs
,
classAtom
,
WIN_PROC_16
));
return
HWND_
16
(
WIN_CreateWindowEx
(
&
cs
,
classAtom
,
WIN_PROC_16
));
}
...
...
@@ -2528,7 +2528,7 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
}
if
(
!
(
full_handle
=
WIN_IsCurrentThread
(
hwnd
)))
return
SendMessageW
(
hwnd
,
WM_WINE_SETPARENT
,
(
WPARAM
)
parent
,
0
);
return
(
HWND
)
SendMessageW
(
hwnd
,
WM_WINE_SETPARENT
,
(
WPARAM
)
parent
,
0
);
hwnd
=
full_handle
;
...
...
@@ -3167,12 +3167,13 @@ BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend )
}
else
wParam
=
1
;
ScreenToClient16
(
hQueryWnd
,
&
ptrDragInfo
->
pt
);
ScreenToClient16
(
HWND_16
(
hQueryWnd
)
,
&
ptrDragInfo
->
pt
);
ptrDragInfo
->
hScope
=
hQueryWnd
;
ptrDragInfo
->
hScope
=
HWND_16
(
hQueryWnd
)
;
if
(
bNoSend
)
bResult
=
(
GetWindowLongA
(
hQueryWnd
,
GWL_EXSTYLE
)
&
WS_EX_ACCEPTFILES
)
!=
0
;
else
bResult
=
SendMessage16
(
hQueryWnd
,
WM_QUERYDROPOBJECT
,
(
WPARAM16
)
wParam
,
spDragInfo
);
else
bResult
=
SendMessage16
(
HWND_16
(
hQueryWnd
),
WM_QUERYDROPOBJECT
,
(
WPARAM16
)
wParam
,
spDragInfo
);
if
(
!
bResult
)
CONV_POINT32TO16
(
&
pt
,
&
ptrDragInfo
->
pt
);
...
...
@@ -3256,7 +3257,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
lpDragInfo
->
hOfStruct
=
hOfStruct
;
lpDragInfo
->
l
=
0L
;
SetCapture
(
hWnd
);
SetCapture
(
WIN_Handle32
(
hWnd
)
);
ShowCursor
(
TRUE
);
do
...
...
@@ -3271,7 +3272,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
/* update DRAGINFO struct */
TRACE_
(
msg
)(
"lpDI->hScope = %04x
\n
"
,
lpDragInfo
->
hScope
);
if
(
DRAG_QueryUpdate
(
hwndScope
,
spDragInfo
,
FALSE
)
>
0
)
if
(
DRAG_QueryUpdate
(
WIN_Handle32
(
hwndScope
)
,
spDragInfo
,
FALSE
)
>
0
)
hCurrentCursor
=
hCursor
;
else
{
...
...
windows/winhelp.c
View file @
2247af32
...
...
@@ -156,7 +156,7 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand,
}
else
lpwh
->
ofsData
=
0
;
GlobalUnlock16
(
hwh
);
return
SendMessage16
(
hDest
,
WM_WINHELP
,
hWnd
,
hwh
);
return
SendMessage16
(
HWND_16
(
hDest
),
WM_WINHELP
,
HWND_16
(
hWnd
)
,
hwh
);
}
...
...
windows/winproc.c
View file @
2247af32
...
...
@@ -1364,7 +1364,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
case
WM_DDE_TERMINATE
:
case
WM_DDE_UNADVISE
:
case
WM_DDE_REQUEST
:
*
pwparam32
=
WIN_Handle32
(
wParam16
);
*
pwparam32
=
(
WPARAM
)
WIN_Handle32
(
wParam16
);
return
0
;
case
WM_DDE_ADVISE
:
case
WM_DDE_DATA
:
...
...
@@ -1374,7 +1374,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
ATOM
hi
;
HANDLE
lo32
=
0
;
*
pwparam32
=
WIN_Handle32
(
wParam16
);
*
pwparam32
=
(
WPARAM
)
WIN_Handle32
(
wParam16
);
lo16
=
LOWORD
(
*
plparam
);
hi
=
HIWORD
(
*
plparam
);
if
(
lo16
&&
!
(
lo32
=
convert_handle_16_to_32
(
lo16
,
GMEM_DDESHARE
)))
...
...
@@ -1388,7 +1388,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
int
flag
=
0
;
char
buf
[
2
];
*
pwparam32
=
WIN_Handle32
(
wParam16
);
*
pwparam32
=
(
WPARAM
)
WIN_Handle32
(
wParam16
);
lo
=
LOWORD
(
*
plparam
);
hi
=
HIWORD
(
*
plparam
);
...
...
@@ -1522,7 +1522,7 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case
WM_NEXTMENU
:
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
result
=
MAKELONG
(
next
->
hmenuNext
,
WIN_Handle
16
(
next
->
hwndNext
)
);
result
=
MAKELONG
(
next
->
hmenuNext
,
HWND_
16
(
next
->
hwndNext
)
);
HeapFree
(
GetProcessHeap
(),
0
,
next
);
}
break
;
...
...
@@ -1923,7 +1923,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
if
(
!
cis
)
return
-
1
;
cis
->
CtlType
=
(
UINT16
)
cis32
->
CtlType
;
cis
->
CtlID
=
(
UINT16
)
cis32
->
CtlID
;
cis
->
hwndItem
=
WIN_Handle
16
(
cis32
->
hwndItem
);
cis
->
hwndItem
=
HWND_
16
(
cis32
->
hwndItem
);
cis
->
itemID1
=
(
UINT16
)
cis32
->
itemID1
;
cis
->
itemData1
=
cis32
->
itemData1
;
cis
->
itemID2
=
(
UINT16
)
cis32
->
itemID2
;
...
...
@@ -1940,7 +1940,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
dis
->
CtlID
=
(
UINT16
)
dis32
->
CtlID
;
dis
->
itemID
=
(
UINT16
)
dis32
->
itemID
;
dis
->
hwndItem
=
(
dis
->
CtlType
==
ODT_MENU
)
?
(
HWND16
)
LOWORD
(
dis32
->
hwndItem
)
:
WIN_Handle
16
(
dis32
->
hwndItem
);
:
HWND_
16
(
dis32
->
hwndItem
);
dis
->
itemData
=
dis32
->
itemData
;
*
plparam
=
MapLS
(
dis
);
}
...
...
@@ -1955,7 +1955,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
dis
->
itemID
=
(
UINT16
)
dis32
->
itemID
;
dis
->
itemAction
=
(
UINT16
)
dis32
->
itemAction
;
dis
->
itemState
=
(
UINT16
)
dis32
->
itemState
;
dis
->
hwndItem
=
WIN_Handle
16
(
dis32
->
hwndItem
);
dis
->
hwndItem
=
HWND_
16
(
dis32
->
hwndItem
);
dis
->
hDC
=
(
HDC16
)
dis32
->
hDC
;
dis
->
itemData
=
dis32
->
itemData
;
CONV_RECT32TO16
(
&
dis32
->
rcItem
,
&
dis
->
rcItem
);
...
...
@@ -2038,7 +2038,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
}
else
{
*
pwparam16
=
WIN_Handle
16
(
(
HWND
)
wParam32
);
*
pwparam16
=
HWND_
16
(
(
HWND
)
wParam32
);
*
plparam
=
0
;
}
return
0
;
...
...
@@ -2108,7 +2108,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
LPMSG16
msg16
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MSG16
)
);
if
(
!
msg16
)
return
-
1
;
msg16
->
hwnd
=
WIN_Handle
16
(
msg32
->
hwnd
);
msg16
->
hwnd
=
HWND_
16
(
msg32
->
hwnd
);
msg16
->
lParam
=
msg32
->
lParam
;
msg16
->
time
=
msg32
->
time
;
CONV_POINT32TO16
(
&
msg32
->
pt
,
&
msg16
->
pt
);
...
...
@@ -2148,7 +2148,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_DDE_TERMINATE
:
case
WM_DDE_UNADVISE
:
case
WM_DDE_REQUEST
:
*
pwparam16
=
WIN_Handle16
(
wParam32
);
*
pwparam16
=
HWND_16
((
HWND
)
wParam32
);
return
0
;
case
WM_DDE_ADVISE
:
case
WM_DDE_DATA
:
...
...
@@ -2157,7 +2157,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
unsigned
lo32
,
hi
;
HANDLE16
lo16
=
0
;
*
pwparam16
=
WIN_Handle16
(
wParam32
);
*
pwparam16
=
HWND_16
((
HWND
)
wParam32
);
UnpackDDElParam
(
msg32
,
*
plparam
,
&
lo32
,
&
hi
);
if
(
lo32
&&
!
(
lo16
=
convert_handle_32_to_16
(
lo32
,
GMEM_DDESHARE
)))
return
-
1
;
...
...
@@ -2170,7 +2170,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
int
flag
=
0
;
char
buf
[
2
];
*
pwparam16
=
WIN_Handle16
(
wParam32
);
*
pwparam16
=
HWND_16
((
HWND
)
wParam32
);
UnpackDDElParam
(
msg32
,
*
plparam
,
&
lo
,
&
hi
);
...
...
@@ -2672,7 +2672,7 @@ static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd,
mp16
.
lParam
=
lParam
;
if
(
WINPROC_MapMsg32ATo16
(
hwnd
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
WINPROC_CallWndProc16
(
func
,
WIN_Handle
16
(
hwnd
),
msg16
,
mp16
.
lResult
=
WINPROC_CallWndProc16
(
func
,
HWND_
16
(
hwnd
),
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32ATo16
(
hwnd
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
lResult
;
...
...
@@ -2698,7 +2698,7 @@ static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd,
if
(
WINPROC_MapMsg32WTo16
(
hwnd
,
msg
,
wParam
,
&
msg16
,
&
mp16
.
wParam
,
&
mp16
.
lParam
)
==
-
1
)
return
0
;
mp16
.
lResult
=
WINPROC_CallWndProc16
(
func
,
WIN_Handle
16
(
hwnd
),
msg16
,
mp16
.
lResult
=
WINPROC_CallWndProc16
(
func
,
HWND_
16
(
hwnd
),
msg16
,
mp16
.
wParam
,
mp16
.
lParam
);
WINPROC_UnmapMsg32WTo16
(
hwnd
,
msg
,
wParam
,
lParam
,
&
mp16
);
return
mp16
.
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