Commit 88c4b0d7 authored by Diederik van Arkel's avatar Diederik van Arkel

modern file save dialogue

parent d1c640fe
......@@ -396,7 +396,7 @@ void EvalCcRqALTFILEOPENDIALOG (CrossCallInfo *pcci) /* no params; bool, textp
ofn.pvReserved = NULL;
ofn.dwReserved = 0;
ofn.FlagsEx = 0;
#endif // (_WIN32_WINNT >= 0x0500)
#endif
success = GetOpenFileName (&ofn);
......@@ -415,11 +415,13 @@ void EvalCcRqALTFILEOPENDIALOG (CrossCallInfo *pcci) /* no params; bool, textp
void EvalCcRqALTFILESAVEDIALOG (CrossCallInfo *pcci) /* promptptr, nameptr; bool, textptr result; */
{
OPENFILENAME ofn;
BOOL success;
BOOL recent, success;
char *promptptr;
char *nameptr;
char *okptr;
recent = IsModernPlatform();
promptptr = (char *) pcci->p1;
nameptr = (char *) pcci->p2;
okptr = (char *) pcci->p3;
......@@ -429,8 +431,16 @@ void EvalCcRqALTFILESAVEDIALOG (CrossCallInfo *pcci) /* promptptr, nameptr; boo
deallocate the memory allocated
for this empty string */
ofn.lStructSize = sizeof (OPENFILENAME);
ofn.hwndOwner = GetActiveWindow ();
if (recent)
{
ofn.lStructSize = sizeof (OPENFILENAME);
}
else
{
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
}
ofn.hwndOwner = GetActiveWindow ();
ofn.lpstrFilter = NULL;
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 0;
......@@ -463,9 +473,11 @@ void EvalCcRqALTFILESAVEDIALOG (CrossCallInfo *pcci) /* promptptr, nameptr; boo
ofn.lCustData = okptr;
ofn.lpfnHook = &FileSelectorHook; // PA: &FileSelectorHook instead of NULL from Ronny
ofn.lpTemplateName = NULL;
#if (_WIN32_WINNT >= 0x0500)
ofn.pvReserved = NULL;
ofn.dwReserved = 0;
ofn.FlagsEx = 0;
#endif
success = GetSaveFileName (&ofn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment