openDecal/Native/DenAgent/DownloadDlg.cpp
erik d1442e3747 Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild:

Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil)
Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs
  - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters
  - Decal.Core, DecalControls, DecalRender, D3DService
Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL
Phase 4: DenAgent WinForms tray application
Phase 5: WiX installer and build script

25 C# projects building with 0 errors.
Native C++ projects require VS 2022 + Windows SDK (x86).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:27:56 +01:00

77 lines
No EOL
1.7 KiB
C++

// DownloadDlg.cpp : implementation file
//
#include "stdafx.h"
#include "DenAgent.h"
#include "DownloadDlg.h"
#include "URLCallback.h"
#include "BindStatusCallback.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// cDownloadDlg dialog
cDownloadDlg::cDownloadDlg(CWnd* pParent /*=NULL*/)
: CDialog(cDownloadDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(cDownloadDlg)
//}}AFX_DATA_INIT
}
void cDownloadDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(cDownloadDlg)
DDX_Control(pDX, IDC_STATUSTEXT, m_stIEMsg);
DDX_Control(pDX, IDC_CUSTOMSTATUS, m_stCustomMsg);
DDX_Control(pDX, IDC_STOPDOWNLOAD, m_wndStop);
DDX_Control(pDX, IDC_PROGRESS, m_wndProgress);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(cDownloadDlg, CDialog)
//{{AFX_MSG_MAP(cDownloadDlg)
ON_BN_CLICKED(IDC_STOPDOWNLOAD, OnStopdownload)
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// cDownloadDlg message handlers
void cDownloadDlg::OnStopdownload()
{
m_pCallback->stop();
}
BOOL cDownloadDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Create the URL Bind Context
CComObject< cURLCallback > *pCallback;
CComObject< cURLCallback >::CreateInstance( &pCallback );
m_pCallback = pCallback;
m_pCallback->AddRef();
m_pCallback->m_pDlg = this;
m_pCallback->start( m_clsid, m_strURL, m_dwMajor, m_dwMinor );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void cDownloadDlg::OnDestroy()
{
m_pCallback->Release();
CDialog::OnDestroy();
}