home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / DialogInfo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-02  |  1.6 KB  |  74 lines

  1. // DialogInfo.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Radiant.h"
  6. #include "DialogInfo.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CDialogInfo dialog
  16. CDialogInfo g_dlgInfo;
  17.  
  18. void ShowInfoDialog(const char* pText)
  19. {
  20.   if (g_dlgInfo.GetSafeHwnd())
  21.   {
  22.     g_dlgInfo.m_wndInfo.SetWindowText(pText);
  23.     g_dlgInfo.ShowWindow(SW_SHOW);
  24.   }
  25.   else
  26.   {
  27.     g_dlgInfo.Create(IDD_DLG_INFORMATION);
  28.     g_dlgInfo.m_wndInfo.SetWindowText(pText);
  29.     g_dlgInfo.ShowWindow(SW_SHOW);
  30.   }
  31.   g_pParentWnd->SetFocus();
  32. }
  33.  
  34. void HideInfoDialog()
  35. {
  36.   if (g_dlgInfo.GetSafeHwnd())
  37.     g_dlgInfo.ShowWindow(SW_HIDE);
  38. }
  39.  
  40.  
  41. CDialogInfo::CDialogInfo(CWnd* pParent /*=NULL*/)
  42.     : CDialog(CDialogInfo::IDD, pParent)
  43. {
  44.     //{{AFX_DATA_INIT(CDialogInfo)
  45.     //}}AFX_DATA_INIT
  46. }
  47.  
  48.  
  49. void CDialogInfo::DoDataExchange(CDataExchange* pDX)
  50. {
  51.     CDialog::DoDataExchange(pDX);
  52.     //{{AFX_DATA_MAP(CDialogInfo)
  53.     DDX_Control(pDX, IDC_EDIT1, m_wndInfo);
  54.     //}}AFX_DATA_MAP
  55. }
  56.  
  57.  
  58. BEGIN_MESSAGE_MAP(CDialogInfo, CDialog)
  59.     //{{AFX_MSG_MAP(CDialogInfo)
  60.     //}}AFX_MSG_MAP
  61. END_MESSAGE_MAP()
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CDialogInfo message handlers
  65.  
  66. BOOL CDialogInfo::OnInitDialog() 
  67. {
  68.     CDialog::OnInitDialog();
  69.     // TODO: Add extra initialization here
  70.     
  71.     return TRUE;  // return TRUE unless you set the focus to a control
  72.                   // EXCEPTION: OCX Property Pages should return FALSE
  73. }
  74.