Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00056
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
00082 void * pvReserved;
00083 DWORD dwReserved;
00084 DWORD FlagsEx;
00085
00086 };
00087
00088 BOOL GetSaveFileName_Hooked(OPENFILENAME_WIN50* lpofn, BOOL bSave);
00089
00090 };
00091
00092 #endif