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
aabe5f15
Commit
aabe5f15
authored
Dec 17, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move 16-bit instance normalization to CreateWindowEx16.
parent
178ebae4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
win.c
dlls/user32/win.c
+10
-11
No files found.
dlls/user32/win.c
View file @
aabe5f15
...
...
@@ -187,10 +187,6 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name,
struct
tagCLASS
*
class
=
NULL
;
int
extra_bytes
=
0
;
/* if 16-bit instance, map to module handle */
if
(
instance
&&
!
HIWORD
(
instance
))
instance
=
HINSTANCE_32
(
GetExePtr
(
HINSTANCE_16
(
instance
)));
SERVER_START_REQ
(
create_window
)
{
req
->
parent
=
wine_server_user_handle
(
parent
);
...
...
@@ -1076,7 +1072,7 @@ static void dump_window_styles( DWORD style, DWORD exstyle )
*
* Implementation of CreateWindowEx().
*/
static
HWND
WIN_CreateWindowEx
(
CREATESTRUCTA
*
cs
,
LPCWSTR
className
,
UINT
flags
)
static
HWND
WIN_CreateWindowEx
(
CREATESTRUCTA
*
cs
,
LPCWSTR
className
,
HINSTANCE
module
,
UINT
flags
)
{
INT
cx
,
cy
,
style
,
sw
=
SW_SHOW
;
LRESULT
result
;
...
...
@@ -1206,7 +1202,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
/* Create the window structure */
if
(
!
(
wndPtr
=
create_window_handle
(
parent
,
owner
,
className
,
cs
->
hInstanc
e
,
unicode
)))
if
(
!
(
wndPtr
=
create_window_handle
(
parent
,
owner
,
className
,
modul
e
,
unicode
)))
return
0
;
hwnd
=
wndPtr
->
obj
.
handle
;
...
...
@@ -1490,13 +1486,16 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
cs
.
lpszClass
=
className
;
cs
.
dwExStyle
=
exStyle
;
/* map to module handle */
if
(
instance
)
instance
=
GetExePtr
(
instance
);
if
(
!
IS_INTRESOURCE
(
className
))
{
WCHAR
bufferW
[
256
];
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
className
,
-
1
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
)
))
return
0
;
return
HWND_16
(
WIN_CreateWindowEx
(
&
cs
,
bufferW
,
0
));
return
HWND_16
(
WIN_CreateWindowEx
(
&
cs
,
bufferW
,
HINSTANCE_32
(
instance
),
0
));
}
else
{
...
...
@@ -1506,7 +1505,7 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
return
0
;
}
cs
.
lpszClass
=
buffer
;
return
HWND_16
(
WIN_CreateWindowEx
(
&
cs
,
(
LPCWSTR
)
className
,
0
));
return
HWND_16
(
WIN_CreateWindowEx
(
&
cs
,
(
LPCWSTR
)
className
,
HINSTANCE_32
(
instance
),
0
));
}
}
...
...
@@ -1540,9 +1539,9 @@ HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className,
WCHAR
bufferW
[
256
];
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
className
,
-
1
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
)
))
return
0
;
return
WIN_CreateWindowEx
(
&
cs
,
bufferW
,
WIN_ISWIN32
);
return
WIN_CreateWindowEx
(
&
cs
,
bufferW
,
instance
,
WIN_ISWIN32
);
}
return
WIN_CreateWindowEx
(
&
cs
,
(
LPCWSTR
)
className
,
WIN_ISWIN32
);
return
WIN_CreateWindowEx
(
&
cs
,
(
LPCWSTR
)
className
,
instance
,
WIN_ISWIN32
);
}
...
...
@@ -1572,7 +1571,7 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
/* Note: we rely on the fact that CREATESTRUCTA and */
/* CREATESTRUCTW have the same layout. */
return
WIN_CreateWindowEx
(
(
CREATESTRUCTA
*
)
&
cs
,
className
,
WIN_ISWIN32
|
WIN_ISUNICODE
);
return
WIN_CreateWindowEx
(
(
CREATESTRUCTA
*
)
&
cs
,
className
,
instance
,
WIN_ISWIN32
|
WIN_ISUNICODE
);
}
...
...
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