ReactOS  0.4.15-dev-5606-gf34e425
CZipExtract::CExtractSettingsPage Class Reference
Inheritance diagram for CZipExtract::CExtractSettingsPage:
Collaboration diagram for CZipExtract::CExtractSettingsPage:

Classes

struct  browse_info
 

Public Types

enum  { IDD = IDD_PROPPAGEDESTINATION }
 
- Public Types inherited from ATL::CPropertyPageImpl< CExtractSettingsPage >
typedef CPropertyPageImpl< CExtractSettingsPage > thisClass
 
- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 

Public Member Functions

 CExtractSettingsPage (CZipExtract *extract, CStringA *password)
 
int OnSetActive ()
 
int OnWizardNext ()
 
void WizardReset ()
 
BOOL OnQueryCancel ()
 
LRESULT OnBrowse (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnEnChangeDirectory (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnPassword (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
void UpdateDirectory ()
 
- Public Member Functions inherited from ATL::CPropertyPageImpl< CExtractSettingsPage >
 operator PROPSHEETPAGE * ()
 
 CPropertyPageImpl (LPCTSTR lpszTitle=NULL)
 
HPROPSHEETPAGE Create ()
 
BOOL EndDialog (_In_ int nRetCode)
 
void SetModified (BOOL bChanged=TRUE)
 
void SetWizardButtons (DWORD dwFlags)
 
BOOL OnPageCreate ()
 
VOID OnPageAddRef ()
 
VOID OnPageRelease ()
 
int OnSetActive ()
 
BOOL OnKillActive ()
 
int OnApply ()
 
void OnReset ()
 
void OnHelp ()
 
int OnWizardBack ()
 
int OnWizardNext ()
 
BOOL OnWizardFinish ()
 
BOOL OnQueryCancel ()
 
BOOL OnGetObject (LPNMOBJECTNOTIFY lpObjectNotify)
 
int OnTranslateAccelerator (LPMSG lpMsg)
 
HWND OnQueryInitialFocus (HWND hwnd)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CDialogImplBaseT< CWindow >
virtual ~CDialogImplBaseT ()
 
virtual DLGPROC GetDialogProc ()
 
virtual void OnFinalMessage (HWND)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< CWindow >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 

Static Public Member Functions

static DWORD WINAPI ExtractEntry (LPVOID lpParam)
 
static INT CALLBACK s_BrowseCallbackProc (HWND hWnd, UINT uMsg, LPARAM lp, LPARAM pData)
 
- Static Public Member Functions inherited from ATL::CPropertyPageImpl< CExtractSettingsPage >
static UINT CALLBACK PropPageCallback (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
 
- Static Public Member Functions inherited from ATL::CDialogImplBaseT< CWindow >
static INT_PTR CALLBACK StartDialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK DialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 

Private Attributes

HANDLE m_hExtractionThread
 
bool m_bExtractionThreadCancel
 
CZipExtractm_pExtract
 
CStringAm_pPassword
 
CStringW m_OldStatus
 

Additional Inherited Members

- Public Attributes inherited from ATL::CPropertyPageImpl< CExtractSettingsPage >
PROPSHEETPAGE m_psp
 
- Public Attributes inherited from ATL::CWindowImplRoot< CWindow >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 70 of file CZipExtract.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 274 of file CZipExtract.cpp.

Constructor & Destructor Documentation

◆ CExtractSettingsPage()

CZipExtract::CExtractSettingsPage::CExtractSettingsPage ( CZipExtract extract,
CStringA password 
)
inline

Definition at line 81 of file CZipExtract.cpp.

87  {
88  m_psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_TITLE);
89  m_psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_SUBTITLE);
90  m_psp.dwFlags |= PSP_USETITLE | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
91  }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDS_WIZ_DEST_TITLE
Definition: resource.h:59
BOOL extract(char *filename, const bin_file *bin)
Definition: mspatcha.c:158
T1_FIELD_DICT_PRIVATE password
Definition: t1tokens.h:64
#define PSP_USETITLE
Definition: prsht.h:26
#define NULL
Definition: types.h:112
#define IDS_WIZ_TITLE
Definition: resource.h:58
#define IDS_WIZ_DEST_SUBTITLE
Definition: resource.h:60

Member Function Documentation

◆ ExtractEntry()

static DWORD WINAPI CZipExtract::CExtractSettingsPage::ExtractEntry ( LPVOID  lpParam)
inlinestatic

Definition at line 167 of file CZipExtract.cpp.

168  {
169  CExtractSettingsPage* pPage = (CExtractSettingsPage*)lpParam;
170  bool res = pPage->m_pExtract->Extract(pPage->m_hWnd, pPage->GetDlgItem(IDC_PROGRESS), &(pPage->m_bExtractionThreadCancel));
171  /* Failing and cancelling extraction both mean we stay on the same property page */
172  pPage->m_bExtractionThreadCancel = !res;
173 
174  pPage->SetWizardButtons(PSWIZB_NEXT);
175  if (!res)
176  {
177  /* Extraction failed/cancelled: the page becomes interactive again */
178  ::EnableWindow(pPage->GetDlgItem(IDC_BROWSE), TRUE);
179  ::EnableWindow(pPage->GetDlgItem(IDC_DIRECTORY), TRUE);
180  ::EnableWindow(pPage->GetDlgItem(IDC_PASSWORD), TRUE);
181 
182  /* Reset the progress bar's appearance */
183  CWindow Progress(pPage->GetDlgItem(IDC_PROGRESS));
184  Progress.SendMessage(PBM_SETRANGE32, 0, 1);
185  Progress.SendMessage(PBM_SETPOS, 0, 0);
186  pPage->WizardReset();
187  }
188  SendMessageCallback(pPage->GetParent().m_hWnd, PSM_PRESSBUTTON, PSBTN_NEXT, 0, NULL, NULL);
189 
190  return 0;
191  }
#define PBM_SETRANGE32
Definition: commctrl.h:2188
#define TRUE
Definition: types.h:120
#define IDC_BROWSE
Definition: resource.h:21
BOOL EnableWindow(BOOL bEnable=TRUE)
Definition: atlwin.h:517
#define PSWIZB_NEXT
Definition: prsht.h:154
#define PBM_SETPOS
Definition: commctrl.h:2184
#define IDC_DIRECTORY
Definition: resource.h:18
#define SendMessageCallback
Definition: winuser.h:5834
#define IDC_PROGRESS
Definition: resource.h:21
CExtractSettingsPage(CZipExtract *extract, CStringA *password)
Definition: CZipExtract.cpp:81
#define PSBTN_NEXT
Definition: prsht.h:147
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
#define PSM_PRESSBUTTON
Definition: prsht.h:100
#define IDC_PASSWORD
Definition: resource.h:20

Referenced by OnWizardNext().

◆ OnBrowse()

LRESULT CZipExtract::CExtractSettingsPage::OnBrowse ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
inline

Definition at line 222 of file CZipExtract.cpp.

223  {
224  BROWSEINFOW bi = { m_hWnd };
226  bi.pszDisplayName = path;
230  bi.lpszTitle = title;
231 
233  UpdateDirectory();
234 
236  bi.lParam = (LPARAM)&info;
237 
239  pidl.Attach(SHBrowseForFolderW(&bi));
240 
241  WCHAR tmpPath[MAX_PATH];
242  if (pidl && SHGetPathFromIDListW(pidl, tmpPath))
243  {
244  m_pExtract->m_Directory = tmpPath;
247  }
248  return 0;
249  }
GLsizei const GLchar ** path
Definition: glext.h:7234
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
#define IDC_DIRECTORY
Definition: resource.h:18
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16
CStringW m_Directory
Definition: CZipExtract.cpp:14
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
LPWSTR pszDisplayName
Definition: shlobj.h:1129
#define BIF_RETURNFSANCESTORS
Definition: shlobj.h:1147
LONG_PTR LPARAM
Definition: windef.h:208
#define IDS_WIZ_BROWSE_TITLE
Definition: resource.h:64
LPCWSTR lpszTitle
Definition: shlobj.h:1130
#define BIF_NEWDIALOGSTYLE
Definition: shlobj.h:1150
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
PCXSTR GetString() const
Definition: atlsimpstr.h:361
HWND m_hWnd
Definition: atlwin.h:267
static INT CALLBACK s_BrowseCallbackProc(HWND hWnd, UINT uMsg, LPARAM lp, LPARAM pData)
LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brsfolder.c:1406
UINT ulFlags
Definition: shlobj.h:1131
#define BIF_RETURNONLYFSDIRS
Definition: shlobj.h:1144
LPARAM lParam
Definition: shlobj.h:1133
BFFCALLBACK lpfn
Definition: shlobj.h:1132
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
static char title[]
Definition: ps.c:92

◆ OnEnChangeDirectory()

LRESULT CZipExtract::CExtractSettingsPage::OnEnChangeDirectory ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
inline

Definition at line 251 of file CZipExtract.cpp.

252  {
254  return 0;
255  }
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16

◆ OnPassword()

LRESULT CZipExtract::CExtractSettingsPage::OnPassword ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
inline

Definition at line 257 of file CZipExtract.cpp.

258  {
261  {
263  }
264  return 0;
265  }
eZipPasswordResponse _CZipAskPassword(HWND hDlg, const char *filename, CStringA &Password)
HWND m_hWnd
Definition: atlwin.h:267
#define NULL
Definition: types.h:112

◆ OnQueryCancel()

BOOL CZipExtract::CExtractSettingsPage::OnQueryCancel ( )
inline

Definition at line 193 of file CZipExtract.cpp.

194  {
195  if (m_hExtractionThread != NULL)
196  {
197  /* Extraction will check the value of m_bExtractionThreadCancel between each file in the archive */
199  return TRUE;
200  }
201  return FALSE;
202  }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NULL
Definition: types.h:112

◆ OnSetActive()

int CZipExtract::CExtractSettingsPage::OnSetActive ( )
inline

Definition at line 93 of file CZipExtract.cpp.

94  {
99  return 0;
100  }
#define PSWIZB_NEXT
Definition: prsht.h:154
#define IDC_DIRECTORY
Definition: resource.h:18
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16
CStringW m_Directory
Definition: CZipExtract.cpp:14
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
BOOL CenterWindow(HWND hWndCenter=NULL)
Definition: atlwin.h:309
CWindow GetParent() const
Definition: atlwin.h:694

◆ OnWizardNext()

int CZipExtract::CExtractSettingsPage::OnWizardNext ( )
inline

Definition at line 102 of file CZipExtract.cpp.

103  {
104  if (m_hExtractionThread != NULL)
105  {
106  /* We enter here when extraction has finished, and go to next page if it succeeded */
110  m_pExtract->Release();
112  {
113  return 0;
114  }
115  else
116  {
118  return TRUE;
119  }
120  }
121 
122  /* We end up here if the user manually clicks Next: start extraction */
124 
125  /* Grey out every control during extraction to prevent user interaction */
129  SetWizardButtons(0);
130 
133  CStringW strExtracting(MAKEINTRESOURCEW(IDS_EXTRACTING));
134  SetDlgItemTextW(IDC_STATUSTEXT, strExtracting);
135 
137  UpdateDirectory();
138 
139  m_pExtract->AddRef();
140 
143  this,
144  0, NULL);
145  if (!m_hExtractionThread)
146  {
147  /* Extraction thread creation failed, do not go to the next page */
148  DWORD err = GetLastError();
149  DPRINT1("ERROR, m_hExtractionThread: CreateThread failed: 0x%x\n", err);
150  m_pExtract->Release();
151 
153 
158  }
159  return TRUE;
160  }
#define CloseHandle
Definition: compat.h:739
#define TRUE
Definition: types.h:120
#define IDC_BROWSE
Definition: resource.h:21
BOOL EnableWindow(BOOL bEnable=TRUE)
Definition: atlwin.h:517
#define IDC_STATUSTEXT
Definition: resource.h:40
#define PSWIZB_NEXT
Definition: prsht.h:154
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define IDC_DIRECTORY
Definition: resource.h:18
#define DWLP_MSGRESULT
Definition: winuser.h:864
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:372
#define FALSE
Definition: types.h:117
LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong)
Definition: atlwin.h:1270
ULONG Release()
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
HWND GetDlgItem(_In_ int nID) const
Definition: atlwin.h:599
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG AddRef()
#define err(...)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define INFINITE
Definition: serial.h:102
static DWORD WINAPI ExtractEntry(LPVOID lpParam)
#define IDS_EXTRACTING
Definition: resource.h:52
#define IDC_PASSWORD
Definition: resource.h:20

