Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fc86392a
Commit
fc86392a
authored
Jul 09, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve A/W when creating propsheet dialogs.
parent
4f4b980c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
9 deletions
+89
-9
propsheet.c
dlls/comctl32/propsheet.c
+89
-9
No files found.
dlls/comctl32/propsheet.c
View file @
fc86392a
...
...
@@ -78,6 +78,7 @@ typedef struct tagPropSheetInfo
{
HWND
hwnd
;
PROPSHEETHEADERW
ppshheader
;
BOOL
unicode
;
LPWSTR
strPropertiesFor
;
int
nPages
;
int
active_page
;
...
...
@@ -109,6 +110,8 @@ typedef struct
const
WCHAR
PropSheetInfoStr
[]
=
{
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'S'
,
'h'
,
'e'
,
'e'
,
't'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
#define PSP_INTERNAL_UNICODE 0x80000000
#define MAX_CAPTION_LENGTH 255
#define MAX_TABTEXT_LENGTH 255
#define MAX_BUTTONTEXT_LENGTH 64
...
...
@@ -412,7 +415,7 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
*/
if
(
dwFlags
&
PSP_DLGINDIRECT
)
pTemplate
=
(
DLGTEMPLATE
*
)
lppsp
->
u
.
pResource
;
else
else
if
(
dwFlags
&
PSP_INTERNAL_UNICODE
)
{
HRSRC
hResource
=
FindResourceW
(
lppsp
->
hInstance
,
lppsp
->
u
.
pszTemplate
,
...
...
@@ -421,6 +424,15 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
hResource
);
pTemplate
=
(
LPDLGTEMPLATEW
)
LockResource
(
hTemplate
);
}
else
{
HRSRC
hResource
=
FindResourceA
(
lppsp
->
hInstance
,
(
LPSTR
)
lppsp
->
u
.
pszTemplate
,
RT_DIALOGA
);
HGLOBAL
hTemplate
=
LoadResource
(
lppsp
->
hInstance
,
hResource
);
pTemplate
=
(
LPDLGTEMPLATEA
)
LockResource
(
hTemplate
);
}
/*
* Extract the size of the page and the caption.
...
...
@@ -565,10 +577,20 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
if
(
psInfo
->
ppshheader
.
dwFlags
&
INTRNL_ANY_WIZARD
)
resID
=
IDD_WIZARD
;
if
(
!
(
hRes
=
FindResourceW
(
COMCTL32_hModule
,
if
(
psInfo
->
unicode
)
{
if
(
!
(
hRes
=
FindResourceW
(
COMCTL32_hModule
,
MAKEINTRESOURCEW
(
resID
),
RT_DIALOGW
)))
return
-
1
;
return
-
1
;
}
else
{
if
(
!
(
hRes
=
FindResourceA
(
COMCTL32_hModule
,
MAKEINTRESOURCEA
(
resID
),
RT_DIALOGA
)))
return
-
1
;
}
if
(
!
(
template
=
(
LPVOID
)
LoadResource
(
COMCTL32_hModule
,
hRes
)))
return
-
1
;
...
...
@@ -588,20 +610,41 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
if
(
psInfo
->
useCallback
)
(
*
(
psInfo
->
ppshheader
.
pfnCallback
))(
0
,
PSCB_PRECREATE
,
(
LPARAM
)
temp
);
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
if
(
psInfo
->
unicode
)
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
DialogBoxIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
else
{
else
{
ret
=
(
int
)
CreateDialogIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
else
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
DialogBoxIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEA
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
else
{
ret
=
(
int
)
CreateDialogIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEA
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
COMCTL32_Free
(
temp
);
...
...
@@ -1342,7 +1385,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
pTemplate
=
(
DLGTEMPLATE
*
)
ppshpage
->
u
.
pResource
;
resSize
=
GetTemplateSize
(
pTemplate
);
}
else
else
if
(
ppshpage
->
dwFlags
&
PSP_INTERNAL_UNICODE
)
{
HRSRC
hResource
;
HANDLE
hTemplate
;
...
...
@@ -1364,6 +1407,28 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
* Make a copy of the dialog template to make it writable
*/
}
else
{
HRSRC
hResource
;
HANDLE
hTemplate
;
hResource
=
FindResourceA
(
ppshpage
->
hInstance
,
(
LPSTR
)
ppshpage
->
u
.
pszTemplate
,
RT_DIALOGA
);
if
(
!
hResource
)
return
FALSE
;
resSize
=
SizeofResource
(
ppshpage
->
hInstance
,
hResource
);
hTemplate
=
LoadResource
(
ppshpage
->
hInstance
,
hResource
);
if
(
!
hTemplate
)
return
FALSE
;
pTemplate
=
(
LPDLGTEMPLATEA
)
LockResource
(
hTemplate
);
/*
* Make a copy of the dialog template to make it writable
*/
}
temp
=
COMCTL32_Alloc
(
resSize
);
if
(
!
temp
)
return
FALSE
;
...
...
@@ -1400,7 +1465,14 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
PSPCB_CREATE
,
(
LPPROPSHEETPAGEW
)
ppshpage
);
hwndPage
=
CreateDialogIndirectParamW
(
ppshpage
->
hInstance
,
if
(
ppshpage
->
dwFlags
&
PSP_INTERNAL_UNICODE
)
hwndPage
=
CreateDialogIndirectParamW
(
ppshpage
->
hInstance
,
pTemplate
,
hwndParent
,
ppshpage
->
pfnDlgProc
,
(
LPARAM
)
ppshpage
);
else
hwndPage
=
CreateDialogIndirectParamA
(
ppshpage
->
hInstance
,
pTemplate
,
hwndParent
,
ppshpage
->
pfnDlgProc
,
...
...
@@ -2421,6 +2493,7 @@ INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
}
}
psInfo
->
unicode
=
FALSE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
return
bRet
;
...
...
@@ -2465,6 +2538,7 @@ INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
}
}
psInfo
->
unicode
=
TRUE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
return
bRet
;
...
...
@@ -2481,9 +2555,13 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
ppsp
->
dwFlags
&=
~
PSP_INTERNAL_UNICODE
;
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
HIWORD
(
ppsp
->
u
.
pszTemplate
)
)
{
PROPSHEET_AtoW
(
&
ppsp
->
u
.
pszTemplate
,
lpPropSheetPage
->
u
.
pszTemplate
);
int
len
=
strlen
(
lpPropSheetPage
->
u
.
pszTemplate
);
ppsp
->
u
.
pszTemplate
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
);
strcpy
(
(
LPSTR
)
ppsp
->
u
.
pszTemplate
,
lpPropSheetPage
->
u
.
pszTemplate
);
}
if
(
(
ppsp
->
dwFlags
&
PSP_USEICONID
)
&&
HIWORD
(
ppsp
->
u2
.
pszIcon
)
)
{
...
...
@@ -2509,6 +2587,8 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
ppsp
->
dwFlags
|=
PSP_INTERNAL_UNICODE
;
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
HIWORD
(
ppsp
->
u
.
pszTemplate
)
)
{
int
len
=
strlenW
(
lpPropSheetPage
->
u
.
pszTemplate
);
...
...
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