Source code of Windows XP (NT5)
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.

57 lines
1.6 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: modlessdlg.h
  4. //
  5. // Module: CMDIAL32.DLL and CMMON32.EXE
  6. //
  7. // Synopsis: Definition of the class CModelessDlg
  8. //
  9. // Copyright (c) 1998-2000 Microsoft Corporation
  10. //
  11. // Author: nickball Created file 03/22/00
  12. //
  13. //+----------------------------------------------------------------------------
  14. #ifndef MODELESSDLG_H
  15. #define MODELESSDLG_H
  16. #include "modaldlg.h"
  17. //+---------------------------------------------------------------------------
  18. //
  19. // class CModelessDlg
  20. //
  21. // Description: A general modeless dialog, call create to CreateDialog
  22. //
  23. // History: fengsun Created 10/30/97
  24. // nickball Added Flash 03/22/00
  25. //
  26. //----------------------------------------------------------------------------
  27. class CModelessDlg :public CModalDlg
  28. {
  29. public:
  30. CModelessDlg(const DWORD* pHelpPairs = NULL, const TCHAR* lpszHelpFile = NULL)
  31. : CModalDlg(pHelpPairs, lpszHelpFile){};
  32. //
  33. // Create the dialog box
  34. //
  35. HWND Create(HINSTANCE hInstance,
  36. LPCTSTR lpTemplateName,
  37. HWND hWndParent);
  38. HWND Create(HINSTANCE hInstance,
  39. DWORD dwTemplateId,
  40. HWND hWndParent);
  41. protected:
  42. virtual void OnOK() {DestroyWindow(m_hWnd);} // WM_COMMAND, IDOK
  43. virtual void OnCancel(){DestroyWindow(m_hWnd);} // WM_COMMAND, IDCANCEL
  44. void Flash();
  45. };
  46. inline HWND CModelessDlg::Create(HINSTANCE hInstance, DWORD dwTemplateId, HWND hWndParent)
  47. {
  48. return Create(hInstance, (LPCTSTR)ULongToPtr(dwTemplateId), hWndParent);
  49. }
  50. #endif