mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
Merge pull request #110 from andreas-jonsson/remove_struct
[UPDATE] Remove OPENFILENAMENPP structure.
This commit is contained in:
commit
a7e00affb4
@ -172,7 +172,7 @@ TCHAR * FileDialog::doOpenSingleFileDlg()
|
|||||||
|
|
||||||
TCHAR *fn = NULL;
|
TCHAR *fn = NULL;
|
||||||
try {
|
try {
|
||||||
fn = ::GetOpenFileName((OPENFILENAME*)&_ofn)?_fileName:NULL;
|
fn = ::GetOpenFileName(&_ofn)?_fileName:NULL;
|
||||||
|
|
||||||
if (params->getNppGUI()._openSaveDir == dir_last)
|
if (params->getNppGUI()._openSaveDir == dir_last)
|
||||||
{
|
{
|
||||||
@ -201,7 +201,7 @@ stringVector * FileDialog::doOpenMultiFilesDlg()
|
|||||||
|
|
||||||
_ofn.Flags |= OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
|
_ofn.Flags |= OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
|
||||||
|
|
||||||
BOOL res = ::GetOpenFileName((OPENFILENAME*)&_ofn);
|
BOOL res = ::GetOpenFileName(&_ofn);
|
||||||
if (params->getNppGUI()._openSaveDir == dir_last)
|
if (params->getNppGUI()._openSaveDir == dir_last)
|
||||||
{
|
{
|
||||||
::GetCurrentDirectory(MAX_PATH, dir);
|
::GetCurrentDirectory(MAX_PATH, dir);
|
||||||
@ -253,7 +253,7 @@ TCHAR * FileDialog::doSaveDlg()
|
|||||||
|
|
||||||
TCHAR *fn = NULL;
|
TCHAR *fn = NULL;
|
||||||
try {
|
try {
|
||||||
fn = ::GetSaveFileName((OPENFILENAME*)&_ofn)?_fileName:NULL;
|
fn = ::GetSaveFileName(&_ofn)?_fileName:NULL;
|
||||||
if (params->getNppGUI()._openSaveDir == dir_last)
|
if (params->getNppGUI()._openSaveDir == dir_last)
|
||||||
{
|
{
|
||||||
::GetCurrentDirectory(MAX_PATH, dir);
|
::GetCurrentDirectory(MAX_PATH, dir);
|
||||||
|
@ -36,33 +36,6 @@ using namespace std;
|
|||||||
|
|
||||||
typedef vector<generic_string> stringVector;
|
typedef vector<generic_string> stringVector;
|
||||||
|
|
||||||
struct OPENFILENAMENPP {
|
|
||||||
DWORD lStructSize;
|
|
||||||
HWND hwndOwner;
|
|
||||||
HINSTANCE hInstance;
|
|
||||||
LPCTSTR lpstrFilter;
|
|
||||||
LPTSTR lpstrCustomFilter;
|
|
||||||
DWORD nMaxCustFilter;
|
|
||||||
DWORD nFilterIndex;
|
|
||||||
LPTSTR lpstrFile;
|
|
||||||
DWORD nMaxFile;
|
|
||||||
LPTSTR lpstrFileTitle;
|
|
||||||
DWORD nMaxFileTitle;
|
|
||||||
LPCTSTR lpstrInitialDir;
|
|
||||||
LPCTSTR lpstrTitle;
|
|
||||||
DWORD Flags;
|
|
||||||
WORD nFileOffset;
|
|
||||||
WORD nFileExtension;
|
|
||||||
LPCTSTR lpstrDefExt;
|
|
||||||
LPARAM lCustData;
|
|
||||||
LPOFNHOOKPROC lpfnHook;
|
|
||||||
LPCTSTR lpTemplateName;
|
|
||||||
void * pvReserved;
|
|
||||||
DWORD dwReserved;
|
|
||||||
DWORD FlagsEx;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
generic_string changeExt(generic_string fn, generic_string ext, bool forceReplaced = true);
|
generic_string changeExt(generic_string fn, generic_string ext, bool forceReplaced = true);
|
||||||
void goToCenter(HWND hwnd);
|
void goToCenter(HWND hwnd);
|
||||||
|
|
||||||
@ -96,7 +69,7 @@ private:
|
|||||||
|
|
||||||
stringVector _fileNames;
|
stringVector _fileNames;
|
||||||
|
|
||||||
OPENFILENAMENPP _ofn;
|
OPENFILENAME _ofn;
|
||||||
winVer _winVersion;
|
winVer _winVersion;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user