ReactOS  0.4.15-dev-439-g292f67a
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 ()
 
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 (int nID)
 
UINT GetDlgItemInt (int nID, BOOL *lpTrans=NULL, BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (int nID, LPTSTR lpStr, int nMaxCount) const
 
BOOL GetDlgItemText (int nID, 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 (LPTSTR lpszStringBuf, int nMaxCount) const
 
BOOL GetWindowText (BSTR &bstrText)
 
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
 

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 265 of file CZipExtract.cpp.

Constructor & Destructor Documentation

◆ CExtractSettingsPage()

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

Definition at line 80 of file CZipExtract.cpp.

86  {
87  m_psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_TITLE);
88  m_psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_WIZ_DEST_SUBTITLE);
89  m_psp.dwFlags |= PSP_USETITLE | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
90  }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDS_WIZ_DEST_TITLE
Definition: resource.h:48
BOOL extract(char *filename, const bin_file *bin)
Definition: mspatcha.c:158
smooth NULL
Definition: ftsmooth.c:416
T1_FIELD_DICT_PRIVATE password
Definition: t1tokens.h:64
#define PSP_USETITLE
Definition: prsht.h:26
#define IDS_WIZ_TITLE
Definition: resource.h:47
#define IDS_WIZ_DEST_SUBTITLE
Definition: resource.h:49

Member Function Documentation

◆ ExtractEntry()

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

Definition at line 159 of file CZipExtract.cpp.

160  {
161  CExtractSettingsPage* pPage = (CExtractSettingsPage*)lpParam;
162  bool res = pPage->m_pExtract->Extract(pPage->m_hWnd, pPage->GetDlgItem(IDC_PROGRESS), &(pPage->m_bExtractionThreadCancel));
163  /* Failing and cancelling extraction both mean we stay on the same property page */
164  pPage->m_bExtractionThreadCancel = !res;
165 
166  pPage->SetWizardButtons(PSWIZB_NEXT);
167  if (!res)
168  {
169  /* Extraction failed/cancelled: the page becomes interactive again */
170  ::EnableWindow(pPage->GetDlgItem(IDC_BROWSE), TRUE);
171  ::EnableWindow(pPage->GetDlgItem(IDC_DIRECTORY), TRUE);
172  ::EnableWindow(pPage->GetDlgItem(IDC_PASSWORD), TRUE);
173 
174  /* Reset the progress bar's appearance */
175  CWindow Progress(pPage->GetDlgItem(IDC_PROGRESS));
176  Progress.SendMessage(PBM_SETRANGE32, 0, 1);
177  Progress.SendMessage(PBM_SETPOS, 0, 0);
178  }
179  SendMessageCallback(pPage->GetParent().m_hWnd, PSM_PRESSBUTTON, PSBTN_NEXT, 0, NULL, NULL);
180 
181  return 0;
182  }
#define PBM_SETRANGE32
Definition: commctrl.h:2184
#define TRUE
Definition: types.h:120
#define IDC_BROWSE
Definition: resource.h:21
BOOL EnableWindow(BOOL bEnable=TRUE)
Definition: atlwin.h:489
#define PSWIZB_NEXT
Definition: prsht.h:154
#define PBM_SETPOS
Definition: commctrl.h:2180
#define IDC_DIRECTORY
Definition: resource.h:10
#define SendMessageCallback
Definition: winuser.h:5819
#define IDC_PROGRESS
Definition: resource.h:13
smooth NULL
Definition: ftsmooth.c:416
CExtractSettingsPage(CZipExtract *extract, CStringA *password)
Definition: CZipExtract.cpp:80
#define PSBTN_NEXT
Definition: prsht.h:147
GLuint res
Definition: glext.h:9613
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
#define PSM_PRESSBUTTON
Definition: prsht.h:100
#define IDC_PASSWORD
Definition: resource.h:12

Referenced by OnWizardNext().

◆ OnBrowse()

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

Definition at line 213 of file CZipExtract.cpp.

214  {
215  BROWSEINFOW bi = { m_hWnd };
217  bi.pszDisplayName = path;
221  bi.lpszTitle = title;
222 
224  UpdateDirectory();
225 
227  bi.lParam = (LPARAM)&info;
228 
230  pidl.Attach(SHBrowseForFolderW(&bi));
231 
232  WCHAR tmpPath[MAX_PATH];
233  if (pidl && SHGetPathFromIDListW(pidl, tmpPath))
234  {
235  m_pExtract->m_Directory = tmpPath;
238  }
239  return 0;
240  }
GLsizei const GLchar ** path
Definition: glext.h:7234
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1288
#define IDC_DIRECTORY
Definition: resource.h:10
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:53
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:26
PCXSTR GetString() const
Definition: atlsimpstr.h:361
HWND m_hWnd
Definition: atlwin.h:268
static INT CALLBACK s_BrowseCallbackProc(HWND hWnd, UINT uMsg, LPARAM lp, LPARAM pData)
LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brsfolder.c:1309
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 242 of file CZipExtract.cpp.

