123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #include "stdafx.h"
- #include "uphonebox.h"
- #include "PhoneComing.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- PhoneComing::PhoneComing(CWnd* pParent )
- : CDialog(PhoneComing::IDD, pParent)
- {
-
-
-
- }
- void PhoneComing::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
-
-
-
- }
- BEGIN_MESSAGE_MAP(PhoneComing, CDialog)
-
- ON_WM_TIMER()
-
- END_MESSAGE_MAP()
- void PhoneComing::SetText(int line, CString str)
- {
- CString ss;
- ss.Format("Ïß·: %d À´µç", line + 1);
- SetDlgItemText(IDC_STATIC1, ss);
- SetDlgItemText(IDC_STATIC2, str);
- SetTimer(1, 10000, NULL);
- m_tick = ::GetTickCount();
- }
- void PhoneComing::OnTimer(UINT nIDEvent)
- {
-
- KillTimer(1);
- ShowWindow(SW_HIDE);
- CDialog::OnTimer(nIDEvent);
- }
- BOOL PhoneComing::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- return TRUE;
-
- }
- void PhoneComing::CheckTimer()
- {
- KillTimer(1);
- if (::GetTickCount() - m_tick > 2000)
- ShowWindow(SW_HIDE);
- else
- {
- SetTimer(1, 2000, NULL);
- }
- }
|