• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_Win32Dlg_FileOpenSaveAs.h

Go to the documentation of this file.
00001 /* AbiSource Application Framework
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef XAP_WIN32DIALOG_FILEOPENSAVEAS_H
00021 #define XAP_WIN32DIALOG_FILEOPENSAVEAS_H
00022 
00023 #include "xap_Dlg_FileOpenSaveAs.h"
00024 #include "xap_Win32DialogBase.h"
00025 
00026 class UT_String;
00027 #include "xap_Frame.h"
00028 
00029 #define DEFAULT_EXT_SIZE 15
00030 
00031 /*****************************************************************/
00032 
00033 class ABI_EXPORT XAP_Win32Dialog_FileOpenSaveAs : public XAP_Dialog_FileOpenSaveAs, public XAP_Win32DialogBase
00034 {
00035 public:
00036     XAP_Win32Dialog_FileOpenSaveAs(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00037     virtual ~XAP_Win32Dialog_FileOpenSaveAs(void);
00038 
00039     virtual void            runModal(XAP_Frame * pFrame);
00040 
00041     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00042     static UINT CALLBACK    s_hookSaveAsProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
00043     static UINT CALLBACK    s_hookInsertPicProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
00044 
00045 protected:
00046     UINT _previewPicture(HWND hwnd);
00047     UINT _initPreviewDlg(HWND hwnd);
00048 
00049     void _buildFilterList(UT_String& sFilter);
00050 private:
00051     const wchar_t * _getDefaultExtension(UT_uint32 indx);
00052     wchar_t m_szDefaultExtension[DEFAULT_EXT_SIZE + 1];
00053 
00054     //
00055     // This the new OPENFILENAME struct included in the most
00056     // recent Plataforms SDK.
00057     //
00058     struct OPENFILENAME_WIN50
00059     {
00060             DWORD         lStructSize;
00061             HWND          hwndOwner;
00062             HINSTANCE     hInstance;
00063             LPCWSTR       lpstrFilter;
00064             LPWSTR        lpstrCustomFilter;
00065             DWORD         nMaxCustFilter;
00066             DWORD         nFilterIndex;
00067             LPWSTR        lpstrFile;
00068             DWORD         nMaxFile;
00069             LPWSTR        lpstrFileTitle;
00070             DWORD         nMaxFileTitle;
00071             LPCWSTR       lpstrInitialDir;
00072             LPCWSTR       lpstrTitle;
00073             DWORD         Flags;
00074             WORD          nFileOffset;
00075             WORD          nFileExtension;
00076             LPCWSTR       lpstrDefExt;
00077             LPARAM        lCustData;
00078             LPOFNHOOKPROC lpfnHook;
00079             LPCWSTR       lpTemplateName;
00080 
00081             //#if (_WIN32_WINNT >= 0x0500)
00082             void *        pvReserved;
00083             DWORD         dwReserved;
00084             DWORD         FlagsEx;
00085             //#endif // (_WIN32_WINNT >= 0x0500)
00086     };
00087 
00088     BOOL GetSaveFileName_Hooked(OPENFILENAME_WIN50* lpofn,  BOOL bSave);
00089 
00090 };
00091 
00092 #endif /* XAP_WIN32DIALOG_FILEOPENSAVEAS_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1