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
22c56f97
Commit
22c56f97
authored
Jul 10, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Use nameless unions/structs.
parent
2c10f747
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
67 deletions
+59
-67
commctrl.c
dlls/comctl32/commctrl.c
+0
-2
propsheet.c
dlls/comctl32/propsheet.c
+53
-55
taskdialog.c
dlls/comctl32/taskdialog.c
+5
-7
treeview.c
dlls/comctl32/treeview.c
+1
-3
No files found.
dlls/comctl32/commctrl.c
View file @
22c56f97
...
@@ -59,8 +59,6 @@
...
@@ -59,8 +59,6 @@
#include <stdlib.h>
#include <stdlib.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
...
...
dlls/comctl32/propsheet.c
View file @
22c56f97
...
@@ -52,8 +52,6 @@
...
@@ -52,8 +52,6 @@
#include <stdarg.h>
#include <stdarg.h>
#include <string.h>
#include <string.h>
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
...
@@ -393,24 +391,24 @@ static const DLGTEMPLATE* HPSP_load_template(HPROPSHEETPAGE hpsp, DWORD *size)
...
@@ -393,24 +391,24 @@ static const DLGTEMPLATE* HPSP_load_template(HPROPSHEETPAGE hpsp, DWORD *size)
if
(
hpsp
->
pspW
.
dwFlags
&
PSP_DLGINDIRECT
)
if
(
hpsp
->
pspW
.
dwFlags
&
PSP_DLGINDIRECT
)
{
{
if
(
size
)
if
(
size
)
*
size
=
get_template_size
(
hpsp
->
pspW
.
u
.
pResource
);
*
size
=
get_template_size
(
hpsp
->
pspW
.
pResource
);
return
hpsp
->
pspW
.
u
.
pResource
;
return
hpsp
->
pspW
.
pResource
;
}
}
hinst
=
hpsp
->
pspW
.
hInstance
;
hinst
=
hpsp
->
pspW
.
hInstance
;
res
=
FindResourceW
(
hinst
,
hpsp
->
pspW
.
u
.
pszTemplate
,
(
LPWSTR
)
RT_DIALOG
);
res
=
FindResourceW
(
hinst
,
hpsp
->
pspW
.
pszTemplate
,
(
LPWSTR
)
RT_DIALOG
);
}
}
else
else
{
{
if
(
hpsp
->
pspA
.
dwFlags
&
PSP_DLGINDIRECT
)
if
(
hpsp
->
pspA
.
dwFlags
&
PSP_DLGINDIRECT
)
{
{
if
(
size
)
if
(
size
)
*
size
=
get_template_size
(
hpsp
->
pspA
.
u
.
pResource
);
*
size
=
get_template_size
(
hpsp
->
pspA
.
pResource
);
return
hpsp
->
pspA
.
u
.
pResource
;
return
hpsp
->
pspA
.
pResource
;
}
}
hinst
=
hpsp
->
pspA
.
hInstance
;
hinst
=
hpsp
->
pspA
.
hInstance
;
res
=
FindResourceA
(
hinst
,
hpsp
->
pspA
.
u
.
pszTemplate
,
(
LPSTR
)
RT_DIALOG
);
res
=
FindResourceA
(
hinst
,
hpsp
->
pspA
.
pszTemplate
,
(
LPSTR
)
RT_DIALOG
);
}
}
if
(
size
)
if
(
size
)
...
@@ -466,12 +464,12 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
...
@@ -466,12 +464,12 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
int
cx
=
GetSystemMetrics
(
SM_CXSMICON
);
int
cx
=
GetSystemMetrics
(
SM_CXSMICON
);
int
cy
=
GetSystemMetrics
(
SM_CYSMICON
);
int
cy
=
GetSystemMetrics
(
SM_CYSMICON
);
ret
=
LoadImageW
(
hpsp
->
pspW
.
hInstance
,
hpsp
->
pspW
.
u2
.
pszIcon
,
IMAGE_ICON
,
ret
=
LoadImageW
(
hpsp
->
pspW
.
hInstance
,
hpsp
->
pspW
.
pszIcon
,
IMAGE_ICON
,
cx
,
cy
,
LR_DEFAULTCOLOR
);
cx
,
cy
,
LR_DEFAULTCOLOR
);
}
}
else
else
{
{
ret
=
hpsp
->
pspW
.
u2
.
hIcon
;
ret
=
hpsp
->
pspW
.
hIcon
;
}
}
}
}
else
else
...
@@ -481,12 +479,12 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
...
@@ -481,12 +479,12 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
int
cx
=
GetSystemMetrics
(
SM_CXSMICON
);
int
cx
=
GetSystemMetrics
(
SM_CXSMICON
);
int
cy
=
GetSystemMetrics
(
SM_CYSMICON
);
int
cy
=
GetSystemMetrics
(
SM_CYSMICON
);
ret
=
LoadImageA
(
hpsp
->
pspA
.
hInstance
,
hpsp
->
pspA
.
u2
.
pszIcon
,
IMAGE_ICON
,
ret
=
LoadImageA
(
hpsp
->
pspA
.
hInstance
,
hpsp
->
pspA
.
pszIcon
,
IMAGE_ICON
,
cx
,
cy
,
LR_DEFAULTCOLOR
);
cx
,
cy
,
LR_DEFAULTCOLOR
);
}
}
else
else
{
{
ret
=
hpsp
->
pspA
.
u2
.
hIcon
;
ret
=
hpsp
->
pspA
.
hIcon
;
}
}
}
}
...
@@ -496,8 +494,8 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
...
@@ -496,8 +494,8 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
static
LRESULT
HPSP_get_template
(
HPROPSHEETPAGE
hpsp
)
static
LRESULT
HPSP_get_template
(
HPROPSHEETPAGE
hpsp
)
{
{
if
(
hpsp
->
unicode
)
if
(
hpsp
->
unicode
)
return
(
LRESULT
)
hpsp
->
pspW
.
u
.
pszTemplate
;
return
(
LRESULT
)
hpsp
->
pspW
.
pszTemplate
;
return
(
LRESULT
)
hpsp
->
pspA
.
u
.
pszTemplate
;
return
(
LRESULT
)
hpsp
->
pspA
.
pszTemplate
;
}
}
static
HWND
HPSP_create_page
(
HPROPSHEETPAGE
hpsp
,
DLGTEMPLATE
*
template
,
HWND
parent
)
static
HWND
HPSP_create_page
(
HPROPSHEETPAGE
hpsp
,
DLGTEMPLATE
*
template
,
HWND
parent
)
...
@@ -734,7 +732,7 @@ static void PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
...
@@ -734,7 +732,7 @@ static void PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
psInfo
->
active_page
=
0
;
psInfo
->
active_page
=
0
;
}
}
else
else
psInfo
->
active_page
=
lppsh
->
u2
.
nStartPage
;
psInfo
->
active_page
=
lppsh
->
nStartPage
;
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
}
}
...
@@ -771,7 +769,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
...
@@ -771,7 +769,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
psInfo
->
active_page
=
0
;
psInfo
->
active_page
=
0
;
}
}
else
else
psInfo
->
active_page
=
lppsh
->
u2
.
nStartPage
;
psInfo
->
active_page
=
lppsh
->
nStartPage
;
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
}
}
...
@@ -1633,16 +1631,16 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo)
...
@@ -1633,16 +1631,16 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo)
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
&&
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
&&
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMWATERMARK
))
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMWATERMARK
))
{
{
psInfo
->
ppshheader
.
u4
.
hbmWatermark
=
psInfo
->
ppshheader
.
hbmWatermark
=
CreateMappedBitmap
(
psInfo
->
ppshheader
.
hInstance
,
(
INT_PTR
)
psInfo
->
ppshheader
.
u4
.
pszbmWatermark
,
0
,
NULL
,
0
);
CreateMappedBitmap
(
psInfo
->
ppshheader
.
hInstance
,
(
INT_PTR
)
psInfo
->
ppshheader
.
pszbmWatermark
,
0
,
NULL
,
0
);
}
}
/* Same behavior as for watermarks */
/* Same behavior as for watermarks */
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
)
&&
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
)
&&
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
))
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
))
{
{
psInfo
->
ppshheader
.
u5
.
hbmHeader
=
psInfo
->
ppshheader
.
hbmHeader
=
CreateMappedBitmap
(
psInfo
->
ppshheader
.
hInstance
,
(
INT_PTR
)
psInfo
->
ppshheader
.
u5
.
pszbmHeader
,
0
,
NULL
,
0
);
CreateMappedBitmap
(
psInfo
->
ppshheader
.
hInstance
,
(
INT_PTR
)
psInfo
->
ppshheader
.
pszbmHeader
,
0
,
NULL
,
0
);
}
}
}
}
}
}
...
@@ -2874,10 +2872,10 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
...
@@ -2874,10 +2872,10 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
/* If we created the bitmaps, destroy them */
/* If we created the bitmaps, destroy them */
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
&&
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
&&
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMWATERMARK
))
)
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMWATERMARK
))
)
DeleteObject
(
psInfo
->
ppshheader
.
u4
.
hbmWatermark
);
DeleteObject
(
psInfo
->
ppshheader
.
hbmWatermark
);
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
)
&&
if
((
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
)
&&
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
))
)
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
))
)
DeleteObject
(
psInfo
->
ppshheader
.
u5
.
hbmHeader
);
DeleteObject
(
psInfo
->
ppshheader
.
hbmHeader
);
Free
(
psInfo
->
proppage
);
Free
(
psInfo
->
proppage
);
Free
(
psInfo
->
strPropertiesFor
);
Free
(
psInfo
->
strPropertiesFor
);
...
@@ -2968,21 +2966,21 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
...
@@ -2968,21 +2966,21 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
PROPSHEET_CollectSheetInfoA
(
lppsh
,
psInfo
);
PROPSHEET_CollectSheetInfoA
(
lppsh
,
psInfo
);
psInfo
->
proppage
=
Alloc
(
sizeof
(
PropPageInfo
)
*
lppsh
->
nPages
);
psInfo
->
proppage
=
Alloc
(
sizeof
(
PropPageInfo
)
*
lppsh
->
nPages
);
pByte
=
(
const
BYTE
*
)
psInfo
->
ppshheader
.
u3
.
ppsp
;
pByte
=
(
const
BYTE
*
)
psInfo
->
ppshheader
.
ppsp
;
for
(
n
=
i
=
0
;
i
<
lppsh
->
nPages
;
i
++
,
n
++
)
for
(
n
=
i
=
0
;
i
<
lppsh
->
nPages
;
i
++
,
n
++
)
{
{
if
(
!
psInfo
->
usePropPage
)
if
(
!
psInfo
->
usePropPage
)
{
{
if
(
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]
&&
if
(
psInfo
->
ppshheader
.
phpage
[
i
]
&&
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]
->
magic
==
HPROPSHEETPAGE_MAGIC
)
psInfo
->
ppshheader
.
phpage
[
i
]
->
magic
==
HPROPSHEETPAGE_MAGIC
)
{
{
psInfo
->
proppage
[
n
].
hpage
=
psInfo
->
ppshheader
.
u3
.
phpage
[
i
];
psInfo
->
proppage
[
n
].
hpage
=
psInfo
->
ppshheader
.
phpage
[
i
];
}
}
else
else
{
{
psInfo
->
proppage
[
n
].
hpage
=
CreatePropertySheetPageA
(
psInfo
->
proppage
[
n
].
hpage
=
CreatePropertySheetPageA
(
(
const
PROPSHEETPAGEA
*
)
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]);
(
const
PROPSHEETPAGEA
*
)
psInfo
->
ppshheader
.
phpage
[
i
]);
}
}
}
}
else
else
...
@@ -3019,21 +3017,21 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
...
@@ -3019,21 +3017,21 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
PROPSHEET_CollectSheetInfoW
(
lppsh
,
psInfo
);
PROPSHEET_CollectSheetInfoW
(
lppsh
,
psInfo
);
psInfo
->
proppage
=
Alloc
(
sizeof
(
PropPageInfo
)
*
lppsh
->
nPages
);
psInfo
->
proppage
=
Alloc
(
sizeof
(
PropPageInfo
)
*
lppsh
->
nPages
);
pByte
=
(
const
BYTE
*
)
psInfo
->
ppshheader
.
u3
.
ppsp
;
pByte
=
(
const
BYTE
*
)
psInfo
->
ppshheader
.
ppsp
;
for
(
n
=
i
=
0
;
i
<
lppsh
->
nPages
;
i
++
,
n
++
)
for
(
n
=
i
=
0
;
i
<
lppsh
->
nPages
;
i
++
,
n
++
)
{
{
if
(
!
psInfo
->
usePropPage
)
if
(
!
psInfo
->
usePropPage
)
{
{
if
(
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]
&&
if
(
psInfo
->
ppshheader
.
phpage
[
i
]
&&
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]
->
magic
==
HPROPSHEETPAGE_MAGIC
)
psInfo
->
ppshheader
.
phpage
[
i
]
->
magic
==
HPROPSHEETPAGE_MAGIC
)
{
{
psInfo
->
proppage
[
n
].
hpage
=
psInfo
->
ppshheader
.
u3
.
phpage
[
i
];
psInfo
->
proppage
[
n
].
hpage
=
psInfo
->
ppshheader
.
phpage
[
i
];
}
}
else
else
{
{
psInfo
->
proppage
[
n
].
hpage
=
CreatePropertySheetPageW
(
psInfo
->
proppage
[
n
].
hpage
=
CreatePropertySheetPageW
(
(
const
PROPSHEETPAGEW
*
)
psInfo
->
ppshheader
.
u3
.
phpage
[
i
]);
(
const
PROPSHEETPAGEW
*
)
psInfo
->
ppshheader
.
phpage
[
i
]);
}
}
}
}
else
else
...
@@ -3084,14 +3082,14 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
...
@@ -3084,14 +3082,14 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
{
{
if
(
!
IS_INTRESOURCE
(
ppsp
->
u
.
pszTemplate
))
if
(
!
IS_INTRESOURCE
(
ppsp
->
pszTemplate
))
ppsp
->
u
.
pszTemplate
=
heap_strdupA
(
lpPropSheetPage
->
u
.
pszTemplate
);
ppsp
->
pszTemplate
=
heap_strdupA
(
lpPropSheetPage
->
pszTemplate
);
}
}
if
(
ppsp
->
dwFlags
&
PSP_USEICONID
)
if
(
ppsp
->
dwFlags
&
PSP_USEICONID
)
{
{
if
(
!
IS_INTRESOURCE
(
ppsp
->
u2
.
pszIcon
))
if
(
!
IS_INTRESOURCE
(
ppsp
->
pszIcon
))
ppsp
->
u2
.
pszIcon
=
heap_strdupA
(
lpPropSheetPage
->
u2
.
pszIcon
);
ppsp
->
pszIcon
=
heap_strdupA
(
lpPropSheetPage
->
pszIcon
);
}
}
if
(
ppsp
->
dwFlags
&
PSP_USETITLE
)
if
(
ppsp
->
dwFlags
&
PSP_USETITLE
)
...
@@ -3140,14 +3138,14 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
...
@@ -3140,14 +3138,14 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
{
{
if
(
!
IS_INTRESOURCE
(
ppsp
->
u
.
pszTemplate
))
if
(
!
IS_INTRESOURCE
(
ppsp
->
pszTemplate
))
ppsp
->
u
.
pszTemplate
=
heap_strdupW
(
lpPropSheetPage
->
u
.
pszTemplate
);
ppsp
->
pszTemplate
=
heap_strdupW
(
lpPropSheetPage
->
pszTemplate
);
}
}
if
(
ppsp
->
dwFlags
&
PSP_USEICONID
)
if
(
ppsp
->
dwFlags
&
PSP_USEICONID
)
{
{
if
(
!
IS_INTRESOURCE
(
ppsp
->
u2
.
pszIcon
))
if
(
!
IS_INTRESOURCE
(
ppsp
->
pszIcon
))
ppsp
->
u2
.
pszIcon
=
heap_strdupW
(
lpPropSheetPage
->
u2
.
pszIcon
);
ppsp
->
pszIcon
=
heap_strdupW
(
lpPropSheetPage
->
pszIcon
);
}
}
if
(
ppsp
->
dwFlags
&
PSP_USETITLE
)
if
(
ppsp
->
dwFlags
&
PSP_USETITLE
)
...
@@ -3197,11 +3195,11 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hpsp)
...
@@ -3197,11 +3195,11 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hpsp)
{
{
PROPSHEETPAGEW
*
psp
=
&
hpsp
->
pspW
;
PROPSHEETPAGEW
*
psp
=
&
hpsp
->
pspW
;
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTemplate
))
Free
((
void
*
)
psp
->
u
.
pszTemplate
);
Free
((
void
*
)
psp
->
pszTemplate
);
if
((
psp
->
dwFlags
&
PSP_USEICONID
)
&&
!
IS_INTRESOURCE
(
psp
->
u2
.
pszIcon
))
if
((
psp
->
dwFlags
&
PSP_USEICONID
)
&&
!
IS_INTRESOURCE
(
psp
->
pszIcon
))
Free
((
void
*
)
psp
->
u2
.
pszIcon
);
Free
((
void
*
)
psp
->
pszIcon
);
if
((
psp
->
dwFlags
&
PSP_USETITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTitle
))
if
((
psp
->
dwFlags
&
PSP_USETITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTitle
))
Free
((
void
*
)
psp
->
pszTitle
);
Free
((
void
*
)
psp
->
pszTitle
);
...
@@ -3216,11 +3214,11 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hpsp)
...
@@ -3216,11 +3214,11 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hpsp)
{
{
PROPSHEETPAGEA
*
psp
=
&
hpsp
->
pspA
;
PROPSHEETPAGEA
*
psp
=
&
hpsp
->
pspA
;
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTemplate
))
Free
((
void
*
)
psp
->
u
.
pszTemplate
);
Free
((
void
*
)
psp
->
pszTemplate
);
if
((
psp
->
dwFlags
&
PSP_USEICONID
)
&&
!
IS_INTRESOURCE
(
psp
->
u2
.
pszIcon
))
if
((
psp
->
dwFlags
&
PSP_USEICONID
)
&&
!
IS_INTRESOURCE
(
psp
->
pszIcon
))
Free
((
void
*
)
psp
->
u2
.
pszIcon
);
Free
((
void
*
)
psp
->
pszIcon
);
if
((
psp
->
dwFlags
&
PSP_USETITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTitle
))
if
((
psp
->
dwFlags
&
PSP_USETITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTitle
))
Free
((
void
*
)
psp
->
pszTitle
);
Free
((
void
*
)
psp
->
pszTitle
);
...
@@ -3399,9 +3397,9 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
...
@@ -3399,9 +3397,9 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHBMHEADER
)
{
{
hbmp
=
SelectObject
(
hdcSrc
,
psInfo
->
ppshheader
.
u5
.
hbmHeader
);
hbmp
=
SelectObject
(
hdcSrc
,
psInfo
->
ppshheader
.
hbmHeader
);
GetObjectW
(
psInfo
->
ppshheader
.
u5
.
hbmHeader
,
sizeof
(
BITMAP
),
&
bm
);
GetObjectW
(
psInfo
->
ppshheader
.
hbmHeader
,
sizeof
(
BITMAP
),
&
bm
);
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_WIZARD97_OLD
)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_WIZARD97_OLD
)
{
{
/* Fill the unoccupied part of the header with color of the
/* Fill the unoccupied part of the header with color of the
...
@@ -3485,8 +3483,8 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
...
@@ -3485,8 +3483,8 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
hbr
=
GetSysColorBrush
(
COLOR_WINDOW
);
hbr
=
GetSysColorBrush
(
COLOR_WINDOW
);
FillRect
(
hdc
,
&
rzone
,
hbr
);
FillRect
(
hdc
,
&
rzone
,
hbr
);
GetObjectW
(
psInfo
->
ppshheader
.
u4
.
hbmWatermark
,
sizeof
(
BITMAP
),
&
bm
);
GetObjectW
(
psInfo
->
ppshheader
.
hbmWatermark
,
sizeof
(
BITMAP
),
&
bm
);
hbmp
=
SelectObject
(
hdcSrc
,
psInfo
->
ppshheader
.
u4
.
hbmWatermark
);
hbmp
=
SelectObject
(
hdcSrc
,
psInfo
->
ppshheader
.
hbmWatermark
);
/* The watermark is truncated to a width of 164 pixels */
/* The watermark is truncated to a width of 164 pixels */
r
.
right
=
min
(
r
.
right
,
164
);
r
.
right
=
min
(
r
.
right
,
164
);
...
@@ -3574,18 +3572,18 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -3574,18 +3572,18 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEICONID
)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEICONID
)
hIcon
=
LoadImageW
(
psInfo
->
ppshheader
.
hInstance
,
hIcon
=
LoadImageW
(
psInfo
->
ppshheader
.
hInstance
,
psInfo
->
ppshheader
.
u
.
pszIcon
,
psInfo
->
ppshheader
.
pszIcon
,
IMAGE_ICON
,
IMAGE_ICON
,
icon_cx
,
icon_cy
,
icon_cx
,
icon_cy
,
LR_DEFAULTCOLOR
);
LR_DEFAULTCOLOR
);
else
else
hIcon
=
psInfo
->
ppshheader
.
u
.
hIcon
;
hIcon
=
psInfo
->
ppshheader
.
hIcon
;
SendMessageW
(
hwnd
,
WM_SETICON
,
0
,
(
LPARAM
)
hIcon
);
SendMessageW
(
hwnd
,
WM_SETICON
,
0
,
(
LPARAM
)
hIcon
);
}
}
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHICON
)
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHICON
)
SendMessageW
(
hwnd
,
WM_SETICON
,
0
,
(
LPARAM
)
psInfo
->
ppshheader
.
u
.
hIcon
);
SendMessageW
(
hwnd
,
WM_SETICON
,
0
,
(
LPARAM
)
psInfo
->
ppshheader
.
hIcon
);
psInfo
->
strPropertiesFor
=
strCaption
;
psInfo
->
strPropertiesFor
=
strCaption
;
...
...
dlls/comctl32/taskdialog.c
View file @
22c56f97
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
...
@@ -561,11 +559,11 @@ static void taskdialog_check_default_radio_buttons(struct taskdialog_info *dialo
...
@@ -561,11 +559,11 @@ static void taskdialog_check_default_radio_buttons(struct taskdialog_info *dialo
static
void
taskdialog_add_main_icon
(
struct
taskdialog_info
*
dialog_info
)
static
void
taskdialog_add_main_icon
(
struct
taskdialog_info
*
dialog_info
)
{
{
if
(
!
dialog_info
->
taskconfig
->
u
.
hMainIcon
)
return
;
if
(
!
dialog_info
->
taskconfig
->
hMainIcon
)
return
;
dialog_info
->
main_icon
=
dialog_info
->
main_icon
=
CreateWindowW
(
WC_STATICW
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
SS_ICON
,
0
,
0
,
0
,
0
,
dialog_info
->
hwnd
,
NULL
,
0
,
NULL
);
CreateWindowW
(
WC_STATICW
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
SS_ICON
,
0
,
0
,
0
,
0
,
dialog_info
->
hwnd
,
NULL
,
0
,
NULL
);
taskdialog_set_icon
(
dialog_info
,
TDIE_ICON_MAIN
,
dialog_info
->
taskconfig
->
u
.
hMainIcon
);
taskdialog_set_icon
(
dialog_info
,
TDIE_ICON_MAIN
,
dialog_info
->
taskconfig
->
hMainIcon
);
}
}
static
HWND
taskdialog_create_label
(
struct
taskdialog_info
*
dialog_info
,
const
WCHAR
*
text
,
HFONT
font
,
BOOL
syslink
)
static
HWND
taskdialog_create_label
(
struct
taskdialog_info
*
dialog_info
,
const
WCHAR
*
text
,
HFONT
font
,
BOOL
syslink
)
...
@@ -790,11 +788,11 @@ static void taskdialog_add_buttons(struct taskdialog_info *dialog_info)
...
@@ -790,11 +788,11 @@ static void taskdialog_add_buttons(struct taskdialog_info *dialog_info)
static
void
taskdialog_add_footer_icon
(
struct
taskdialog_info
*
dialog_info
)
static
void
taskdialog_add_footer_icon
(
struct
taskdialog_info
*
dialog_info
)
{
{
if
(
!
dialog_info
->
taskconfig
->
u2
.
hFooterIcon
)
return
;
if
(
!
dialog_info
->
taskconfig
->
hFooterIcon
)
return
;
dialog_info
->
footer_icon
=
dialog_info
->
footer_icon
=
CreateWindowW
(
WC_STATICW
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
SS_ICON
,
0
,
0
,
0
,
0
,
dialog_info
->
hwnd
,
NULL
,
0
,
0
);
CreateWindowW
(
WC_STATICW
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
SS_ICON
,
0
,
0
,
0
,
0
,
dialog_info
->
hwnd
,
NULL
,
0
,
0
);
taskdialog_set_icon
(
dialog_info
,
TDIE_ICON_FOOTER
,
dialog_info
->
taskconfig
->
u2
.
hFooterIcon
);
taskdialog_set_icon
(
dialog_info
,
TDIE_ICON_FOOTER
,
dialog_info
->
taskconfig
->
hFooterIcon
);
}
}
static
void
taskdialog_add_footer_text
(
struct
taskdialog_info
*
dialog_info
)
static
void
taskdialog_add_footer_text
(
struct
taskdialog_info
*
dialog_info
)
...
@@ -1414,7 +1412,7 @@ HRESULT WINAPI TaskDialog(HWND owner, HINSTANCE hinst, const WCHAR *title, const
...
@@ -1414,7 +1412,7 @@ HRESULT WINAPI TaskDialog(HWND owner, HINSTANCE hinst, const WCHAR *title, const
taskconfig
.
hInstance
=
hinst
;
taskconfig
.
hInstance
=
hinst
;
taskconfig
.
dwCommonButtons
=
common_buttons
;
taskconfig
.
dwCommonButtons
=
common_buttons
;
taskconfig
.
pszWindowTitle
=
title
;
taskconfig
.
pszWindowTitle
=
title
;
taskconfig
.
u
.
pszMainIcon
=
icon
;
taskconfig
.
pszMainIcon
=
icon
;
taskconfig
.
pszMainInstruction
=
main_instruction
;
taskconfig
.
pszMainInstruction
=
main_instruction
;
taskconfig
.
pszContent
=
content
;
taskconfig
.
pszContent
=
content
;
return
TaskDialogIndirect
(
&
taskconfig
,
button
,
NULL
,
NULL
);
return
TaskDialogIndirect
(
&
taskconfig
,
button
,
NULL
,
NULL
);
...
...
dlls/comctl32/treeview.c
View file @
22c56f97
...
@@ -47,8 +47,6 @@
...
@@ -47,8 +47,6 @@
#include <limits.h>
#include <limits.h>
#include <stdlib.h>
#include <stdlib.h>
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wingdi.h"
#include "wingdi.h"
...
@@ -1229,7 +1227,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
...
@@ -1229,7 +1227,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
static
LRESULT
static
LRESULT
TREEVIEW_InsertItemT
(
TREEVIEW_INFO
*
infoPtr
,
const
TVINSERTSTRUCTW
*
ptdi
,
BOOL
isW
)
TREEVIEW_InsertItemT
(
TREEVIEW_INFO
*
infoPtr
,
const
TVINSERTSTRUCTW
*
ptdi
,
BOOL
isW
)
{
{
const
TVITEMEXW
*
tvItem
=
&
ptdi
->
u
.
itemex
;
const
TVITEMEXW
*
tvItem
=
&
ptdi
->
itemex
;
HTREEITEM
insertAfter
;
HTREEITEM
insertAfter
;
TREEVIEW_ITEM
*
newItem
,
*
parentItem
;
TREEVIEW_ITEM
*
newItem
,
*
parentItem
;
BOOL
bTextUpdated
=
FALSE
;
BOOL
bTextUpdated
=
FALSE
;
...
...
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