Leaked source code of windows server 2003
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.

56 lines
894 B

  1. #pragma once
  2. class CWaitDlg : public CDialogImpl<CWaitDlg>
  3. {
  4. public:
  5. enum { IDD = IDD_WAITDLG };
  6. BEGIN_MSG_MAP(CMyDialog)
  7. MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
  8. END_MSG_MAP()
  9. CWaitDlg( HWND hParent, UINT nResID ) :
  10. m_nTextResID( nResID )
  11. {
  12. Create( hParent );
  13. ShowWindow( SW_SHOW );
  14. UpdateWindow();
  15. }
  16. ~CWaitDlg()
  17. {
  18. if ( m_hWnd != NULL )
  19. {
  20. VERIFY( DestroyWindow() );
  21. }
  22. }
  23. LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/ )
  24. {
  25. CString strText;
  26. VERIFY( strText.LoadString( m_nTextResID ) );
  27. VERIFY( SetDlgItemText( IDC_TEXT, strText ) );
  28. return 1;
  29. }
  30. private:
  31. CWaitCursor wc;
  32. UINT m_nTextResID;
  33. };