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
23571b6a
Commit
23571b6a
authored
May 27, 2011
by
David Hedberg
Committed by
Alexandre Julliard
May 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Implement some functions for modifying custom controls.
parent
bb2230f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
14 deletions
+85
-14
itemdlg.c
dlls/comdlg32/itemdlg.c
+85
-14
itemdlg.c
dlls/comdlg32/tests/itemdlg.c
+0
-0
No files found.
dlls/comdlg32/itemdlg.c
View file @
23571b6a
...
...
@@ -2991,8 +2991,24 @@ static HRESULT WINAPI IFileDialogCustomize_fnSetControlLabel(IFileDialogCustomiz
LPCWSTR
pszLabel
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %s)
\n
"
,
This
,
dwIDCtl
,
debugstr_w
(
pszLabel
));
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
pszLabel
);
if
(
!
ctrl
)
return
E_INVALIDARG
;
switch
(
ctrl
->
type
)
{
case
IDLG_CCTRL_MENU
:
case
IDLG_CCTRL_PUSHBUTTON
:
case
IDLG_CCTRL_CHECKBUTTON
:
case
IDLG_CCTRL_TEXT
:
SendMessageW
(
ctrl
->
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
pszLabel
);
break
;
default:
break
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnGetControlState
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3000,8 +3016,13 @@ static HRESULT WINAPI IFileDialogCustomize_fnGetControlState(IFileDialogCustomiz
CDCONTROLSTATEF
*
pdwState
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
pdwState
);
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
pdwState
);
if
(
!
ctrl
)
return
E_NOTIMPL
;
*
pdwState
=
ctrl
->
cdcstate
;
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnSetControlState
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3009,8 +3030,31 @@ static HRESULT WINAPI IFileDialogCustomize_fnSetControlState(IFileDialogCustomiz
CDCONTROLSTATEF
dwState
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %x)
\n
"
,
This
,
dwIDCtl
,
dwState
);
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %x)
\n
"
,
This
,
dwIDCtl
,
dwState
);
if
(
ctrl
)
{
LONG
wndstyle
=
GetWindowLongW
(
ctrl
->
hwnd
,
GWL_STYLE
);
if
(
dwState
&
CDCS_ENABLED
)
wndstyle
&=
~
(
WS_DISABLED
);
else
wndstyle
|=
WS_DISABLED
;
if
(
dwState
&
CDCS_VISIBLE
)
wndstyle
|=
WS_VISIBLE
;
else
wndstyle
&=
~
(
WS_VISIBLE
);
SetWindowLongW
(
ctrl
->
hwnd
,
GWL_STYLE
,
wndstyle
);
/* We save the state separately since at least one application
* relies on being able to hide a control. */
ctrl
->
cdcstate
=
dwState
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnGetEditBoxText
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3018,8 +3062,19 @@ static HRESULT WINAPI IFileDialogCustomize_fnGetEditBoxText(IFileDialogCustomize
WCHAR
**
ppszText
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
ppszText
);
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
WCHAR
len
,
*
text
;
TRACE
(
"%p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
ppszText
);
if
(
!
ctrl
||
!
(
len
=
SendMessageW
(
ctrl
->
hwnd
,
WM_GETTEXTLENGTH
,
0
,
0
)))
return
E_FAIL
;
text
=
CoTaskMemAlloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
if
(
!
text
)
return
E_FAIL
;
SendMessageW
(
ctrl
->
hwnd
,
WM_GETTEXT
,
len
+
1
,
(
LPARAM
)
text
);
*
ppszText
=
text
;
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnSetEditBoxText
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3027,8 +3082,14 @@ static HRESULT WINAPI IFileDialogCustomize_fnSetEditBoxText(IFileDialogCustomize
LPCWSTR
pszText
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %s)
\n
"
,
This
,
dwIDCtl
,
debugstr_w
(
pszText
));
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %s)
\n
"
,
This
,
dwIDCtl
,
debugstr_w
(
pszText
));
if
(
!
ctrl
||
ctrl
->
type
!=
IDLG_CCTRL_EDITBOX
)
return
E_FAIL
;
SendMessageW
(
ctrl
->
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
pszText
);
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnGetCheckButtonState
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3036,8 +3097,13 @@ static HRESULT WINAPI IFileDialogCustomize_fnGetCheckButtonState(IFileDialogCust
BOOL
*
pbChecked
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
pbChecked
);
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %p)
\n
"
,
This
,
dwIDCtl
,
pbChecked
);
if
(
ctrl
)
*
pbChecked
=
(
SendMessageW
(
ctrl
->
hwnd
,
BM_GETCHECK
,
0
,
0
)
==
BST_CHECKED
);
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnSetCheckButtonState
(
IFileDialogCustomize
*
iface
,
...
...
@@ -3045,8 +3111,13 @@ static HRESULT WINAPI IFileDialogCustomize_fnSetCheckButtonState(IFileDialogCust
BOOL
bChecked
)
{
FileDialogImpl
*
This
=
impl_from_IFileDialogCustomize
(
iface
);
FIXME
(
"stub - %p (%d, %d)
\n
"
,
This
,
dwIDCtl
,
bChecked
);
return
E_NOTIMPL
;
customctrl
*
ctrl
=
get_cctrl
(
This
,
dwIDCtl
);
TRACE
(
"%p (%d, %d)
\n
"
,
This
,
dwIDCtl
,
bChecked
);
if
(
ctrl
)
SendMessageW
(
ctrl
->
hwnd
,
BM_SETCHECK
,
bChecked
?
BST_CHECKED
:
BST_UNCHECKED
,
0
);
return
S_OK
;
}
static
HRESULT
WINAPI
IFileDialogCustomize_fnAddControlItem
(
IFileDialogCustomize
*
iface
,
...
...
dlls/comdlg32/tests/itemdlg.c
View file @
23571b6a
This diff is collapsed.
Click to expand it.
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