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
d495cc37
Commit
d495cc37
authored
Sep 03, 2014
by
David Hedberg
Committed by
Alexandre Julliard
Sep 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Expand the filetype combobox dropdown to fit the contents.
parent
dc7f17ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
comdlg32.rc
dlls/comdlg32/comdlg32.rc
+1
-1
itemdlg.c
dlls/comdlg32/itemdlg.c
+23
-1
No files found.
dlls/comdlg32/comdlg32.rc
View file @
d495cc37
...
...
@@ -487,7 +487,7 @@ FONT 8, "MS Shell Dlg"
EDITTEXT IDC_FILENAME, 226, 240, 100, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP
LTEXT "Files of type:", IDC_FILETYPESTATIC, 160, 256, 60, 9, SS_RIGHT
COMBOBOX IDC_FILETYPE, 226, 256, 100, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
COMBOBOX IDC_FILETYPE, 226, 256, 100, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
WS_VSCROLL |
CBS_HASSTRINGS | CBS_DROPDOWNLIST
DEFPUSHBUTTON "&Open", IDOK, 350, 240, 40, 14, WS_GROUP
...
...
dlls/comdlg32/itemdlg.c
View file @
d495cc37
...
...
@@ -1535,10 +1535,32 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam)
hitem
=
GetDlgItem
(
This
->
dlg_hwnd
,
IDC_FILETYPE
);
if
(
This
->
filterspec_count
)
{
UINT
i
;
HDC
hdc
;
HFONT
font
;
SIZE
size
;
UINT
i
,
maxwidth
=
0
;
hdc
=
GetDC
(
hitem
);
font
=
(
HFONT
)
SendMessageW
(
hitem
,
WM_GETFONT
,
0
,
0
);
SelectObject
(
hdc
,
font
);
for
(
i
=
0
;
i
<
This
->
filterspec_count
;
i
++
)
{
SendMessageW
(
hitem
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
This
->
filterspecs
[
i
].
pszName
);
if
(
GetTextExtentPoint32W
(
hdc
,
This
->
filterspecs
[
i
].
pszName
,
lstrlenW
(
This
->
filterspecs
[
i
].
pszName
),
&
size
))
maxwidth
=
max
(
maxwidth
,
size
.
cx
);
}
ReleaseDC
(
hitem
,
hdc
);
if
(
maxwidth
>
0
)
{
maxwidth
+=
GetSystemMetrics
(
SM_CXVSCROLL
)
+
4
;
SendMessageW
(
hitem
,
CB_SETDROPPEDWIDTH
,
(
WPARAM
)
maxwidth
,
0
);
}
else
ERR
(
"Failed to calculate width of filetype dropdown
\n
"
);
SendMessageW
(
hitem
,
CB_SETCURSEL
,
This
->
filetypeindex
,
0
);
}
else
...
...
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