243  {
245  return 0;
246  }
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16

◆ OnPassword()

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

Definition at line 248 of file CZipExtract.cpp.

249  {
252  {
254  }
255  return 0;
256  }
eZipPasswordResponse _CZipAskPassword(HWND hDlg, const char *filename, CStringA &Password)
smooth NULL
Definition: ftsmooth.c:416
HWND m_hWnd
Definition: atlwin.h:268

◆ OnQueryCancel()

BOOL CZipExtract::CExtractSettingsPage::OnQueryCancel ( )
inline

Definition at line 184 of file CZipExtract.cpp.

185  {
186  if (m_hExtractionThread != NULL)
187  {
188  /* Extraction will check the value of m_bExtractionThreadCancel between each file in the archive */
190  return TRUE;
191  }
192  return FALSE;
193  }
#define TRUE
Definition: types.h:120
smooth NULL
Definition: ftsmooth.c:416

◆ OnSetActive()

int CZipExtract::CExtractSettingsPage::OnSetActive ( )
inline

Definition at line 92 of file CZipExtract.cpp.

93  {
98  return 0;
99  }
#define PSWIZB_NEXT
Definition: prsht.h:154
#define IDC_DIRECTORY
Definition: resource.h:10
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:654

◆ OnWizardNext()

int CZipExtract::CExtractSettingsPage::OnWizardNext ( )
inline

Definition at line 101 of file CZipExtract.cpp.

102  {
103  if (m_hExtractionThread != NULL)
104  {
105  /* We enter here when extraction has finished, and go to next page if it succeeded */
109  m_pExtract->Release();
111  {
112  return 0;
113  }
114  else
115  {
117  return TRUE;
118  }
119  }
120 
121  /* We end up here if the user manually clicks Next: start extraction */
123 
124  /* Grey out every control during extraction to prevent user interaction */
128  SetWizardButtons(0);
129 
130  CStringW strExtracting(MAKEINTRESOURCEW(IDS_EXTRACTING));
131  SetDlgItemTextW(IDC_STATUSTEXT, strExtracting);
132 
134  UpdateDirectory();
135 
136  m_pExtract->AddRef();
137 
140  this,
141  0, NULL);
142  if (!m_hExtractionThread)
143  {
144  /* Extraction thread creation failed, do not go to the next page */
145  DWORD err = GetLastError();
146  DPRINT1("ERROR, m_hExtractionThread: CreateThread failed: 0x%x\n", err);
147  m_pExtract->Release();
148 
150 
155  }
156  return TRUE;
157  }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:407
#define IDC_BROWSE
Definition: resource.h:21
BOOL EnableWindow(BOOL bEnable=TRUE)
Definition: atlwin.h:489
#define IDC_STATUSTEXT
Definition: resource.h:40
#define PSWIZB_NEXT
Definition: prsht.h:154
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define IDC_DIRECTORY
Definition: resource.h:10
#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
LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong)
Definition: atlwin.h:1208
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:136
smooth NULL
Definition: ftsmooth.c:416
HWND GetDlgItem(int nID)
Definition: atlwin.h:571
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG AddRef()
#define err(...)
#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:44
#define IDC_PASSWORD
Definition: resource.h:12

◆ s_BrowseCallbackProc()

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

Definition at line 201 of file CZipExtract.cpp.

202  {
203  if (uMsg == BFFM_INITIALIZED)
204  {
206  CWindow dlg(hWnd);
207  dlg.SendMessage(BFFM_SETSELECTION, TRUE, (LPARAM)info->Directory);
208  dlg.CenterWindow(info->hWnd);
209  }
210  return 0;
211  }
#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 258 of file CZipExtract.cpp.

259  {
262  }
#define IDC_DIRECTORY
Definition: resource.h:10
bool m_DirectoryChanged
Definition: CZipExtract.cpp:16
CStringW m_Directory
Definition: CZipExtract.cpp:14
UINT GetDlgItemText(int nID, LPTSTR lpStr, int nMaxCount) const
Definition: atlwin.h:583

Referenced by OnBrowse(), and OnWizardNext().

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_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: