mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-21 23:13:08 +08:00
Improve: Showing file transmit progress dialog
This commit is contained in:
40
server/2015Remote/CDlgFileSend.h
Normal file
40
server/2015Remote/CDlgFileSend.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "IOCPServer.h"
|
||||
#include "afxdialogex.h"
|
||||
#include <resource.h>
|
||||
#include"file_upload.h"
|
||||
|
||||
#define WM_UPDATEFILEPROGRESS (WM_USER + 0x100)
|
||||
#define WM_FINISHFILESEND (WM_USER + 0x101)
|
||||
|
||||
// CDlgFileSend 对话框
|
||||
|
||||
class CDlgFileSend : public DialogBase
|
||||
{
|
||||
DECLARE_DYNAMIC(CDlgFileSend)
|
||||
|
||||
public:
|
||||
CDlgFileSend(CWnd* pParent = NULL, Server* IOCPServer = NULL,
|
||||
CONTEXT_OBJECT* ContextObject = NULL, BOOL sendFile = TRUE);
|
||||
virtual ~CDlgFileSend();
|
||||
void OnReceiveComplete(void);
|
||||
void UpdateProgress(CString file, const FileChunkPacket *chunk);
|
||||
void FinishFileSend(BOOL succeed);
|
||||
|
||||
BOOL m_bIsSending;
|
||||
enum { IDD = IDD_DIALOG_FILESEND };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
afx_msg LRESULT OnUpdateFileProgress(WPARAM wParam, LPARAM lParam);
|
||||
afx_msg LRESULT OnFinishFileSend(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
public:
|
||||
CProgressCtrl m_Progress;
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnClose();
|
||||
};
|
||||
Reference in New Issue
Block a user