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
6056a3f1
Commit
6056a3f1
authored
Aug 24, 2015
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Show open dropdown menu on button press.
parent
bc0abc23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
itemdlg.c
dlls/comdlg32/itemdlg.c
+26
-0
No files found.
dlls/comdlg32/itemdlg.c
View file @
6056a3f1
...
...
@@ -1822,6 +1822,25 @@ static void update_control_text(FileDialogImpl *This)
}
}
static
LRESULT
CALLBACK
dropdown_subclass_proc
(
HWND
hwnd
,
UINT
umessage
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
const
WCHAR
prop_this
[]
=
{
'i'
,
't'
,
'e'
,
'm'
,
'd'
,
'l'
,
'g'
,
'_'
,
'T'
,
'h'
,
'i'
,
's'
,
0
};
static
const
WCHAR
prop_oldwndproc
[]
=
{
'i'
,
't'
,
'e'
,
'm'
,
'd'
,
'l'
,
'g'
,
'_'
,
'o'
,
'l'
,
'd'
,
'w'
,
'n'
,
'd'
,
'p'
,
'r'
,
'o'
,
'c'
,
0
};
if
(
umessage
==
WM_LBUTTONDOWN
)
{
FileDialogImpl
*
This
=
(
FileDialogImpl
*
)
GetPropW
(
hwnd
,
prop_this
);
SendMessageW
(
hwnd
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
show_opendropdown
(
This
);
SendMessageW
(
hwnd
,
BM_SETCHECK
,
BST_UNCHECKED
,
0
);
return
0
;
}
return
CallWindowProcW
((
WNDPROC
)
GetPropW
(
hwnd
,
prop_oldwndproc
),
hwnd
,
umessage
,
wparam
,
lparam
);
}
static
LRESULT
on_wm_initdialog
(
HWND
hwnd
,
LPARAM
lParam
)
{
FileDialogImpl
*
This
=
(
FileDialogImpl
*
)
lParam
;
...
...
@@ -1883,6 +1902,8 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam)
LOGFONTW
lfw
,
lfw_marlett
;
HFONT
dialog_font
;
static
const
WCHAR
marlett
[]
=
{
'M'
,
'a'
,
'r'
,
'l'
,
'e'
,
't'
,
't'
,
0
};
static
const
WCHAR
prop_this
[]
=
{
'i'
,
't'
,
'e'
,
'm'
,
'd'
,
'l'
,
'g'
,
'_'
,
'T'
,
'h'
,
'i'
,
's'
,
0
};
static
const
WCHAR
prop_oldwndproc
[]
=
{
'i'
,
't'
,
'e'
,
'm'
,
'd'
,
'l'
,
'g'
,
'_'
,
'o'
,
'l'
,
'd'
,
'w'
,
'n'
,
'd'
,
'p'
,
'r'
,
'o'
,
'c'
,
0
};
dropdown_hwnd
=
GetDlgItem
(
This
->
dlg_hwnd
,
psh1
);
...
...
@@ -1899,6 +1920,11 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam)
This
->
hfont_opendropdown
=
CreateFontIndirectW
(
&
lfw_marlett
);
SendMessageW
(
dropdown_hwnd
,
WM_SETFONT
,
(
LPARAM
)
This
->
hfont_opendropdown
,
0
);
/* Subclass button so we can handle LBUTTONDOWN */
SetPropW
(
dropdown_hwnd
,
prop_this
,
(
HANDLE
)
This
);
SetPropW
(
dropdown_hwnd
,
prop_oldwndproc
,
(
HANDLE
)
SetWindowLongPtrW
(
dropdown_hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
dropdown_subclass_proc
));
}
ctrl_container_reparent
(
This
,
This
->
dlg_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