Path: blob/main/crypto/krb5/src/windows/leash/LeashMessageBox.cpp
34889 views
// **************************************************************************************1// File: LeashMessageBox.cpp2// By: Arthur David Leather3// Created: 12/02/984// Copyright @1998 Massachusetts Institute of Technology - All rights reserved.5// Description: CPP file for LeashMessageBox.h. Contains variables and functions6// for the Leash Special Message Dialog Box7//8// History:9//10// MM/DD/YY Inits Description of Change11// 12/02/98 ADL Original12// **************************************************************************************13141516#include "stdafx.h"17#include "leash.h"18#include "LeashMessageBox.h"1920#ifdef _DEBUG21#define new DEBUG_NEW22#undef THIS_FILE23static char THIS_FILE[] = __FILE__;24#endif2526DWORD CLeashMessageBox ::m_dwTime;2728/////////////////////////////////////////////////////////////////////////////29// CLeashMessageBox dialog3031CLeashMessageBox::CLeashMessageBox(CWnd* pParent, const CString msgText, DWORD dwTime)32: CDialog(CLeashMessageBox::IDD, pParent)33{34m_dwTime = dwTime;3536//{{AFX_DATA_INIT(CLeashMessageBox)37m_messageText = _T(msgText);38//}}AFX_DATA_INIT39}4041CLeashMessageBox::~CLeashMessageBox()42{43}4445void CLeashMessageBox::DoDataExchange(CDataExchange* pDX)46{47CDialog::DoDataExchange(pDX);48//{{AFX_DATA_MAP(CLeashMessageBox)49DDX_Text(pDX, IDC_LEASH_WARNING_MSG, m_messageText);50//}}AFX_DATA_MAP51}525354BEGIN_MESSAGE_MAP(CLeashMessageBox, CDialog)55//{{AFX_MSG_MAP(CLeashMessageBox)56ON_WM_DESTROY()57//}}AFX_MSG_MAP58END_MESSAGE_MAP()5960/////////////////////////////////////////////////////////////////////////////61// CLeashMessageBox message handlers6263void CALLBACK CLeashMessageBox::MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT_PTR idEvent, DWORD dwTime)64{65::KillTimer(hwnd, 2);66::SendMessage(hwnd, WM_CLOSE, 0, 0);67}6869void CLeashMessageBox::OnOK()70{71KillTimer(2);72SendMessage(WM_CLOSE, 0, 0);73}7475BOOL CLeashMessageBox::OnInitDialog()76{77CDialog::OnInitDialog();78UINT_PTR idTimer = SetTimer(2, m_dwTime, &MessageBoxTimer);7980return TRUE; // return TRUE unless you set the focus to a control81// EXCEPTION: OCX Property Pages should return FALSE82}838485