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
7ef66af3
Commit
7ef66af3
authored
Nov 22, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some more 16-bit functions to user16.c.
A few fixes for -DSTRICT.
parent
8710a79d
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
362 additions
and
364 deletions
+362
-364
edit.c
controls/edit.c
+6
-6
icontitle.c
controls/icontitle.c
+1
-3
menu.c
controls/menu.c
+18
-267
scroll.c
controls/scroll.c
+2
-2
caret.c
dlls/user/caret.c
+2
-2
focus.c
dlls/user/focus.c
+1
-1
painting.c
dlls/user/painting.c
+10
-10
property.c
dlls/user/property.c
+2
-2
text.c
dlls/user/text.c
+1
-20
user16.c
dlls/user/user16.c
+291
-13
class.c
windows/class.c
+2
-2
clipboard.c
windows/clipboard.c
+11
-12
dce.c
windows/dce.c
+1
-1
mdi.c
windows/mdi.c
+4
-4
syscolor.c
windows/syscolor.c
+0
-9
win.c
windows/win.c
+3
-3
winhelp.c
windows/winhelp.c
+1
-1
winproc.c
windows/winproc.c
+6
-6
No files found.
controls/edit.c
View file @
7ef66af3
...
@@ -1506,7 +1506,7 @@ static LPWSTR EDIT_GetPasswordPointer_SL(EDITSTATE *es)
...
@@ -1506,7 +1506,7 @@ static LPWSTR EDIT_GetPasswordPointer_SL(EDITSTATE *es)
*/
*/
static
void
EDIT_LockBuffer
(
EDITSTATE
*
es
)
static
void
EDIT_LockBuffer
(
EDITSTATE
*
es
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
HINSTANCE
16
hInstance
=
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
if
(
!
es
->
text
)
{
if
(
!
es
->
text
)
{
CHAR
*
textA
=
NULL
;
CHAR
*
textA
=
NULL
;
UINT
countA
=
0
;
UINT
countA
=
0
;
...
@@ -2180,7 +2180,7 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc)
...
@@ -2180,7 +2180,7 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc)
*/
*/
static
void
EDIT_UnlockBuffer
(
EDITSTATE
*
es
,
BOOL
force
)
static
void
EDIT_UnlockBuffer
(
EDITSTATE
*
es
,
BOOL
force
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
HINSTANCE
16
hInstance
=
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
/* Edit window might be already destroyed */
/* Edit window might be already destroyed */
if
(
!
IsWindow
(
es
->
hwndSelf
))
if
(
!
IsWindow
(
es
->
hwndSelf
))
...
@@ -2490,7 +2490,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
...
@@ -2490,7 +2490,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
*/
*/
static
HLOCAL16
EDIT_EM_GetHandle16
(
EDITSTATE
*
es
)
static
HLOCAL16
EDIT_EM_GetHandle16
(
EDITSTATE
*
es
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
HINSTANCE
16
hInstance
=
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
CHAR
*
textA
;
CHAR
*
textA
;
UINT
countA
,
alloc_size
;
UINT
countA
,
alloc_size
;
...
@@ -3120,7 +3120,7 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es)
...
@@ -3120,7 +3120,7 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es)
*/
*/
static
void
EDIT_EM_SetHandle
(
EDITSTATE
*
es
,
HLOCAL
hloc
)
static
void
EDIT_EM_SetHandle
(
EDITSTATE
*
es
,
HLOCAL
hloc
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
HINSTANCE
16
hInstance
=
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
if
(
!
(
es
->
style
&
ES_MULTILINE
))
if
(
!
(
es
->
style
&
ES_MULTILINE
))
return
;
return
;
...
@@ -3200,7 +3200,7 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
...
@@ -3200,7 +3200,7 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
*/
*/
static
void
EDIT_EM_SetHandle16
(
EDITSTATE
*
es
,
HLOCAL16
hloc
)
static
void
EDIT_EM_SetHandle16
(
EDITSTATE
*
es
,
HLOCAL16
hloc
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
HINSTANCE
16
hInstance
=
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
INT
countW
,
countA
;
INT
countW
,
countA
;
HLOCAL
hloc32W_new
;
HLOCAL
hloc32W_new
;
WCHAR
*
textW
;
WCHAR
*
textW
;
...
@@ -3747,7 +3747,6 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name)
...
@@ -3747,7 +3747,6 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name)
*/
*/
static
LRESULT
EDIT_WM_Destroy
(
EDITSTATE
*
es
)
static
LRESULT
EDIT_WM_Destroy
(
EDITSTATE
*
es
)
{
{
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongW
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
LINEDEF
*
pc
,
*
pp
;
LINEDEF
*
pc
,
*
pp
;
if
(
es
->
hloc32W
)
{
if
(
es
->
hloc32W
)
{
...
@@ -3759,6 +3758,7 @@ static LRESULT EDIT_WM_Destroy(EDITSTATE *es)
...
@@ -3759,6 +3758,7 @@ static LRESULT EDIT_WM_Destroy(EDITSTATE *es)
LocalFree
(
es
->
hloc32A
);
LocalFree
(
es
->
hloc32A
);
}
}
if
(
es
->
hloc16
)
{
if
(
es
->
hloc16
)
{
HINSTANCE16
hInstance
=
GetWindowWord
(
es
->
hwndSelf
,
GWL_HINSTANCE
);
while
(
LOCAL_Unlock
(
hInstance
,
es
->
hloc16
))
;
while
(
LOCAL_Unlock
(
hInstance
,
es
->
hloc16
))
;
LOCAL_Free
(
hInstance
,
es
->
hloc16
);
LOCAL_Free
(
hInstance
,
es
->
hloc16
);
}
}
...
...
controls/icontitle.c
View file @
7ef66af3
...
@@ -62,7 +62,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
...
@@ -62,7 +62,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
HWND
ICONTITLE_Create
(
HWND
owner
)
HWND
ICONTITLE_Create
(
HWND
owner
)
{
{
HWND
hWnd
;
HWND
hWnd
;
HINSTANCE
instance
=
GetWindowLongA
(
owner
,
GWL_HINSTANCE
);
HINSTANCE
instance
=
(
HINSTANCE
)
GetWindowLongA
(
owner
,
GWL_HINSTANCE
);
LONG
style
=
WS_CLIPSIBLINGS
;
LONG
style
=
WS_CLIPSIBLINGS
;
if
(
!
IsWindowEnabled
(
owner
))
style
|=
WS_DISABLED
;
if
(
!
IsWindowEnabled
(
owner
))
style
|=
WS_DISABLED
;
...
@@ -238,5 +238,3 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
...
@@ -238,5 +238,3 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
}
}
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
}
}
controls/menu.c
View file @
7ef66af3
...
@@ -189,7 +189,7 @@ const struct builtin_class_descr MENU_builtin_class =
...
@@ -189,7 +189,7 @@ const struct builtin_class_descr MENU_builtin_class =
PopupMenuWndProc
,
/* procW */
PopupMenuWndProc
,
/* procW */
sizeof
(
HMENU
),
/* extra */
sizeof
(
HMENU
),
/* extra */
IDC_ARROWA
,
/* cursor */
IDC_ARROWA
,
/* cursor */
COLOR_MENU
+
1
/* brush */
(
HBRUSH
)(
COLOR_MENU
+
1
)
/* brush */
};
};
...
@@ -371,7 +371,8 @@ HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
...
@@ -371,7 +371,8 @@ HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
if
(
hPopupMenu
)
if
(
hPopupMenu
)
{
{
InsertMenuA
(
hMenu
,
-
1
,
MF_SYSMENU
|
MF_POPUP
|
MF_BYPOSITION
,
hPopupMenu
,
NULL
);
InsertMenuA
(
hMenu
,
-
1
,
MF_SYSMENU
|
MF_POPUP
|
MF_BYPOSITION
,
(
UINT_PTR
)
hPopupMenu
,
NULL
);
menu
->
items
[
0
].
fType
=
MF_SYSMENU
|
MF_POPUP
;
menu
->
items
[
0
].
fType
=
MF_SYSMENU
|
MF_POPUP
;
menu
->
items
[
0
].
fState
=
0
;
menu
->
items
[
0
].
fState
=
0
;
...
@@ -593,7 +594,7 @@ UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget )
...
@@ -593,7 +594,7 @@ UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget )
POPUPMENU
*
menu
;
POPUPMENU
*
menu
;
UINT
i
;
UINT
i
;
MENUITEM
*
item
;
MENUITEM
*
item
;
if
(((
*
hmenu
)
==
0xffff
)
||
if
(((
*
hmenu
)
==
(
HMENU
)
0xffff
)
||
(
!
(
menu
=
MENU_GetMenu
(
*
hmenu
))))
(
!
(
menu
=
MENU_GetMenu
(
*
hmenu
))))
return
NO_SELECTED_ITEM
;
return
NO_SELECTED_ITEM
;
item
=
menu
->
items
;
item
=
menu
->
items
;
...
@@ -663,7 +664,7 @@ static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu,
...
@@ -663,7 +664,7 @@ static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu,
static
UINT
MENU_FindItemByKey
(
HWND
hwndOwner
,
HMENU
hmenu
,
static
UINT
MENU_FindItemByKey
(
HWND
hwndOwner
,
HMENU
hmenu
,
UINT
key
,
BOOL
forceMenuChar
)
UINT
key
,
BOOL
forceMenuChar
)
{
{
TRACE
(
"
\t
looking for '%c' in [%
04x]
\n
"
,
(
char
)
key
,
(
UINT16
)
hmenu
);
TRACE
(
"
\t
looking for '%c' in [%
x]
\n
"
,
(
char
)
key
,
hmenu
);
if
(
!
IsMenu
(
hmenu
))
hmenu
=
GetSubMenu
(
get_win_sys_menu
(
hwndOwner
),
0
);
if
(
!
IsMenu
(
hmenu
))
hmenu
=
GetSubMenu
(
get_win_sys_menu
(
hwndOwner
),
0
);
...
@@ -693,7 +694,7 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu,
...
@@ -693,7 +694,7 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu,
}
}
}
}
menuchar
=
SendMessageA
(
hwndOwner
,
WM_MENUCHAR
,
menuchar
=
SendMessageA
(
hwndOwner
,
WM_MENUCHAR
,
MAKEWPARAM
(
key
,
menu
->
wFlags
),
hmenu
);
MAKEWPARAM
(
key
,
menu
->
wFlags
),
(
LPARAM
)
hmenu
);
if
(
HIWORD
(
menuchar
)
==
2
)
return
LOWORD
(
menuchar
);
if
(
HIWORD
(
menuchar
)
==
2
)
return
LOWORD
(
menuchar
);
if
(
HIWORD
(
menuchar
)
==
1
)
return
(
UINT
)(
-
2
);
if
(
HIWORD
(
menuchar
)
==
1
)
return
(
UINT
)(
-
2
);
}
}
...
@@ -1633,7 +1634,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
...
@@ -1633,7 +1634,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
/* NOTE: In Windows, top menu popup is not owned. */
/* NOTE: In Windows, top menu popup is not owned. */
menu
->
hWnd
=
CreateWindowA
(
POPUPMENU_CLASS_ATOM
,
NULL
,
menu
->
hWnd
=
CreateWindowA
(
POPUPMENU_CLASS_ATOM
,
NULL
,
WS_POPUP
,
x
,
y
,
width
,
height
,
WS_POPUP
,
x
,
y
,
width
,
height
,
hwndOwner
,
0
,
GetWindowLongA
(
hwndOwner
,
GWL_HINSTANCE
),
hwndOwner
,
0
,
(
HINSTANCE
)
GetWindowLongA
(
hwndOwner
,
GWL_HINSTANCE
),
(
LPVOID
)
hmenu
);
(
LPVOID
)
hmenu
);
if
(
!
menu
->
hWnd
)
return
FALSE
;
if
(
!
menu
->
hWnd
)
return
FALSE
;
if
(
!
top_popup
)
top_popup
=
menu
->
hWnd
;
if
(
!
top_popup
)
top_popup
=
menu
->
hWnd
;
...
@@ -1693,7 +1694,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
...
@@ -1693,7 +1694,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
SendMessageA
(
hwndOwner
,
WM_MENUSELECT
,
SendMessageA
(
hwndOwner
,
WM_MENUSELECT
,
MAKELONG
(
ip
->
fType
&
MF_POPUP
?
wIndex
:
ip
->
wID
,
MAKELONG
(
ip
->
fType
&
MF_POPUP
?
wIndex
:
ip
->
wID
,
ip
->
fType
|
ip
->
fState
|
MF_MOUSESELECT
|
ip
->
fType
|
ip
->
fState
|
MF_MOUSESELECT
|
(
lppop
->
wFlags
&
MF_SYSMENU
)),
hmenu
);
(
lppop
->
wFlags
&
MF_SYSMENU
)),
(
LPARAM
)
hmenu
);
}
}
}
}
else
if
(
sendMenuSelect
)
{
else
if
(
sendMenuSelect
)
{
...
@@ -1704,7 +1705,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
...
@@ -1704,7 +1705,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
MENUITEM
*
ip
=
&
ptm
->
items
[
pos
];
MENUITEM
*
ip
=
&
ptm
->
items
[
pos
];
SendMessageA
(
hwndOwner
,
WM_MENUSELECT
,
MAKELONG
(
pos
,
SendMessageA
(
hwndOwner
,
WM_MENUSELECT
,
MAKELONG
(
pos
,
ip
->
fType
|
ip
->
fState
|
MF_MOUSESELECT
|
ip
->
fType
|
ip
->
fState
|
MF_MOUSESELECT
|
(
ptm
->
wFlags
&
MF_SYSMENU
)),
topmenu
);
(
ptm
->
wFlags
&
MF_SYSMENU
)),
(
LPARAM
)
topmenu
);
}
}
}
}
}
}
...
@@ -1796,12 +1797,12 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
...
@@ -1796,12 +1797,12 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
else
else
item
->
dwItemData
=
0
;
item
->
dwItemData
=
0
;
if
((
item
->
fType
&
MF_POPUP
)
&&
(
flags
&
MF_POPUP
)
&&
(
item
->
hSubMenu
!=
id
)
)
if
((
item
->
fType
&
MF_POPUP
)
&&
(
flags
&
MF_POPUP
)
&&
(
item
->
hSubMenu
!=
(
HMENU
)
id
)
)
DestroyMenu
(
item
->
hSubMenu
);
/* ModifyMenu() spec */
DestroyMenu
(
item
->
hSubMenu
);
/* ModifyMenu() spec */
if
(
flags
&
MF_POPUP
)
if
(
flags
&
MF_POPUP
)
{
{
POPUPMENU
*
menu
=
MENU_GetMenu
((
UINT16
)
id
);
POPUPMENU
*
menu
=
MENU_GetMenu
((
HMENU
)
id
);
if
(
menu
)
menu
->
wFlags
|=
MF_POPUP
;
if
(
menu
)
menu
->
wFlags
|=
MF_POPUP
;
else
else
{
{
...
@@ -1814,8 +1815,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
...
@@ -1814,8 +1815,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
}
}
item
->
wID
=
id
;
item
->
wID
=
id
;
if
(
flags
&
MF_POPUP
)
if
(
flags
&
MF_POPUP
)
item
->
hSubMenu
=
(
HMENU
)
id
;
item
->
hSubMenu
=
id
;
if
((
item
->
fType
&
MF_POPUP
)
&&
!
(
flags
&
MF_POPUP
)
)
if
((
item
->
fType
&
MF_POPUP
)
&&
!
(
flags
&
MF_POPUP
)
)
flags
|=
MF_POPUP
;
/* keep popup */
flags
|=
MF_POPUP
;
/* keep popup */
...
@@ -2074,8 +2074,8 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
...
@@ -2074,8 +2074,8 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
/* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */
/* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
SendMessageA
(
hwndOwner
,
WM_INITMENUPOPUP
,
item
->
hSubMenu
,
SendMessageA
(
hwndOwner
,
WM_INITMENUPOPUP
,
(
WPARAM
)
item
->
hSubMenu
,
MAKELONG
(
menu
->
FocusedItem
,
IS_SYSTEM_MENU
(
menu
)
));
MAKELONG
(
menu
->
FocusedItem
,
IS_SYSTEM_MENU
(
menu
)
));
item
=
&
menu
->
items
[
menu
->
FocusedItem
];
item
=
&
menu
->
items
[
menu
->
FocusedItem
];
rect
=
item
->
rect
;
rect
=
item
->
rect
;
...
@@ -2981,7 +2981,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
...
@@ -2981,7 +2981,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
{
{
POPUPMENU
*
menu
;
POPUPMENU
*
menu
;
SendMessageA
(
hWnd
,
WM_INITMENU
,
hMenu
,
0
);
SendMessageA
(
hWnd
,
WM_INITMENU
,
(
WPARAM
)
hMenu
,
0
);
if
((
menu
=
MENU_GetMenu
(
hMenu
))
&&
(
!
menu
->
Height
))
if
((
menu
=
MENU_GetMenu
(
hMenu
))
&&
(
!
menu
->
Height
))
{
/* app changed/recreated menu bar entries in WM_INITMENU
{
/* app changed/recreated menu bar entries in WM_INITMENU
Recalculate menu sizes else clicks will not work */
Recalculate menu sizes else clicks will not work */
...
@@ -3101,7 +3101,7 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y,
...
@@ -3101,7 +3101,7 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y,
/* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */
/* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
SendMessageA
(
hWnd
,
WM_INITMENUPOPUP
,
hMenu
,
0
);
SendMessageA
(
hWnd
,
WM_INITMENUPOPUP
,
(
WPARAM
)
hMenu
,
0
);
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
x
,
y
,
0
,
0
))
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
x
,
y
,
0
,
0
))
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpRect
);
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpRect
);
...
@@ -3214,32 +3214,6 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
...
@@ -3214,32 +3214,6 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
/*******************************************************************
/*******************************************************************
* ChangeMenu (USER.153)
*/
BOOL16
WINAPI
ChangeMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
SEGPTR
data
,
UINT16
id
,
UINT16
flags
)
{
TRACE
(
"menu=%04x pos=%d data=%08lx id=%04x flags=%04x
\n
"
,
hMenu
,
pos
,
(
DWORD
)
data
,
id
,
flags
);
if
(
flags
&
MF_APPEND
)
return
AppendMenu16
(
hMenu
,
flags
&
~
MF_APPEND
,
id
,
data
);
/* FIXME: Word passes the item id in 'pos' and 0 or 0xffff as id */
/* for MF_DELETE. We should check the parameters for all others */
/* MF_* actions also (anybody got a doc on ChangeMenu?). */
if
(
flags
&
MF_DELETE
)
return
DeleteMenu16
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_CHANGE
)
return
ModifyMenu16
(
hMenu
,
pos
,
flags
&
~
MF_CHANGE
,
id
,
data
);
if
(
flags
&
MF_REMOVE
)
return
RemoveMenu16
(
hMenu
,
flags
&
MF_BYPOSITION
?
pos
:
id
,
flags
&
~
MF_REMOVE
);
/* Default: MF_INSERT */
return
InsertMenu16
(
hMenu
,
pos
,
flags
,
id
,
data
);
}
/*******************************************************************
* ChangeMenuA (USER32.@)
* ChangeMenuA (USER32.@)
*/
*/
BOOL
WINAPI
ChangeMenuA
(
HMENU
hMenu
,
UINT
pos
,
LPCSTR
data
,
BOOL
WINAPI
ChangeMenuA
(
HMENU
hMenu
,
UINT
pos
,
LPCSTR
data
,
...
@@ -3282,15 +3256,6 @@ BOOL WINAPI ChangeMenuW( HMENU hMenu, UINT pos, LPCWSTR data,
...
@@ -3282,15 +3256,6 @@ BOOL WINAPI ChangeMenuW( HMENU hMenu, UINT pos, LPCWSTR data,
/*******************************************************************
/*******************************************************************
* CheckMenuItem (USER.154)
*/
BOOL16
WINAPI
CheckMenuItem16
(
HMENU16
hMenu
,
UINT16
id
,
UINT16
flags
)
{
return
(
BOOL16
)
CheckMenuItem
(
hMenu
,
id
,
flags
);
}
/*******************************************************************
* CheckMenuItem (USER32.@)
* CheckMenuItem (USER32.@)
*/
*/
DWORD
WINAPI
CheckMenuItem
(
HMENU
hMenu
,
UINT
id
,
UINT
flags
)
DWORD
WINAPI
CheckMenuItem
(
HMENU
hMenu
,
UINT
id
,
UINT
flags
)
...
@@ -3308,15 +3273,6 @@ DWORD WINAPI CheckMenuItem( HMENU hMenu, UINT id, UINT flags )
...
@@ -3308,15 +3273,6 @@ DWORD WINAPI CheckMenuItem( HMENU hMenu, UINT id, UINT flags )
/**********************************************************************
/**********************************************************************
* EnableMenuItem (USER.155)
*/
UINT16
WINAPI
EnableMenuItem16
(
HMENU16
hMenu
,
UINT16
wItemID
,
UINT16
wFlags
)
{
return
EnableMenuItem
(
hMenu
,
wItemID
,
wFlags
);
}
/**********************************************************************
* EnableMenuItem (USER32.@)
* EnableMenuItem (USER32.@)
*/
*/
UINT
WINAPI
EnableMenuItem
(
HMENU
hMenu
,
UINT
wItemID
,
UINT
wFlags
)
UINT
WINAPI
EnableMenuItem
(
HMENU
hMenu
,
UINT
wItemID
,
UINT
wFlags
)
...
@@ -3361,16 +3317,6 @@ UINT WINAPI EnableMenuItem( HMENU hMenu, UINT wItemID, UINT wFlags )
...
@@ -3361,16 +3317,6 @@ UINT WINAPI EnableMenuItem( HMENU hMenu, UINT wItemID, UINT wFlags )
/*******************************************************************
/*******************************************************************
* GetMenuString (USER.161)
*/
INT16
WINAPI
GetMenuString16
(
HMENU16
hMenu
,
UINT16
wItemID
,
LPSTR
str
,
INT16
nMaxSiz
,
UINT16
wFlags
)
{
return
GetMenuStringA
(
hMenu
,
wItemID
,
str
,
nMaxSiz
,
wFlags
);
}
/*******************************************************************
* GetMenuStringA (USER32.@)
* GetMenuStringA (USER32.@)
*/
*/
INT
WINAPI
GetMenuStringA
(
INT
WINAPI
GetMenuStringA
(
...
@@ -3433,15 +3379,6 @@ BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID,
...
@@ -3433,15 +3379,6 @@ BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID,
/**********************************************************************
/**********************************************************************
* GetMenuState (USER.250)
*/
UINT16
WINAPI
GetMenuState16
(
HMENU16
hMenu
,
UINT16
wItemID
,
UINT16
wFlags
)
{
return
GetMenuState
(
hMenu
,
wItemID
,
wFlags
);
}
/**********************************************************************
* GetMenuState (USER32.@)
* GetMenuState (USER32.@)
*/
*/
UINT
WINAPI
GetMenuState
(
HMENU
hMenu
,
UINT
wItemID
,
UINT
wFlags
)
UINT
WINAPI
GetMenuState
(
HMENU
hMenu
,
UINT
wItemID
,
UINT
wFlags
)
...
@@ -3468,19 +3405,6 @@ UINT WINAPI GetMenuState( HMENU hMenu, UINT wItemID, UINT wFlags )
...
@@ -3468,19 +3405,6 @@ UINT WINAPI GetMenuState( HMENU hMenu, UINT wItemID, UINT wFlags )
/**********************************************************************
/**********************************************************************
* GetMenuItemCount (USER.263)
*/
INT16
WINAPI
GetMenuItemCount16
(
HMENU16
hMenu
)
{
LPPOPUPMENU
menu
=
MENU_GetMenu
(
hMenu
);
if
(
!
menu
)
return
-
1
;
TRACE
(
"(%04x) returning %d
\n
"
,
hMenu
,
menu
->
nItems
);
return
menu
->
nItems
;
}
/**********************************************************************
* GetMenuItemCount (USER32.@)
* GetMenuItemCount (USER32.@)
*/
*/
INT
WINAPI
GetMenuItemCount
(
HMENU
hMenu
)
INT
WINAPI
GetMenuItemCount
(
HMENU
hMenu
)
...
@@ -3492,13 +3416,6 @@ INT WINAPI GetMenuItemCount( HMENU hMenu )
...
@@ -3492,13 +3416,6 @@ INT WINAPI GetMenuItemCount( HMENU hMenu )
return
menu
->
nItems
;
return
menu
->
nItems
;
}
}
/**********************************************************************
* GetMenuItemID (USER.264)
*/
UINT16
WINAPI
GetMenuItemID16
(
HMENU16
hMenu
,
INT16
nPos
)
{
return
(
UINT16
)
GetMenuItemID
(
hMenu
,
nPos
);
}
/**********************************************************************
/**********************************************************************
* GetMenuItemID (USER32.@)
* GetMenuItemID (USER32.@)
...
@@ -3513,19 +3430,6 @@ UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
...
@@ -3513,19 +3430,6 @@ UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
}
}
/*******************************************************************
* InsertMenu (USER.410)
*/
BOOL16
WINAPI
InsertMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
UINT
pos32
=
(
UINT
)
pos
;
if
((
pos
==
(
UINT16
)
-
1
)
&&
(
flags
&
MF_BYPOSITION
))
pos32
=
(
UINT
)
-
1
;
if
(
IS_STRING_ITEM
(
flags
)
&&
data
)
return
InsertMenuA
(
hMenu
,
pos32
,
flags
,
id
,
MapSL
(
data
)
);
return
InsertMenuA
(
hMenu
,
pos32
,
flags
,
id
,
(
LPSTR
)
data
);
}
/*******************************************************************
/*******************************************************************
* InsertMenuW (USER32.@)
* InsertMenuW (USER32.@)
...
@@ -3552,7 +3456,7 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags,
...
@@ -3552,7 +3456,7 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags,
}
}
if
(
flags
&
MF_POPUP
)
/* Set the MF_POPUP flag on the popup-menu */
if
(
flags
&
MF_POPUP
)
/* Set the MF_POPUP flag on the popup-menu */
(
MENU_GetMenu
((
HMENU
16
)
id
))
->
wFlags
|=
MF_POPUP
;
(
MENU_GetMenu
((
HMENU
)
id
))
->
wFlags
|=
MF_POPUP
;
item
->
hCheckBit
=
item
->
hUnCheckBit
=
0
;
item
->
hCheckBit
=
item
->
hUnCheckBit
=
0
;
return
TRUE
;
return
TRUE
;
...
@@ -3584,15 +3488,6 @@ BOOL WINAPI InsertMenuA( HMENU hMenu, UINT pos, UINT flags,
...
@@ -3584,15 +3488,6 @@ BOOL WINAPI InsertMenuA( HMENU hMenu, UINT pos, UINT flags,
/*******************************************************************
/*******************************************************************
* AppendMenu (USER.411)
*/
BOOL16
WINAPI
AppendMenu16
(
HMENU16
hMenu
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
return
InsertMenu16
(
hMenu
,
-
1
,
flags
|
MF_BYPOSITION
,
id
,
data
);
}
/*******************************************************************
* AppendMenuA (USER32.@)
* AppendMenuA (USER32.@)
*/
*/
BOOL
WINAPI
AppendMenuA
(
HMENU
hMenu
,
UINT
flags
,
BOOL
WINAPI
AppendMenuA
(
HMENU
hMenu
,
UINT
flags
,
...
@@ -3613,15 +3508,6 @@ BOOL WINAPI AppendMenuW( HMENU hMenu, UINT flags,
...
@@ -3613,15 +3508,6 @@ BOOL WINAPI AppendMenuW( HMENU hMenu, UINT flags,
/**********************************************************************
/**********************************************************************
* RemoveMenu (USER.412)
*/
BOOL16
WINAPI
RemoveMenu16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
)
{
return
RemoveMenu
(
hMenu
,
nPos
,
wFlags
);
}
/**********************************************************************
* RemoveMenu (USER32.@)
* RemoveMenu (USER32.@)
*/
*/
BOOL
WINAPI
RemoveMenu
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
)
BOOL
WINAPI
RemoveMenu
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
)
...
@@ -3658,15 +3544,6 @@ BOOL WINAPI RemoveMenu( HMENU hMenu, UINT nPos, UINT wFlags )
...
@@ -3658,15 +3544,6 @@ BOOL WINAPI RemoveMenu( HMENU hMenu, UINT nPos, UINT wFlags )
/**********************************************************************
/**********************************************************************
* DeleteMenu (USER.413)
*/
BOOL16
WINAPI
DeleteMenu16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
)
{
return
DeleteMenu
(
hMenu
,
nPos
,
wFlags
);
}
/**********************************************************************
* DeleteMenu (USER32.@)
* DeleteMenu (USER32.@)
*/
*/
BOOL
WINAPI
DeleteMenu
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
)
BOOL
WINAPI
DeleteMenu
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
)
...
@@ -3681,18 +3558,6 @@ BOOL WINAPI DeleteMenu( HMENU hMenu, UINT nPos, UINT wFlags )
...
@@ -3681,18 +3558,6 @@ BOOL WINAPI DeleteMenu( HMENU hMenu, UINT nPos, UINT wFlags )
/*******************************************************************
/*******************************************************************
* ModifyMenu (USER.414)
*/
BOOL16
WINAPI
ModifyMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
if
(
IS_STRING_ITEM
(
flags
))
return
ModifyMenuA
(
hMenu
,
pos
,
flags
,
id
,
MapSL
(
data
)
);
return
ModifyMenuA
(
hMenu
,
pos
,
flags
,
id
,
(
LPSTR
)
data
);
}
/*******************************************************************
* ModifyMenuW (USER32.@)
* ModifyMenuW (USER32.@)
*/
*/
BOOL
WINAPI
ModifyMenuW
(
HMENU
hMenu
,
UINT
pos
,
UINT
flags
,
BOOL
WINAPI
ModifyMenuW
(
HMENU
hMenu
,
UINT
pos
,
UINT
flags
,
...
@@ -3742,15 +3607,6 @@ BOOL WINAPI ModifyMenuA( HMENU hMenu, UINT pos, UINT flags,
...
@@ -3742,15 +3607,6 @@ BOOL WINAPI ModifyMenuA( HMENU hMenu, UINT pos, UINT flags,
/**********************************************************************
/**********************************************************************
* CreatePopupMenu (USER.415)
*/
HMENU16
WINAPI
CreatePopupMenu16
(
void
)
{
return
CreatePopupMenu
();
}
/**********************************************************************
* CreatePopupMenu (USER32.@)
* CreatePopupMenu (USER32.@)
*/
*/
HMENU
WINAPI
CreatePopupMenu
(
void
)
HMENU
WINAPI
CreatePopupMenu
(
void
)
...
@@ -3777,16 +3633,6 @@ DWORD WINAPI GetMenuCheckMarkDimensions(void)
...
@@ -3777,16 +3633,6 @@ DWORD WINAPI GetMenuCheckMarkDimensions(void)
/**********************************************************************
/**********************************************************************
* SetMenuItemBitmaps (USER.418)
*/
BOOL16
WINAPI
SetMenuItemBitmaps16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
,
HBITMAP16
hNewUnCheck
,
HBITMAP16
hNewCheck
)
{
return
SetMenuItemBitmaps
(
hMenu
,
nPos
,
wFlags
,
hNewUnCheck
,
hNewCheck
);
}
/**********************************************************************
* SetMenuItemBitmaps (USER32.@)
* SetMenuItemBitmaps (USER32.@)
*/
*/
BOOL
WINAPI
SetMenuItemBitmaps
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
,
BOOL
WINAPI
SetMenuItemBitmaps
(
HMENU
hMenu
,
UINT
nPos
,
UINT
wFlags
,
...
@@ -3812,15 +3658,6 @@ BOOL WINAPI SetMenuItemBitmaps( HMENU hMenu, UINT nPos, UINT wFlags,
...
@@ -3812,15 +3658,6 @@ BOOL WINAPI SetMenuItemBitmaps( HMENU hMenu, UINT nPos, UINT wFlags,
/**********************************************************************
/**********************************************************************
* CreateMenu (USER.151)
*/
HMENU16
WINAPI
CreateMenu16
(
void
)
{
return
CreateMenu
();
}
/**********************************************************************
* CreateMenu (USER32.@)
* CreateMenu (USER32.@)
*/
*/
HMENU
WINAPI
CreateMenu
(
void
)
HMENU
WINAPI
CreateMenu
(
void
)
...
@@ -3842,15 +3679,6 @@ HMENU WINAPI CreateMenu(void)
...
@@ -3842,15 +3679,6 @@ HMENU WINAPI CreateMenu(void)
/**********************************************************************
/**********************************************************************
* DestroyMenu (USER.152)
*/
BOOL16
WINAPI
DestroyMenu16
(
HMENU16
hMenu
)
{
return
DestroyMenu
(
hMenu
);
}
/**********************************************************************
* DestroyMenu (USER32.@)
* DestroyMenu (USER32.@)
*/
*/
BOOL
WINAPI
DestroyMenu
(
HMENU
hMenu
)
BOOL
WINAPI
DestroyMenu
(
HMENU
hMenu
)
...
@@ -4010,15 +3838,6 @@ BOOL WINAPI SetMenu( HWND hWnd, HMENU hMenu )
...
@@ -4010,15 +3838,6 @@ BOOL WINAPI SetMenu( HWND hWnd, HMENU hMenu )
/**********************************************************************
/**********************************************************************
* GetSubMenu (USER.159)
*/
HMENU16
WINAPI
GetSubMenu16
(
HMENU16
hMenu
,
INT16
nPos
)
{
return
GetSubMenu
(
hMenu
,
nPos
);
}
/**********************************************************************
* GetSubMenu (USER32.@)
* GetSubMenu (USER32.@)
*/
*/
HMENU
WINAPI
GetSubMenu
(
HMENU
hMenu
,
INT
nPos
)
HMENU
WINAPI
GetSubMenu
(
HMENU
hMenu
,
INT
nPos
)
...
@@ -4106,19 +3925,10 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name )
...
@@ -4106,19 +3925,10 @@ HMENU16 WINAPI LoadMenu16( HINSTANCE16 instance, LPCSTR name )
HGLOBAL16
handle
;
HGLOBAL16
handle
;
HMENU16
hMenu
;
HMENU16
hMenu
;
TRACE
(
"(%04x,%s)
\n
"
,
instance
,
debugstr_a
(
name
)
);
if
(
HIWORD
(
name
)
&&
name
[
0
]
==
'#'
)
name
=
(
LPCSTR
)
atoi
(
name
+
1
);
if
(
HIWORD
(
name
))
{
if
(
name
[
0
]
==
'#'
)
name
=
(
LPCSTR
)
atoi
(
name
+
1
);
}
if
(
!
name
)
return
0
;
if
(
!
name
)
return
0
;
/* check for Win32 module */
if
(
HIWORD
(
instance
))
return
LoadMenuA
(
instance
,
name
);
instance
=
GetExePtr
(
instance
);
instance
=
GetExePtr
(
instance
);
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
name
,
RT_MENUA
)))
return
0
;
if
(
!
(
hRsrc
=
FindResource16
(
instance
,
name
,
RT_MENUA
)))
return
0
;
if
(
!
(
handle
=
LoadResource16
(
instance
,
hRsrc
)))
return
0
;
if
(
!
(
handle
=
LoadResource16
(
instance
,
hRsrc
)))
return
0
;
hMenu
=
LoadMenuIndirect16
(
LockResource16
(
handle
));
hMenu
=
LoadMenuIndirect16
(
LockResource16
(
handle
));
...
@@ -4230,15 +4040,6 @@ HMENU WINAPI LoadMenuIndirectW( LPCVOID template )
...
@@ -4230,15 +4040,6 @@ HMENU WINAPI LoadMenuIndirectW( LPCVOID template )
/**********************************************************************
/**********************************************************************
* IsMenu (USER.358)
*/
BOOL16
WINAPI
IsMenu16
(
HMENU16
hmenu
)
{
return
IsMenu
(
hmenu
);
}
/**********************************************************************
* IsMenu (USER32.@)
* IsMenu (USER32.@)
*/
*/
BOOL
WINAPI
IsMenu
(
HMENU
hmenu
)
BOOL
WINAPI
IsMenu
(
HMENU
hmenu
)
...
@@ -4580,32 +4381,6 @@ UINT WINAPI GetMenuDefaultItem(HMENU hmenu, UINT bypos, UINT flags)
...
@@ -4580,32 +4381,6 @@ UINT WINAPI GetMenuDefaultItem(HMENU hmenu, UINT bypos, UINT flags)
}
}
/*******************************************************************
* InsertMenuItem (USER.441)
*
* FIXME: untested
*/
BOOL16
WINAPI
InsertMenuItem16
(
HMENU16
hmenu
,
UINT16
pos
,
BOOL16
byposition
,
const
MENUITEMINFO16
*
mii
)
{
MENUITEMINFOA
miia
;
miia
.
cbSize
=
sizeof
(
miia
);
miia
.
fMask
=
mii
->
fMask
;
miia
.
dwTypeData
=
(
LPSTR
)
mii
->
dwTypeData
;
miia
.
fType
=
mii
->
fType
;
miia
.
fState
=
mii
->
fState
;
miia
.
wID
=
mii
->
wID
;
miia
.
hSubMenu
=
mii
->
hSubMenu
;
miia
.
hbmpChecked
=
mii
->
hbmpChecked
;
miia
.
hbmpUnchecked
=
mii
->
hbmpUnchecked
;
miia
.
dwItemData
=
mii
->
dwItemData
;
miia
.
cch
=
mii
->
cch
;
if
(
IS_STRING_ITEM
(
miia
.
fType
))
miia
.
dwTypeData
=
MapSL
(
mii
->
dwTypeData
);
return
InsertMenuItemA
(
hmenu
,
pos
,
byposition
,
&
miia
);
}
/**********************************************************************
/**********************************************************************
* InsertMenuItemA (USER32.@)
* InsertMenuItemA (USER32.@)
...
@@ -4667,15 +4442,6 @@ BOOL WINAPI CheckMenuRadioItem(HMENU hMenu,
...
@@ -4667,15 +4442,6 @@ BOOL WINAPI CheckMenuRadioItem(HMENU hMenu,
return
TRUE
;
return
TRUE
;
}
}
/**********************************************************************
* CheckMenuRadioItem (USER.666)
*/
BOOL16
WINAPI
CheckMenuRadioItem16
(
HMENU16
hMenu
,
UINT16
first
,
UINT16
last
,
UINT16
check
,
BOOL16
bypos
)
{
return
CheckMenuRadioItem
(
hMenu
,
first
,
last
,
check
,
bypos
);
}
/**********************************************************************
/**********************************************************************
* GetMenuItemRect (USER32.@)
* GetMenuItemRect (USER32.@)
...
@@ -4790,14 +4556,6 @@ BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
...
@@ -4790,14 +4556,6 @@ BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
return
FALSE
;
return
FALSE
;
}
}
/**********************************************************************
* SetMenuContextHelpId (USER.384)
*/
BOOL16
WINAPI
SetMenuContextHelpId16
(
HMENU16
hMenu
,
DWORD
dwContextHelpID
)
{
return
SetMenuContextHelpId
(
hMenu
,
dwContextHelpID
);
}
/**********************************************************************
/**********************************************************************
* SetMenuContextHelpId (USER32.@)
* SetMenuContextHelpId (USER32.@)
...
@@ -4816,13 +4574,6 @@ BOOL WINAPI SetMenuContextHelpId( HMENU hMenu, DWORD dwContextHelpID)
...
@@ -4816,13 +4574,6 @@ BOOL WINAPI SetMenuContextHelpId( HMENU hMenu, DWORD dwContextHelpID)
return
FALSE
;
return
FALSE
;
}
}
/**********************************************************************
* GetMenuContextHelpId (USER.385)
*/
DWORD
WINAPI
GetMenuContextHelpId16
(
HMENU16
hMenu
)
{
return
GetMenuContextHelpId
(
hMenu
);
}
/**********************************************************************
/**********************************************************************
* GetMenuContextHelpId (USER32.@)
* GetMenuContextHelpId (USER32.@)
...
...
controls/scroll.c
View file @
7ef66af3
...
@@ -1290,12 +1290,12 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
...
@@ -1290,12 +1290,12 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
&
arrowSize
,
&
thumbSize
,
&
thumbPos
);
&
arrowSize
,
&
thumbSize
,
&
thumbPos
);
if
(
!
vertical
)
if
(
!
vertical
)
{
{
CreateCaret
(
hwnd
,
1
,
thumbSize
-
2
,
rect
.
bottom
-
rect
.
top
-
2
);
CreateCaret
(
hwnd
,
(
HBITMAP
)
1
,
thumbSize
-
2
,
rect
.
bottom
-
rect
.
top
-
2
);
SetCaretPos
(
thumbPos
+
1
,
rect
.
top
+
1
);
SetCaretPos
(
thumbPos
+
1
,
rect
.
top
+
1
);
}
}
else
else
{
{
CreateCaret
(
hwnd
,
1
,
rect
.
right
-
rect
.
left
-
2
,
thumbSize
-
2
);
CreateCaret
(
hwnd
,
(
HBITMAP
)
1
,
rect
.
right
-
rect
.
left
-
2
,
thumbSize
-
2
);
SetCaretPos
(
rect
.
top
+
1
,
thumbPos
+
1
);
SetCaretPos
(
rect
.
top
+
1
,
thumbPos
+
1
);
}
}
ShowCaret
(
hwnd
);
ShowCaret
(
hwnd
);
...
...
dlls/user/caret.c
View file @
7ef66af3
...
@@ -116,7 +116,7 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, INT width, INT height )
...
@@ -116,7 +116,7 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, INT width, INT height )
if
(
!
hwnd
)
return
FALSE
;
if
(
!
hwnd
)
return
FALSE
;
if
(
bitmap
&&
(
bitmap
!=
1
))
if
(
bitmap
&&
(
bitmap
!=
(
HBITMAP
)
1
))
{
{
BITMAP
bmp
;
BITMAP
bmp
;
if
(
!
GetObjectA
(
bitmap
,
sizeof
(
bmp
),
&
bmp
))
return
FALSE
;
if
(
!
GetObjectA
(
bitmap
,
sizeof
(
bmp
),
&
bmp
))
return
FALSE
;
...
@@ -151,7 +151,7 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, INT width, INT height )
...
@@ -151,7 +151,7 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, INT width, INT height )
{
{
HBITMAP
hPrevBmp
=
SelectObject
(
hMemDC
,
hBmp
);
HBITMAP
hPrevBmp
=
SelectObject
(
hMemDC
,
hBmp
);
SetRect
(
&
r
,
0
,
0
,
width
,
height
);
SetRect
(
&
r
,
0
,
0
,
width
,
height
);
FillRect
(
hMemDC
,
&
r
,
(
bitmap
?
COLOR_GRAYTEXT
:
COLOR_WINDOW
)
+
1
);
FillRect
(
hMemDC
,
&
r
,
(
HBRUSH
)((
bitmap
?
COLOR_GRAYTEXT
:
COLOR_WINDOW
)
+
1
)
);
SelectObject
(
hMemDC
,
hPrevBmp
);
SelectObject
(
hMemDC
,
hPrevBmp
);
}
}
DeleteDC
(
hMemDC
);
DeleteDC
(
hMemDC
);
...
...
dlls/user/focus.c
View file @
7ef66af3
...
@@ -192,7 +192,7 @@ static BOOL set_foreground_window( HWND hwnd, BOOL mouse )
...
@@ -192,7 +192,7 @@ static BOOL set_foreground_window( HWND hwnd, BOOL mouse )
ret
=
set_active_window
(
0
,
NULL
,
mouse
,
TRUE
);
ret
=
set_active_window
(
0
,
NULL
,
mouse
,
TRUE
);
if
(
send_msg_new
)
/* new window belongs to other thread */
if
(
send_msg_new
)
/* new window belongs to other thread */
SendNotifyMessageW
(
hwnd
,
WM_WINE_SETACTIVEWINDOW
,
hwnd
,
0
);
SendNotifyMessageW
(
hwnd
,
WM_WINE_SETACTIVEWINDOW
,
(
WPARAM
)
hwnd
,
0
);
else
/* new window belongs to us */
else
/* new window belongs to us */
ret
=
set_active_window
(
hwnd
,
NULL
,
mouse
,
TRUE
);
ret
=
set_active_window
(
hwnd
,
NULL
,
mouse
,
TRUE
);
}
}
...
...
dlls/user/painting.c
View file @
7ef66af3
...
@@ -54,7 +54,7 @@ static void add_paint_count( HWND hwnd, int incr )
...
@@ -54,7 +54,7 @@ static void add_paint_count( HWND hwnd, int incr )
*/
*/
static
HRGN
copy_rgn
(
HRGN
hSrc
)
static
HRGN
copy_rgn
(
HRGN
hSrc
)
{
{
if
(
hSrc
>
1
)
if
(
hSrc
>
(
HRGN
)
1
)
{
{
HRGN
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
HRGN
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
CombineRgn
(
hrgn
,
hSrc
,
0
,
RGN_COPY
);
CombineRgn
(
hrgn
,
hSrc
,
0
,
RGN_COPY
);
...
@@ -71,7 +71,7 @@ static HRGN copy_rgn( HRGN hSrc )
...
@@ -71,7 +71,7 @@ static HRGN copy_rgn( HRGN hSrc )
*/
*/
static
void
get_update_regions
(
WND
*
win
,
HRGN
*
whole_rgn
,
HRGN
*
client_rgn
)
static
void
get_update_regions
(
WND
*
win
,
HRGN
*
whole_rgn
,
HRGN
*
client_rgn
)
{
{
if
(
win
->
hrgnUpdate
>
1
)
if
(
win
->
hrgnUpdate
>
(
HRGN
)
1
)
{
{
RECT
client
,
update
;
RECT
client
,
update
;
...
@@ -126,22 +126,22 @@ static HRGN begin_ncpaint( HWND hwnd )
...
@@ -126,22 +126,22 @@ static HRGN begin_ncpaint( HWND hwnd )
if
(
whole_rgn
)
/* NOTE: WM_NCPAINT allows wParam to be 1 */
if
(
whole_rgn
)
/* NOTE: WM_NCPAINT allows wParam to be 1 */
{
{
WIN_ReleasePtr
(
wnd
);
WIN_ReleasePtr
(
wnd
);
SendMessageA
(
hwnd
,
WM_NCPAINT
,
whole_rgn
,
0
);
SendMessageA
(
hwnd
,
WM_NCPAINT
,
(
WPARAM
)
whole_rgn
,
0
);
if
(
whole_rgn
>
1
)
DeleteObject
(
whole_rgn
);
if
(
whole_rgn
>
(
HRGN
)
1
)
DeleteObject
(
whole_rgn
);
/* make sure the window still exists before continuing */
/* make sure the window still exists before continuing */
if
(
!
(
wnd
=
WIN_GetPtr
(
hwnd
))
||
wnd
==
WND_OTHER_PROCESS
)
if
(
!
(
wnd
=
WIN_GetPtr
(
hwnd
))
||
wnd
==
WND_OTHER_PROCESS
)
{
{
if
(
client_rgn
>
1
)
DeleteObject
(
client_rgn
);
if
(
client_rgn
>
(
HRGN
)
1
)
DeleteObject
(
client_rgn
);
return
0
;
return
0
;
}
}
}
}
if
(
wnd
->
hrgnUpdate
||
(
wnd
->
flags
&
WIN_INTERNAL_PAINT
))
add_paint_count
(
hwnd
,
-
1
);
if
(
wnd
->
hrgnUpdate
||
(
wnd
->
flags
&
WIN_INTERNAL_PAINT
))
add_paint_count
(
hwnd
,
-
1
);
if
(
wnd
->
hrgnUpdate
>
1
)
DeleteObject
(
wnd
->
hrgnUpdate
);
if
(
wnd
->
hrgnUpdate
>
(
HRGN
)
1
)
DeleteObject
(
wnd
->
hrgnUpdate
);
wnd
->
hrgnUpdate
=
0
;
wnd
->
hrgnUpdate
=
0
;
wnd
->
flags
&=
~
(
WIN_INTERNAL_PAINT
|
WIN_NEEDS_NCPAINT
|
WIN_NEEDS_BEGINPAINT
);
wnd
->
flags
&=
~
(
WIN_INTERNAL_PAINT
|
WIN_NEEDS_NCPAINT
|
WIN_NEEDS_BEGINPAINT
);
if
(
client_rgn
>
1
)
OffsetRgn
(
client_rgn
,
wnd
->
rectWindow
.
left
-
wnd
->
rectClient
.
left
,
if
(
client_rgn
>
(
HRGN
)
1
)
OffsetRgn
(
client_rgn
,
wnd
->
rectWindow
.
left
-
wnd
->
rectClient
.
left
,
wnd
->
rectWindow
.
top
-
wnd
->
rectClient
.
top
);
wnd
->
rectWindow
.
top
-
wnd
->
rectClient
.
top
);
WIN_ReleasePtr
(
wnd
);
WIN_ReleasePtr
(
wnd
);
return
client_rgn
;
return
client_rgn
;
}
}
...
@@ -181,7 +181,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
...
@@ -181,7 +181,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
if
(
GetClassLongA
(
hwnd
,
GCL_STYLE
)
&
CS_PARENTDC
)
if
(
GetClassLongA
(
hwnd
,
GCL_STYLE
)
&
CS_PARENTDC
)
{
{
/* Don't clip the output to the update region for CS_PARENTDC window */
/* Don't clip the output to the update region for CS_PARENTDC window */
if
(
hrgnUpdate
>
1
)
DeleteObject
(
hrgnUpdate
);
if
(
hrgnUpdate
>
(
HRGN
)
1
)
DeleteObject
(
hrgnUpdate
);
hrgnUpdate
=
0
;
hrgnUpdate
=
0
;
dcx_flags
&=
~
DCX_INTERSECTRGN
;
dcx_flags
&=
~
DCX_INTERSECTRGN
;
}
}
...
@@ -191,7 +191,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
...
@@ -191,7 +191,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
{
{
hrgnUpdate
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
hrgnUpdate
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
}
}
else
if
(
hrgnUpdate
==
1
)
/* whole client area, don't clip */
else
if
(
hrgnUpdate
==
(
HRGN
)
1
)
/* whole client area, don't clip */
{
{
hrgnUpdate
=
0
;
hrgnUpdate
=
0
;
dcx_flags
&=
~
DCX_INTERSECTRGN
;
dcx_flags
&=
~
DCX_INTERSECTRGN
;
...
...
dlls/user/property.c
View file @
7ef66af3
...
@@ -311,10 +311,10 @@ INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
...
@@ -311,10 +311,10 @@ INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
if
(
list
[
i
].
string
)
/* it was a string originally */
if
(
list
[
i
].
string
)
/* it was a string originally */
{
{
if
(
!
GlobalGetAtomNameA
(
list
[
i
].
atom
,
string
,
ATOM_BUFFER_SIZE
))
continue
;
if
(
!
GlobalGetAtomNameA
(
list
[
i
].
atom
,
string
,
ATOM_BUFFER_SIZE
))
continue
;
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
segptr
,
list
[
i
].
handle
);
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
segptr
,
LOWORD
(
list
[
i
].
handle
)
);
}
}
else
else
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
list
[
i
].
atom
,
list
[
i
].
handle
);
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
list
[
i
].
atom
,
LOWORD
(
list
[
i
].
handle
)
);
if
(
!
ret
)
break
;
if
(
!
ret
)
break
;
}
}
UnMapLS
(
segptr
);
UnMapLS
(
segptr
);
...
...
dlls/user/text.c
View file @
7ef66af3
...
@@ -1076,25 +1076,6 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags )
...
@@ -1076,25 +1076,6 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags )
}
}
/***********************************************************************
/***********************************************************************
* DrawText (USER.85)
*/
INT16
WINAPI
DrawText16
(
HDC16
hdc
,
LPCSTR
str
,
INT16
count
,
LPRECT16
rect
,
UINT16
flags
)
{
INT16
ret
;
if
(
rect
)
{
RECT
rect32
;
CONV_RECT16TO32
(
rect
,
&
rect32
);
ret
=
DrawTextA
(
hdc
,
str
,
count
,
&
rect32
,
flags
);
CONV_RECT32TO16
(
&
rect32
,
rect
);
}
else
ret
=
DrawTextA
(
hdc
,
str
,
count
,
NULL
,
flags
);
return
ret
;
}
/***********************************************************************
*
*
* GrayString functions
* GrayString functions
*/
*/
...
@@ -1113,7 +1094,7 @@ struct gray_string_info
...
@@ -1113,7 +1094,7 @@ struct gray_string_info
static
BOOL
CALLBACK
gray_string_callback
(
HDC
hdc
,
LPARAM
param
,
INT
len
)
static
BOOL
CALLBACK
gray_string_callback
(
HDC
hdc
,
LPARAM
param
,
INT
len
)
{
{
const
struct
gray_string_info
*
info
=
(
struct
gray_string_info
*
)
param
;
const
struct
gray_string_info
*
info
=
(
struct
gray_string_info
*
)
param
;
return
TEXT_CallTo16_word_wlw
(
info
->
proc
,
hdc
,
info
->
param
,
len
);
return
TEXT_CallTo16_word_wlw
(
info
->
proc
,
HDC_16
(
hdc
)
,
info
->
param
,
len
);
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/user/user16.c
View file @
7ef66af3
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
#include <stdlib.h>
#include "wine/winuser16.h"
#include "wine/winuser16.h"
#include "winbase.h"
#include "winbase.h"
#include "wownt32.h"
#include "wownt32.h"
...
@@ -31,6 +32,9 @@
...
@@ -31,6 +32,9 @@
#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
#define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
#define IS_MENU_STRING_ITEM(flags) \
(((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR)) == MF_STRING)
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
...
@@ -58,6 +62,26 @@ BOOL16 WINAPI DrawIcon16(HDC16 hdc, INT16 x, INT16 y, HICON16 hIcon)
...
@@ -58,6 +62,26 @@ BOOL16 WINAPI DrawIcon16(HDC16 hdc, INT16 x, INT16 y, HICON16 hIcon)
return
DrawIcon
(
HDC_32
(
hdc
),
x
,
y
,
HICON_32
(
hIcon
));
return
DrawIcon
(
HDC_32
(
hdc
),
x
,
y
,
HICON_32
(
hIcon
));
}
}
/***********************************************************************
* DrawText (USER.85)
*/
INT16
WINAPI
DrawText16
(
HDC16
hdc
,
LPCSTR
str
,
INT16
count
,
LPRECT16
rect
,
UINT16
flags
)
{
INT16
ret
;
if
(
rect
)
{
RECT
rect32
;
CONV_RECT16TO32
(
rect
,
&
rect32
);
ret
=
DrawTextA
(
HDC_32
(
hdc
),
str
,
count
,
&
rect32
,
flags
);
CONV_RECT32TO16
(
&
rect32
,
rect
);
}
else
ret
=
DrawTextA
(
hdc
,
str
,
count
,
NULL
,
flags
);
return
ret
;
}
/***********************************************************************
/***********************************************************************
* IconSize (USER.86)
* IconSize (USER.86)
*
*
...
@@ -68,6 +92,102 @@ DWORD WINAPI IconSize16(void)
...
@@ -68,6 +92,102 @@ DWORD WINAPI IconSize16(void)
return
MAKELONG
(
GetSystemMetrics
(
SM_CYICON
),
GetSystemMetrics
(
SM_CXICON
));
return
MAKELONG
(
GetSystemMetrics
(
SM_CYICON
),
GetSystemMetrics
(
SM_CXICON
));
}
}
/**********************************************************************
* CreateMenu (USER.151)
*/
HMENU16
WINAPI
CreateMenu16
(
void
)
{
return
HMENU_16
(
CreateMenu
()
);
}
/**********************************************************************
* DestroyMenu (USER.152)
*/
BOOL16
WINAPI
DestroyMenu16
(
HMENU16
hMenu
)
{
return
DestroyMenu
(
HMENU_32
(
hMenu
)
);
}
/*******************************************************************
* ChangeMenu (USER.153)
*/
BOOL16
WINAPI
ChangeMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
SEGPTR
data
,
UINT16
id
,
UINT16
flags
)
{
if
(
flags
&
MF_APPEND
)
return
AppendMenu16
(
hMenu
,
flags
&
~
MF_APPEND
,
id
,
data
);
/* FIXME: Word passes the item id in 'pos' and 0 or 0xffff as id */
/* for MF_DELETE. We should check the parameters for all others */
/* MF_* actions also (anybody got a doc on ChangeMenu?). */
if
(
flags
&
MF_DELETE
)
return
DeleteMenu16
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_CHANGE
)
return
ModifyMenu16
(
hMenu
,
pos
,
flags
&
~
MF_CHANGE
,
id
,
data
);
if
(
flags
&
MF_REMOVE
)
return
RemoveMenu16
(
hMenu
,
flags
&
MF_BYPOSITION
?
pos
:
id
,
flags
&
~
MF_REMOVE
);
/* Default: MF_INSERT */
return
InsertMenu16
(
hMenu
,
pos
,
flags
,
id
,
data
);
}
/*******************************************************************
* CheckMenuItem (USER.154)
*/
BOOL16
WINAPI
CheckMenuItem16
(
HMENU16
hMenu
,
UINT16
id
,
UINT16
flags
)
{
return
CheckMenuItem
(
HMENU_32
(
hMenu
),
id
,
flags
);
}
/**********************************************************************
* EnableMenuItem (USER.155)
*/
UINT16
WINAPI
EnableMenuItem16
(
HMENU16
hMenu
,
UINT16
wItemID
,
UINT16
wFlags
)
{
return
EnableMenuItem
(
HMENU_32
(
hMenu
),
wItemID
,
wFlags
);
}
/**********************************************************************
* GetSubMenu (USER.159)
*/
HMENU16
WINAPI
GetSubMenu16
(
HMENU16
hMenu
,
INT16
nPos
)
{
return
HMENU_16
(
GetSubMenu
(
HMENU_32
(
hMenu
),
nPos
)
);
}
/*******************************************************************
* GetMenuString (USER.161)
*/
INT16
WINAPI
GetMenuString16
(
HMENU16
hMenu
,
UINT16
wItemID
,
LPSTR
str
,
INT16
nMaxSiz
,
UINT16
wFlags
)
{
return
GetMenuStringA
(
HMENU_32
(
hMenu
),
wItemID
,
str
,
nMaxSiz
,
wFlags
);
}
/**********************************************************************
* WinHelp (USER.171)
*/
BOOL16
WINAPI
WinHelp16
(
HWND16
hWnd
,
LPCSTR
lpHelpFile
,
UINT16
wCommand
,
DWORD
dwData
)
{
BOOL
ret
;
DWORD
mutex_count
;
/* We might call WinExec() */
ReleaseThunkLock
(
&
mutex_count
);
ret
=
WinHelpA
(
WIN_Handle32
(
hWnd
),
lpHelpFile
,
wCommand
,
(
DWORD
)
MapSL
(
dwData
));
RestoreThunkLock
(
mutex_count
);
return
ret
;
}
/***********************************************************************
/***********************************************************************
* LoadCursor (USER.173)
* LoadCursor (USER.173)
*/
*/
...
@@ -120,6 +240,34 @@ HCURSOR16 WINAPI GetCursor16(void)
...
@@ -120,6 +240,34 @@ HCURSOR16 WINAPI GetCursor16(void)
return
HCURSOR_16
(
GetCursor
());
return
HCURSOR_16
(
GetCursor
());
}
}
/**********************************************************************
* GetMenuState (USER.250)
*/
UINT16
WINAPI
GetMenuState16
(
HMENU16
hMenu
,
UINT16
wItemID
,
UINT16
wFlags
)
{
return
GetMenuState
(
HMENU_32
(
hMenu
),
wItemID
,
wFlags
);
}
/**********************************************************************
* GetMenuItemCount (USER.263)
*/
INT16
WINAPI
GetMenuItemCount16
(
HMENU16
hMenu
)
{
return
GetMenuItemCount
(
HMENU_32
(
hMenu
)
);
}
/**********************************************************************
* GetMenuItemID (USER.264)
*/
UINT16
WINAPI
GetMenuItemID16
(
HMENU16
hMenu
,
INT16
nPos
)
{
return
GetMenuItemID
(
HMENU_32
(
hMenu
),
nPos
);
}
/***********************************************************************
/***********************************************************************
* GlobalAddAtom (USER.268)
* GlobalAddAtom (USER.268)
*/
*/
...
@@ -152,6 +300,16 @@ UINT16 WINAPI GlobalGetAtomName16(ATOM nAtom, LPSTR lpBuffer, INT16 nSize)
...
@@ -152,6 +300,16 @@ UINT16 WINAPI GlobalGetAtomName16(ATOM nAtom, LPSTR lpBuffer, INT16 nSize)
return
GlobalGetAtomNameA
(
nAtom
,
lpBuffer
,
nSize
);
return
GlobalGetAtomNameA
(
nAtom
,
lpBuffer
,
nSize
);
}
}
/***********************************************************************
* GetSysColorBrush (USER.281)
*/
HBRUSH16
WINAPI
GetSysColorBrush16
(
INT16
index
)
{
return
HBRUSH_16
(
GetSysColorBrush
(
index
)
);
}
/***********************************************************************
/***********************************************************************
* SelectPalette (USER.282)
* SelectPalette (USER.282)
*/
*/
...
@@ -168,6 +326,34 @@ UINT16 WINAPI RealizePalette16( HDC16 hdc )
...
@@ -168,6 +326,34 @@ UINT16 WINAPI RealizePalette16( HDC16 hdc )
return
UserRealizePalette
(
HDC_32
(
hdc
)
);
return
UserRealizePalette
(
HDC_32
(
hdc
)
);
}
}
/**********************************************************************
* IsMenu (USER.358)
*/
BOOL16
WINAPI
IsMenu16
(
HMENU16
hmenu
)
{
return
IsMenu
(
HMENU_32
(
hmenu
)
);
}
/**********************************************************************
* SetMenuContextHelpId (USER.384)
*/
BOOL16
WINAPI
SetMenuContextHelpId16
(
HMENU16
hMenu
,
DWORD
dwContextHelpID
)
{
return
SetMenuContextHelpId
(
HMENU_32
(
hMenu
),
dwContextHelpID
);
}
/**********************************************************************
* GetMenuContextHelpId (USER.385)
*/
DWORD
WINAPI
GetMenuContextHelpId16
(
HMENU16
hMenu
)
{
return
GetMenuContextHelpId
(
HMENU_32
(
hMenu
)
);
}
/***********************************************************************
/***********************************************************************
* LoadImage (USER.389)
* LoadImage (USER.389)
*
*
...
@@ -238,6 +424,107 @@ HCURSOR16 WINAPI CreateCursor16(HINSTANCE16 hInstance,
...
@@ -238,6 +424,107 @@ HCURSOR16 WINAPI CreateCursor16(HINSTANCE16 hInstance,
return
CreateCursorIconIndirect16
(
hInstance
,
&
info
,
lpANDbits
,
lpXORbits
);
return
CreateCursorIconIndirect16
(
hInstance
,
&
info
,
lpANDbits
,
lpXORbits
);
}
}
/*******************************************************************
* InsertMenu (USER.410)
*/
BOOL16
WINAPI
InsertMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
UINT
pos32
=
(
UINT
)
pos
;
if
((
pos
==
(
UINT16
)
-
1
)
&&
(
flags
&
MF_BYPOSITION
))
pos32
=
(
UINT
)
-
1
;
if
(
IS_MENU_STRING_ITEM
(
flags
)
&&
data
)
return
InsertMenuA
(
HMENU_32
(
hMenu
),
pos32
,
flags
,
id
,
MapSL
(
data
)
);
return
InsertMenuA
(
HMENU_32
(
hMenu
),
pos32
,
flags
,
id
,
(
LPSTR
)
data
);
}
/*******************************************************************
* AppendMenu (USER.411)
*/
BOOL16
WINAPI
AppendMenu16
(
HMENU16
hMenu
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
return
InsertMenu16
(
HMENU_32
(
hMenu
),
-
1
,
flags
|
MF_BYPOSITION
,
id
,
data
);
}
/**********************************************************************
* RemoveMenu (USER.412)
*/
BOOL16
WINAPI
RemoveMenu16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
)
{
return
RemoveMenu
(
HMENU_32
(
hMenu
),
nPos
,
wFlags
);
}
/**********************************************************************
* DeleteMenu (USER.413)
*/
BOOL16
WINAPI
DeleteMenu16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
)
{
return
DeleteMenu
(
HMENU_32
(
hMenu
),
nPos
,
wFlags
);
}
/*******************************************************************
* ModifyMenu (USER.414)
*/
BOOL16
WINAPI
ModifyMenu16
(
HMENU16
hMenu
,
UINT16
pos
,
UINT16
flags
,
UINT16
id
,
SEGPTR
data
)
{
if
(
IS_MENU_STRING_ITEM
(
flags
))
return
ModifyMenuA
(
HMENU_32
(
hMenu
),
pos
,
flags
,
id
,
MapSL
(
data
)
);
return
ModifyMenuA
(
HMENU_32
(
hMenu
),
pos
,
flags
,
id
,
(
LPSTR
)
data
);
}
/**********************************************************************
* CreatePopupMenu (USER.415)
*/
HMENU16
WINAPI
CreatePopupMenu16
(
void
)
{
return
HMENU_16
(
CreatePopupMenu
()
);
}
/**********************************************************************
* SetMenuItemBitmaps (USER.418)
*/
BOOL16
WINAPI
SetMenuItemBitmaps16
(
HMENU16
hMenu
,
UINT16
nPos
,
UINT16
wFlags
,
HBITMAP16
hNewUnCheck
,
HBITMAP16
hNewCheck
)
{
return
SetMenuItemBitmaps
(
HMENU_32
(
hMenu
),
nPos
,
wFlags
,
HBITMAP_32
(
hNewUnCheck
),
HBITMAP_32
(
hNewCheck
)
);
}
/*******************************************************************
* InsertMenuItem (USER.441)
*
* FIXME: untested
*/
BOOL16
WINAPI
InsertMenuItem16
(
HMENU16
hmenu
,
UINT16
pos
,
BOOL16
byposition
,
const
MENUITEMINFO16
*
mii
)
{
MENUITEMINFOA
miia
;
miia
.
cbSize
=
sizeof
(
miia
);
miia
.
fMask
=
mii
->
fMask
;
miia
.
dwTypeData
=
(
LPSTR
)
mii
->
dwTypeData
;
miia
.
fType
=
mii
->
fType
;
miia
.
fState
=
mii
->
fState
;
miia
.
wID
=
mii
->
wID
;
miia
.
hSubMenu
=
mii
->
hSubMenu
;
miia
.
hbmpChecked
=
mii
->
hbmpChecked
;
miia
.
hbmpUnchecked
=
mii
->
hbmpUnchecked
;
miia
.
dwItemData
=
mii
->
dwItemData
;
miia
.
cch
=
mii
->
cch
;
if
(
IS_MENU_STRING_ITEM
(
miia
.
fType
))
miia
.
dwTypeData
=
MapSL
(
mii
->
dwTypeData
);
return
InsertMenuItemA
(
HMENU_32
(
hmenu
),
pos
,
byposition
,
&
miia
);
}
/**********************************************************************
/**********************************************************************
* CreateIconFromResourceEx (USER.450)
* CreateIconFromResourceEx (USER.450)
*
*
...
@@ -440,19 +727,10 @@ BOOL16 WINAPI DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
...
@@ -440,19 +727,10 @@ BOOL16 WINAPI DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
}
}
/**********************************************************************
/**********************************************************************
*
WinHelp (USER.171
)
*
CheckMenuRadioItem (USER.666
)
*/
*/
BOOL16
WINAPI
WinHelp16
(
HWND16
hWnd
,
LPCSTR
lpHelpFile
,
UINT16
wCommand
,
BOOL16
WINAPI
CheckMenuRadioItem16
(
HMENU16
hMenu
,
UINT16
first
,
UINT16
last
,
DWORD
dwData
)
UINT16
check
,
BOOL16
bypos
)
{
{
BOOL
ret
;
return
CheckMenuRadioItem
(
HMENU_32
(
hMenu
),
first
,
last
,
check
,
bypos
);
DWORD
mutex_count
;
/* We might call WinExec() */
ReleaseThunkLock
(
&
mutex_count
);
ret
=
WinHelpA
(
WIN_Handle32
(
hWnd
),
lpHelpFile
,
wCommand
,
(
DWORD
)
MapSL
(
dwData
));
RestoreThunkLock
(
mutex_count
);
return
ret
;
}
}
windows/class.c
View file @
7ef66af3
...
@@ -1011,7 +1011,7 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
...
@@ -1011,7 +1011,7 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
break
;
break
;
case
GCL_HBRBACKGROUND
:
case
GCL_HBRBACKGROUND
:
retval
=
(
LONG
)
class
->
hbrBackground
;
retval
=
(
LONG
)
class
->
hbrBackground
;
class
->
hbrBackground
=
newval
;
class
->
hbrBackground
=
(
HBRUSH
)
newval
;
break
;
break
;
case
GCL_HCURSOR
:
case
GCL_HCURSOR
:
retval
=
(
LONG
)
class
->
hCursor
;
retval
=
(
LONG
)
class
->
hCursor
;
...
@@ -1035,7 +1035,7 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
...
@@ -1035,7 +1035,7 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
break
;
break
;
case
GCL_HMODULE
:
case
GCL_HMODULE
:
retval
=
(
LONG
)
class
->
hInstance
;
retval
=
(
LONG
)
class
->
hInstance
;
class
->
hInstance
=
newval
;
class
->
hInstance
=
(
HINSTANCE
)
newval
;
break
;
break
;
case
GCW_ATOM
:
case
GCW_ATOM
:
retval
=
(
DWORD
)
class
->
atomName
;
retval
=
(
DWORD
)
class
->
atomName
;
...
...
windows/clipboard.c
View file @
7ef66af3
...
@@ -61,12 +61,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
...
@@ -61,12 +61,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
* Clipboard context global variables
* Clipboard context global variables
*/
*/
static
HANDLE
hClipLock
=
0
;
static
DWORD
ClipLock
=
0
;
static
BOOL
bCBHasChanged
=
FALSE
;
static
BOOL
bCBHasChanged
=
FALSE
;
static
HWND
hWndClipWindow
;
/* window that last opened clipboard */
static
HWND
hWndClipWindow
;
/* window that last opened clipboard */
static
HWND
hWndClipOwner
;
/* current clipboard owner */
static
HWND
hWndClipOwner
;
/* current clipboard owner */
static
HANDLE16
hTaskClipOwner
;
/* clipboard owner's task
*/
static
DWORD
ClipOwner
;
/* clipboard owner's thread id
*/
static
HWND
hWndViewer
;
/* start of viewers chain */
static
HWND
hWndViewer
;
/* start of viewers chain */
/* Clipboard cache initial data.
/* Clipboard cache initial data.
...
@@ -127,7 +127,6 @@ LPWINE_CLIPFORMAT CLIPBOARD_LookupFormat( WORD wID )
...
@@ -127,7 +127,6 @@ LPWINE_CLIPFORMAT CLIPBOARD_LookupFormat( WORD wID )
BOOL
CLIPBOARD_IsLocked
()
BOOL
CLIPBOARD_IsLocked
()
{
{
BOOL
bIsLocked
=
TRUE
;
BOOL
bIsLocked
=
TRUE
;
HANDLE16
hTaskCur
=
GetCurrentTask
();
/*
/*
* The clipboard is available:
* The clipboard is available:
...
@@ -136,10 +135,10 @@ BOOL CLIPBOARD_IsLocked()
...
@@ -136,10 +135,10 @@ BOOL CLIPBOARD_IsLocked()
* 2. if the caller is the clipboard owners task, AND is responding to a
* 2. if the caller is the clipboard owners task, AND is responding to a
* WM_RENDERFORMAT message.
* WM_RENDERFORMAT message.
*/
*/
if
(
hClipLock
==
hTaskCur
)
if
(
ClipLock
==
GetCurrentThreadId
()
)
bIsLocked
=
FALSE
;
bIsLocked
=
FALSE
;
else
if
(
hTaskCur
==
hTaskClipOwner
)
else
if
(
ClipOwner
==
GetCurrentThreadId
()
)
{
{
/* Check if we're currently executing inside a window procedure
/* Check if we're currently executing inside a window procedure
* called in response to a WM_RENDERFORMAT message. A WM_RENDERFORMAT
* called in response to a WM_RENDERFORMAT message. A WM_RENDERFORMAT
...
@@ -172,7 +171,7 @@ BOOL CLIPBOARD_IsLocked()
...
@@ -172,7 +171,7 @@ BOOL CLIPBOARD_IsLocked()
void
CLIPBOARD_ReleaseOwner
()
void
CLIPBOARD_ReleaseOwner
()
{
{
hWndClipOwner
=
0
;
hWndClipOwner
=
0
;
hTask
ClipOwner
=
0
;
ClipOwner
=
0
;
}
}
/**************************************************************************
/**************************************************************************
...
@@ -753,9 +752,9 @@ BOOL WINAPI OpenClipboard( HWND hWnd )
...
@@ -753,9 +752,9 @@ BOOL WINAPI OpenClipboard( HWND hWnd )
TRACE
(
"(%04x)...
\n
"
,
hWnd
);
TRACE
(
"(%04x)...
\n
"
,
hWnd
);
if
(
!
h
ClipLock
)
if
(
!
ClipLock
)
{
{
hClipLock
=
GetCurrentTask
();
ClipLock
=
GetCurrentThreadId
();
/* Save current user of the clipboard */
/* Save current user of the clipboard */
hWndClipWindow
=
WIN_GetFullHandle
(
hWnd
);
hWndClipWindow
=
WIN_GetFullHandle
(
hWnd
);
...
@@ -785,12 +784,12 @@ BOOL WINAPI CloseClipboard(void)
...
@@ -785,12 +784,12 @@ BOOL WINAPI CloseClipboard(void)
{
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
if
(
hClipLock
==
GetCurrentTask
())
if
(
ClipLock
==
GetCurrentThreadId
())
{
{
hWndClipWindow
=
0
;
hWndClipWindow
=
0
;
if
(
bCBHasChanged
&&
hWndViewer
)
SendMessageW
(
hWndViewer
,
WM_DRAWCLIPBOARD
,
0
,
0
);
if
(
bCBHasChanged
&&
hWndViewer
)
SendMessageW
(
hWndViewer
,
WM_DRAWCLIPBOARD
,
0
,
0
);
h
ClipLock
=
0
;
ClipLock
=
0
;
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -813,7 +812,7 @@ BOOL WINAPI EmptyClipboard(void)
...
@@ -813,7 +812,7 @@ BOOL WINAPI EmptyClipboard(void)
{
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
if
(
hClipLock
!=
GetCurrentTask
())
if
(
ClipLock
!=
GetCurrentThreadId
())
{
{
WARN
(
"Clipboard not opened by calling task!
\n
"
);
WARN
(
"Clipboard not opened by calling task!
\n
"
);
return
FALSE
;
return
FALSE
;
...
@@ -830,7 +829,7 @@ BOOL WINAPI EmptyClipboard(void)
...
@@ -830,7 +829,7 @@ BOOL WINAPI EmptyClipboard(void)
hWndClipOwner
=
hWndClipWindow
;
hWndClipOwner
=
hWndClipWindow
;
/* Save the current task */
/* Save the current task */
hTaskClipOwner
=
GetCurrentTask
();
ClipOwner
=
GetCurrentThreadId
();
/* Tell the driver to acquire the selection */
/* Tell the driver to acquire the selection */
USER_Driver
.
pAcquireClipboard
();
USER_Driver
.
pAcquireClipboard
();
...
...
windows/dce.c
View file @
7ef66af3
...
@@ -216,7 +216,7 @@ static void DCE_DeleteClipRgn( DCE* dce )
...
@@ -216,7 +216,7 @@ static void DCE_DeleteClipRgn( DCE* dce )
if
(
dce
->
DCXflags
&
DCX_KEEPCLIPRGN
)
if
(
dce
->
DCXflags
&
DCX_KEEPCLIPRGN
)
dce
->
DCXflags
&=
~
DCX_KEEPCLIPRGN
;
dce
->
DCXflags
&=
~
DCX_KEEPCLIPRGN
;
else
else
if
(
dce
->
hClipRgn
>
1
)
if
(
dce
->
hClipRgn
>
(
HRGN
)
1
)
DeleteObject
(
dce
->
hClipRgn
);
DeleteObject
(
dce
->
hClipRgn
);
dce
->
hClipRgn
=
0
;
dce
->
hClipRgn
=
0
;
...
...
windows/mdi.c
View file @
7ef66af3
...
@@ -567,7 +567,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
...
@@ -567,7 +567,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
seg_cs16
=
MapLS
(
&
cs16
);
seg_cs16
=
MapLS
(
&
cs16
);
hwnd
=
WIN_Handle32
(
CreateWindow16
(
cs
->
szClass
,
cs
->
szTitle
,
style
,
hwnd
=
WIN_Handle32
(
CreateWindow16
(
cs
->
szClass
,
cs
->
szTitle
,
style
,
cs16
.
x
,
cs16
.
y
,
cs16
.
cx
,
cs16
.
cy
,
cs16
.
x
,
cs16
.
y
,
cs16
.
cx
,
cs16
.
cy
,
HWND_16
(
parent
),
(
HMENU
)
wIDmenu
,
HWND_16
(
parent
),
(
HMENU
16
)
wIDmenu
,
cs16
.
hOwner
,
(
LPVOID
)
seg_cs16
));
cs16
.
hOwner
,
(
LPVOID
)
seg_cs16
));
UnMapLS
(
seg_cs16
);
UnMapLS
(
seg_cs16
);
UnMapLS
(
title
);
UnMapLS
(
title
);
...
@@ -1063,7 +1063,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
...
@@ -1063,7 +1063,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
hSysMenuBitmap
=
hBmpClose
;
hSysMenuBitmap
=
hBmpClose
;
if
(
!
InsertMenuA
(
menu
,
0
,
MF_BYPOSITION
|
MF_BITMAP
|
MF_POPUP
,
if
(
!
InsertMenuA
(
menu
,
0
,
MF_BYPOSITION
|
MF_BITMAP
|
MF_POPUP
,
hSysPopup
,
(
LPSTR
)(
DWORD
)
hSysMenuBitmap
))
(
UINT_PTR
)
hSysPopup
,
(
LPSTR
)
hSysMenuBitmap
))
{
{
TRACE
(
"not inserted
\n
"
);
TRACE
(
"not inserted
\n
"
);
DestroyMenu
(
hSysPopup
);
DestroyMenu
(
hSysPopup
);
...
@@ -1448,7 +1448,7 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
...
@@ -1448,7 +1448,7 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
MDINEXTMENU
next_menu
;
MDINEXTMENU
next_menu
;
DefFrameProcW
(
WIN_Handle32
(
hwnd
),
WIN_Handle32
(
hwndMDIClient
),
DefFrameProcW
(
WIN_Handle32
(
hwnd
),
WIN_Handle32
(
hwndMDIClient
),
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
HWND_16
(
next_menu
.
hwndNext
)
);
return
MAKELONG
(
HMENU_16
(
next_menu
.
hmenuNext
)
,
HWND_16
(
next_menu
.
hwndNext
)
);
}
}
default:
default:
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
...
@@ -1615,7 +1615,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
...
@@ -1615,7 +1615,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
{
{
MDINEXTMENU
next_menu
;
MDINEXTMENU
next_menu
;
DefMDIChildProcW
(
WIN_Handle32
(
hwnd
),
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
DefMDIChildProcW
(
WIN_Handle32
(
hwnd
),
message
,
wParam
,
(
LPARAM
)
&
next_menu
);
return
MAKELONG
(
next_menu
.
hmenuNext
,
HWND_16
(
next_menu
.
hwndNext
)
);
return
MAKELONG
(
HMENU_16
(
next_menu
.
hmenuNext
)
,
HWND_16
(
next_menu
.
hwndNext
)
);
}
}
default:
default:
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
return
DefWindowProc16
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
windows/syscolor.c
View file @
7ef66af3
...
@@ -363,15 +363,6 @@ DWORD WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes, DW
...
@@ -363,15 +363,6 @@ DWORD WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes, DW
}
}
/***********************************************************************
/***********************************************************************
* GetSysColorBrush (USER.281)
*/
HBRUSH16
WINAPI
GetSysColorBrush16
(
INT16
index
)
{
return
(
HBRUSH16
)
GetSysColorBrush
(
index
);
}
/***********************************************************************
* GetSysColorBrush (USER32.@)
* GetSysColorBrush (USER32.@)
*/
*/
HBRUSH
WINAPI
GetSysColorBrush
(
INT
index
)
HBRUSH
WINAPI
GetSysColorBrush
(
INT
index
)
...
...
windows/win.c
View file @
7ef66af3
...
@@ -1956,7 +1956,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
...
@@ -1956,7 +1956,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
case
GWL_EXSTYLE
:
retvalue
=
wndPtr
->
dwExStyle
;
break
;
case
GWL_EXSTYLE
:
retvalue
=
wndPtr
->
dwExStyle
;
break
;
case
GWL_ID
:
retvalue
=
(
LONG
)
wndPtr
->
wIDmenu
;
break
;
case
GWL_ID
:
retvalue
=
(
LONG
)
wndPtr
->
wIDmenu
;
break
;
case
GWL_WNDPROC
:
retvalue
=
(
LONG
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
break
;
case
GWL_WNDPROC
:
retvalue
=
(
LONG
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
break
;
case
GWL_HINSTANCE
:
retvalue
=
wndPtr
->
hInstance
;
break
;
case
GWL_HINSTANCE
:
retvalue
=
(
LONG
)
wndPtr
->
hInstance
;
break
;
default:
default:
WARN
(
"Unknown offset %d
\n
"
,
offset
);
WARN
(
"Unknown offset %d
\n
"
,
offset
);
SetLastError
(
ERROR_INVALID_INDEX
);
SetLastError
(
ERROR_INVALID_INDEX
);
...
@@ -2113,8 +2113,8 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
...
@@ -2113,8 +2113,8 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
retval
=
reply
->
old_id
;
retval
=
reply
->
old_id
;
break
;
break
;
case
GWL_HINSTANCE
:
case
GWL_HINSTANCE
:
wndPtr
->
hInstance
=
newval
;
wndPtr
->
hInstance
=
(
HINSTANCE
)
newval
;
retval
=
(
HINSTANCE
)
reply
->
old_instance
;
retval
=
(
ULONG_PTR
)
reply
->
old_instance
;
break
;
break
;
case
GWL_USERDATA
:
case
GWL_USERDATA
:
wndPtr
->
userdata
=
newval
;
wndPtr
->
userdata
=
newval
;
...
...
windows/winhelp.c
View file @
7ef66af3
...
@@ -154,7 +154,7 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand, ULONG_PTR dwD
...
@@ -154,7 +154,7 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand, ULONG_PTR dwD
lpwh
->
size
,
lpwh
->
command
,
lpwh
->
data
,
lpwh
->
size
,
lpwh
->
command
,
lpwh
->
data
,
lpwh
->
ofsFilename
?
(
LPSTR
)
lpwh
+
lpwh
->
ofsFilename
:
""
);
lpwh
->
ofsFilename
?
(
LPSTR
)
lpwh
+
lpwh
->
ofsFilename
:
""
);
return
SendMessageA
(
hDest
,
WM_COPYDATA
,
hWnd
,
(
LPARAM
)
&
cds
);
return
SendMessageA
(
hDest
,
WM_COPYDATA
,
(
WPARAM
)
hWnd
,
(
LPARAM
)
&
cds
);
}
}
...
...
windows/winproc.c
View file @
7ef66af3
...
@@ -1345,7 +1345,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
...
@@ -1345,7 +1345,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
{
{
MDINEXTMENU
*
next
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
next
)
);
MDINEXTMENU
*
next
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
next
)
);
if
(
!
next
)
return
-
1
;
if
(
!
next
)
return
-
1
;
next
->
hmenuIn
=
*
plparam
;
next
->
hmenuIn
=
(
HMENU
)
*
plparam
;
next
->
hmenuNext
=
0
;
next
->
hmenuNext
=
0
;
next
->
hwndNext
=
0
;
next
->
hwndNext
=
0
;
*
plparam
=
(
LPARAM
)
next
;
*
plparam
=
(
LPARAM
)
next
;
...
@@ -2013,11 +2013,11 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
...
@@ -2013,11 +2013,11 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_MENUSELECT
:
case
WM_MENUSELECT
:
if
(
HIWORD
(
wParam32
)
&
MF_POPUP
)
if
(
HIWORD
(
wParam32
)
&
MF_POPUP
)
{
{
UINT16
hmenu
;
HMENU
hmenu
;
if
(((
UINT
)
HIWORD
(
wParam32
)
!=
0xFFFF
)
||
(
*
plparam
))
if
(((
UINT
)
HIWORD
(
wParam32
)
!=
0xFFFF
)
||
(
*
plparam
))
{
{
if
((
hmenu
=
GetSubMenu
((
HMENU
16
)
*
plparam
,
*
pwparam16
)))
if
((
hmenu
=
GetSubMenu
((
HMENU
)
*
plparam
,
*
pwparam16
)))
*
pwparam16
=
hmenu
;
*
pwparam16
=
HMENU_16
(
hmenu
)
;
}
}
}
}
/* fall through */
/* fall through */
...
@@ -2125,7 +2125,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
...
@@ -2125,7 +2125,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_NEXTMENU
:
case
WM_NEXTMENU
:
{
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
*
plparam
;
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
*
plparam
;
*
plparam
=
next
->
hmenuIn
;
*
plparam
=
(
LPARAM
)
next
->
hmenuIn
;
return
1
;
return
1
;
}
}
case
WM_PAINTCLIPBOARD
:
case
WM_PAINTCLIPBOARD
:
...
@@ -2371,7 +2371,7 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
...
@@ -2371,7 +2371,7 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
case
WM_NEXTMENU
:
case
WM_NEXTMENU
:
{
{
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
MDINEXTMENU
*
next
=
(
MDINEXTMENU
*
)
lParam
;
next
->
hmenuNext
=
LOWORD
(
p16
->
lResult
);
next
->
hmenuNext
=
HMENU_32
(
LOWORD
(
p16
->
lResult
)
);
next
->
hwndNext
=
WIN_Handle32
(
HIWORD
(
p16
->
lResult
)
);
next
->
hwndNext
=
WIN_Handle32
(
HIWORD
(
p16
->
lResult
)
);
p16
->
lResult
=
0
;
p16
->
lResult
=
0
;
}
}
...
...
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