◆ s_BrowseCallbackProc()

static INT CALLBACK CZipExtract::CExtractSettingsPage::s_BrowseCallbackProc ( HWND  hWnd,
UINT  uMsg,
LPARAM  lp,
LPARAM  pData 
)
inlinestatic

Definition at line 210 of file CZipExtract.cpp.

211  {
212  if (uMsg == BFFM_INITIALIZED)
213  {
215  CWindow dlg(hWnd);
216  dlg.SendMessage(BFFM_SETSELECTION, TRUE, (LPARAM)info->Directory);
217  dlg.CenterWindow(info->hWnd);
218  }
219  return 0;
220  }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
#define BFFM_INITIALIZED
Definition: shlobj.h:1163
#define BFFM_SETSELECTION
Definition: shlobj.h:1183
LONG_PTR LPARAM
Definition: windef.h:208
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by OnBrowse().

◆ UpdateDirectory()

void CZipExtract::CExtractSettingsPage::UpdateDirectory ( )
inline

Definition at line 267 of file CZipExtract.cpp.

268  {
271  }
UINT GetDlgItemText(_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
Definition: atlwin.h:614
#define IDC_DIRECTORY
Definition: resource.h:18
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16
CStringW m_Directory
Definition: CZipExtract.cpp:14

Referenced by OnBrowse(), and OnWizardNext().

◆ WizardReset()

void CZipExtract::CExtractSettingsPage::WizardReset ( )
inline

Definition at line 162 of file CZipExtract.cpp.

163  {
165  }
#define IDC_STATUSTEXT
Definition: resource.h:40
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)

Referenced by ExtractEntry().

Member Data Documentation

◆ m_bExtractionThreadCancel

bool CZipExtract::CExtractSettingsPage::m_bExtractionThreadCancel
private

Definition at line 74 of file CZipExtract.cpp.

Referenced by ExtractEntry(), OnQueryCancel(), and OnWizardNext().

◆ m_hExtractionThread

HANDLE CZipExtract::CExtractSettingsPage::m_hExtractionThread
private

Definition at line 73 of file CZipExtract.cpp.

Referenced by OnQueryCancel(), and OnWizardNext().

◆ m_OldStatus

CStringW CZipExtract::CExtractSettingsPage::m_OldStatus
private

Definition at line 78 of file CZipExtract.cpp.

Referenced by OnWizardNext(), and WizardReset().

◆ m_pExtract

CZipExtract* CZipExtract::CExtractSettingsPage::m_pExtract
private

◆ m_pPassword

CStringA* CZipExtract::CExtractSettingsPage::m_pPassword
private

Definition at line 77 of file CZipExtract.cpp.

Referenced by OnPassword().


The documentation for this class was generated from the following file: