Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
a595c119
Commit
a595c119
authored
8 years ago
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update file_op
parent
295cdfc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
file_op.h
win32/file_op.h
+4
-1
No files found.
win32/file_op.h
View file @
a595c119
...
@@ -46,7 +46,7 @@ inline bool get_file_open_dialog_result(std::wstring& path, HWND hWnd = nullptr)
...
@@ -46,7 +46,7 @@ inline bool get_file_open_dialog_result(std::wstring& path, HWND hWnd = nullptr)
}
}
inline
bool
get_save_as_dialog_path
(
std
::
wstring
&
path
,
HWND
hWnd
=
nullptr
)
{
inline
bool
get_save_as_dialog_path
(
std
::
wstring
&
path
,
const
std
::
wstring
&
ext
=
L""
,
HWND
hWnd
=
nullptr
)
{
bool
ok
=
false
;
bool
ok
=
false
;
HRESULT
hr
=
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
|
HRESULT
hr
=
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
|
...
@@ -61,6 +61,9 @@ inline bool get_save_as_dialog_path(std::wstring& path, HWND hWnd = nullptr) {
...
@@ -61,6 +61,9 @@ inline bool get_save_as_dialog_path(std::wstring& path, HWND hWnd = nullptr) {
IID_IFileSaveDialog
,
reinterpret_cast
<
void
**>
(
&
pFileSave
));
IID_IFileSaveDialog
,
reinterpret_cast
<
void
**>
(
&
pFileSave
));
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
))
{
pFileSave
->
SetDefaultExtension
(
ext
.
c_str
());
// Show the Open dialog box.
// Show the Open dialog box.
hr
=
pFileSave
->
Show
(
hWnd
);
hr
=
pFileSave
->
Show
(
hWnd
);
...
...
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