Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.7 KiB

  1. // CUploadFiles.h : Declaration of the CCUploadFiles
  2. #ifndef __CUPLOADFILES_H_
  3. #define __CUPLOADFILES_H_
  4. #include "resource.h" // main symbols
  5. #include <atlhost.h>
  6. #include "CompatUI.h"
  7. #include "upload.h"
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CCUploadFiles
  10. class CUploadFiles :
  11. public CAxDialogImpl<CUploadFiles>
  12. {
  13. public:
  14. CUploadFiles() : m_pUpload(NULL)
  15. {
  16. }
  17. ~CUploadFiles()
  18. {
  19. }
  20. VOID SetUploadContext(CUpload* pUpload) {
  21. m_pUpload = pUpload;
  22. }
  23. enum { IDD = IDD_UPLOADFILES };
  24. BEGIN_MSG_MAP(CUploadFiles)
  25. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  26. COMMAND_ID_HANDLER(IDOK, OnOK)
  27. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  28. END_MSG_MAP()
  29. // Handler prototypes:
  30. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  31. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  32. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  33. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  34. {
  35. //
  36. // init text control please
  37. //
  38. wstring strList;
  39. m_pUpload->ListTempFiles(strList);
  40. SetDlgItemText(IDC_UPLOADFILES, strList.c_str());
  41. return 1; // Let the system set the focus
  42. }
  43. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  44. {
  45. EndDialog(wID);
  46. return 0;
  47. }
  48. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  49. {
  50. EndDialog(wID);
  51. return 0;
  52. }
  53. private:
  54. CUpload* m_pUpload;
  55. };
  56. #endif //__CUPLOADFILES_H_