Some clean up to Win32 dialogs
This commit is contained in:
parent
1ce2e3980d
commit
d66d39894c
@ -13,7 +13,7 @@ int Dialog_open(wchar_t* path, int pathSize)
|
|||||||
ofn.lpstrFile = path;
|
ofn.lpstrFile = path;
|
||||||
ofn.lpstrFile[0] = '\0';
|
ofn.lpstrFile[0] = '\0';
|
||||||
ofn.nMaxFile = pathSize;
|
ofn.nMaxFile = pathSize;
|
||||||
ofn.lpstrFilter = L"All\0*.*\0Rocket\0*.Rocket\0";
|
ofn.lpstrFilter = L"All Files\0*.*\0Rocket\0*.Rocket\0";
|
||||||
ofn.nFilterIndex = 1;
|
ofn.nFilterIndex = 1;
|
||||||
ofn.lpstrFileTitle = NULL;
|
ofn.lpstrFileTitle = NULL;
|
||||||
ofn.nMaxFileTitle = 0;
|
ofn.nMaxFileTitle = 0;
|
||||||
@ -25,13 +25,12 @@ int Dialog_open(wchar_t* path, int pathSize)
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
int Dialog_save(wchar_t* path, int pathSize)
|
int Dialog_save(wchar_t* path)
|
||||||
{
|
{
|
||||||
OPENFILENAME dialog;
|
OPENFILENAME dialog;
|
||||||
(void)pathSize;
|
|
||||||
ZeroMemory(&dialog, sizeof(dialog));
|
ZeroMemory(&dialog, sizeof(dialog));
|
||||||
dialog.lStructSize = sizeof(dialog);
|
dialog.lStructSize = sizeof(dialog);
|
||||||
dialog.lpstrFilter = L"*All Files (*.*)\0*.*\0";
|
dialog.lpstrFilter = L"All Files (*.*)\0*.*\0";
|
||||||
dialog.lpstrFile = path;
|
dialog.lpstrFile = path;
|
||||||
dialog.nMaxFile = MAX_PATH;
|
dialog.nMaxFile = MAX_PATH;
|
||||||
dialog.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
dialog.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user