ReactOS 0.4.15-dev-8131-g4988de4
CConfirmReplace.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Zip Shell Extension
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Ask the user to replace a file
5 * COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen@reactos.org)
6 * Copyright 2023 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7 */
8
9#include "precomp.h"
10
11class CConfirmReplace : public CDialogImpl<CConfirmReplace>
12{
13private:
15public:
18 {
19 }
20
22 {
24
27
31
32 return TRUE;
33 }
34
35 LRESULT OnButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
36 {
37 EndDialog(wID);
38 return 0;
39 }
40
41public:
43
51};
52
54{
57 INT_PTR Result = confirm.DoModal(hDlg);
58 switch (Result)
59 {
60 case IDYES: return eYes;
61 case IDYESALL: return eYesToAll;
62 default:
63 case IDNO: return eNo;
64 case IDCANCEL: return eCancel;
65 }
66}
eZipConfirmResponse _CZipAskReplace(HWND hDlg, PCWSTR FullPath)
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
static VOID CenterWindow(HWND hWnd)
Definition: reactos.c:48
BOOL EndDialog(_In_ int nRetCode)
Definition: atlwin.h:1519
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
CWindow GetParent() const
Definition: atlwin.h:700
HWND m_hWnd
Definition: atlwin.h:273
CConfirmReplace(PCWSTR filename)
LRESULT OnButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
eZipConfirmResponse
Definition: precomp.h:70
@ eCancel
Definition: precomp.h:74
@ eNo
Definition: precomp.h:73
@ eYes
Definition: precomp.h:71
@ eYesToAll
Definition: precomp.h:72
#define IDYESALL
Definition: resource.h:29
#define IDC_EXCLAMATION_ICON
Definition: resource.h:30
#define IDS_OVERWRITEFILE_TEXT
Definition: resource.h:67
#define IDC_MESSAGE
Definition: resource.h:31
#define IDD_CONFIRM_FILE_REPLACE
Definition: resource.h:28
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:939
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
const char * filename
Definition: ioapi.h:137
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define COMMAND_ID_HANDLER(id, func)
Definition: atlwin.h:1953
#define END_MSG_MAP()
Definition: atlwin.h:1917
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
Definition: tftpd.h:60
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define STM_SETICON
Definition: winuser.h:2092
#define IDCANCEL
Definition: winuser.h:831
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1739
#define IDNO
Definition: winuser.h:836
#define LoadIcon
Definition: winuser.h:5813
#define IDYES
Definition: winuser.h:835
#define SendDlgItemMessage
Definition: winuser.h:5842
#define IDI_EXCLAMATION
Definition: winuser.h:707
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409