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
8831a79e
Commit
8831a79e
authored
Nov 18, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Nov 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Cast-qual warnings fix.
parent
115af5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
dialog.c
dlls/user32/dialog.c
+24
-16
No files found.
dlls/user32/dialog.c
View file @
8831a79e
...
...
@@ -285,20 +285,24 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
}
else
{
LPSTR
class
=
(
LPSTR
)
info
.
className
;
LPSTR
caption
=
(
LPSTR
)
info
.
windowName
;
LPCSTR
class
=
(
LPCSTR
)
info
.
className
;
LPCSTR
caption
=
(
LPCSTR
)
info
.
windowName
;
LPSTR
class_tmp
=
NULL
;
LPSTR
caption_tmp
=
NULL
;
if
(
HIWORD
(
class
))
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
className
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
class
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
className
,
-
1
,
class
,
len
,
NULL
,
NULL
);
class_tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
className
,
-
1
,
class_tmp
,
len
,
NULL
,
NULL
);
class
=
class_tmp
;
}
if
(
HIWORD
(
caption
))
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
windowName
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
caption
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
windowName
,
-
1
,
caption
,
len
,
NULL
,
NULL
);
caption_tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
info
.
windowName
,
-
1
,
caption_tmp
,
len
,
NULL
,
NULL
);
caption
=
caption_tmp
;
}
hwndCtrl
=
CreateWindowExA
(
info
.
exStyle
|
WS_EX_NOPARENTNOTIFY
,
class
,
caption
,
info
.
style
|
WS_CHILD
,
...
...
@@ -308,8 +312,8 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
MulDiv
(
info
.
cy
,
dlgInfo
->
yBaseUnit
,
8
),
hwnd
,
(
HMENU
)
info
.
id
,
hInst
,
(
LPVOID
)
info
.
data
);
if
(
HIWORD
(
class
))
HeapFree
(
GetProcessHeap
(),
0
,
class
);
if
(
HIWORD
(
caption
))
HeapFree
(
GetProcessHeap
(),
0
,
caption
);
HeapFree
(
GetProcessHeap
(),
0
,
class_tmp
);
HeapFree
(
GetProcessHeap
(),
0
,
caption_tmp
);
}
if
(
!
hwndCtrl
)
{
...
...
@@ -595,26 +599,30 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
}
else
{
LPSTR
class
=
(
LPSTR
)
template
.
className
;
LPSTR
caption
=
(
LPSTR
)
template
.
caption
;
LPCSTR
class
=
(
LPCSTR
)
template
.
className
;
LPCSTR
caption
=
(
LPCSTR
)
template
.
caption
;
LPSTR
class_tmp
=
NULL
;
LPSTR
caption_tmp
=
NULL
;
if
(
HIWORD
(
class
))
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
className
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
class
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
className
,
-
1
,
class
,
len
,
NULL
,
NULL
);
class_tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
className
,
-
1
,
class_tmp
,
len
,
NULL
,
NULL
);
class
=
class_tmp
;
}
if
(
HIWORD
(
caption
))
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
caption
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
caption
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
caption
,
-
1
,
caption
,
len
,
NULL
,
NULL
);
caption_tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
template
.
caption
,
-
1
,
caption_tmp
,
len
,
NULL
,
NULL
);
caption
=
caption_tmp
;
}
hwnd
=
CreateWindowExA
(
template
.
exStyle
,
class
,
caption
,
template
.
style
&
~
WS_VISIBLE
,
pos
.
x
,
pos
.
y
,
size
.
cx
,
size
.
cy
,
owner
,
hMenu
,
hInst
,
NULL
);
if
(
HIWORD
(
class
))
HeapFree
(
GetProcessHeap
(),
0
,
class
);
if
(
HIWORD
(
caption
))
HeapFree
(
GetProcessHeap
(),
0
,
caption
);
HeapFree
(
GetProcessHeap
(),
0
,
class_tmp
);
HeapFree
(
GetProcessHeap
(),
0
,
caption_tmp
);
}
if
(
!
hwnd
)
...
...
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