home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 8090 / ModelEdit.7z / loadltadlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-08  |  2.7 KB  |  97 lines

  1. #if !defined(AFX_LOADLTADLG_H__F5AB928A_D1C4_49C8_BF1C_14E924EA9DE8__INCLUDED_)
  2. #define AFX_LOADLTADLG_H__F5AB928A_D1C4_49C8_BF1C_14E924EA9DE8__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // loadltadlg.h : header file
  8. //
  9.  
  10. #include "resource.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CLoadLTADlg dialog
  13.  
  14. class CLoadLTADlg : public CDialog
  15. {
  16. // Construction
  17. public:
  18.     CLoadLTADlg(bool bAutoConfirm, CWnd* pParent = NULL);   // standard constructor
  19.  
  20. // Dialog Data
  21.     //{{AFX_DATA(CLoadLTADlg)
  22.     enum { IDD = IDD_LOADLTA };
  23.         // NOTE: the ClassWizard will add data members here
  24.     //}}AFX_DATA
  25.  
  26.     //Thread safe way to add text onto the end of the load log
  27.     static void    AppendLoadLog(const char* pszString);
  28.  
  29.     //Thread safe way to set if the loading thread is done
  30.     static void    SetLoadThreadDone(BOOL bDone);
  31.  
  32.     //Thread safe way to clear the load log
  33.     static void ClearLoadLog();
  34.  
  35.     //the name of the file that is currently being loaded, so that it
  36.     //can be displayed on the dialog
  37.     CString        m_sFilename;
  38.  
  39. // Overrides
  40.     // ClassWizard generated virtual function overrides
  41.     //{{AFX_VIRTUAL(CLoadLTADlg)
  42.     protected:
  43.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  44.     //}}AFX_VIRTUAL
  45.  
  46.  
  47. // Implementation
  48. protected:
  49.  
  50.     // Generated message map functions
  51.     //{{AFX_MSG(CLoadLTADlg)
  52.     afx_msg void OnSaveLoadLog();
  53.     afx_msg void OnTimer(UINT nIDEvent);
  54.     virtual BOOL OnInitDialog();
  55.     afx_msg void OnDestroy();
  56.     virtual void OnOK();
  57.     virtual void OnCancel();
  58.     //}}AFX_MSG
  59.     DECLARE_MESSAGE_MAP()
  60.  
  61.     //Thread safe way to update the load log
  62.     void    UpdateLoadLog();
  63.  
  64.     //Thread safe way to check the done flag, and update the dialog box
  65.     //appropriately
  66.     BOOL    IsDone();
  67.  
  68.     //the status of the loader from the previous check. 
  69.     BOOL    m_bPrevLoaderDone;
  70.  
  71.     enum    {TIMER_ID    = 1000};
  72.  
  73. private:
  74.  
  75.     // if true, the dialog exits automatically once the load is done
  76.     bool m_bAutoConfirm;
  77.  
  78.     //DO NOT ACCESS DIRECTLY. THIS IS A COMMUNICATION POINT
  79.     //FOR MULTIPLE THREADS
  80.     //this string holds all the data that a separate thread loading
  81.     //the LTA file writes to, so it can be appended onto the existing
  82.     //load log
  83.     static CString        sm_sLoadLogPipe;
  84.  
  85.     //DO NOT ACCESS DIRECTLY. THIS IS A COMMUNICATION POINT
  86.     //FOR MULTIPLE THREADS
  87.     //This tells the dialog box if the other thread has finished. If it is
  88.     //false, the thread is still running and the dialog cannot allow the
  89.     //user to select any of the buttons
  90.     static BOOL            sm_bLoadThreadDone;
  91. };
  92.  
  93. //{{AFX_INSERT_LOCATION}}
  94. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  95.  
  96. #endif // !defined(AFX_LOADLTADLG_H__F5AB928A_D1C4_49C8_BF1C_14E924EA9DE8__INCLUDED_)
  97.