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.

73 lines
2.3 KiB

  1. #ifndef __ERRDLG_H_INCLUDED
  2. #define __ERRDLG_H_INCLUDED
  3. #include <windows.h>
  4. #include <simstr.h>
  5. //
  6. // String constants
  7. //
  8. #define INI_FILE_NAME TEXT("forceerr.ini")
  9. #define GENERAL_SECTION TEXT("ForceError")
  10. #define PROGRAMS_SECTION TEXT("Programs")
  11. #define LAST_PROGRAM TEXT("LastProgram")
  12. class CErrorMessageDialog
  13. {
  14. private:
  15. HWND m_hWnd;
  16. bool m_bErrorStringProvided;
  17. CSimpleString m_strIniFileName;
  18. private:
  19. CErrorMessageDialog();
  20. CErrorMessageDialog( const CErrorMessageDialog & );
  21. CErrorMessageDialog &operator=( const CErrorMessageDialog & );
  22. private:
  23. explicit CErrorMessageDialog( HWND hWnd );
  24. ~CErrorMessageDialog();
  25. private:
  26. void SelectError( HRESULT hrSelect );
  27. void SelectErrorPoint( int nErrorPoint );
  28. LRESULT GetComboBoxItemData( HWND hWnd, LRESULT nIndex, LRESULT nDefault=0 );
  29. CSimpleString GetComboBoxString( HWND hWnd, LRESULT nIndex );
  30. CSimpleString GetCurrentlySelectedComboBoxString( HWND hWnd );
  31. LRESULT GetCurrentComboBoxSelection( HWND hWnd );
  32. LRESULT GetCurrentComboBoxSelectionData( HWND hWnd, LRESULT nDefault = 0 );
  33. CSimpleString GetCurrentlySelectedProgram();
  34. CSimpleString GetIniString( LPCTSTR pszSection, LPCTSTR pszKey, LPCTSTR pszDefault=TEXT("") );
  35. UINT GetIniInt( LPCTSTR pszSection, LPCTSTR pszKey, UINT nDefault=0 );
  36. void HandleErrorSelectionChange();
  37. void HandleProgramsSelectionChange();
  38. void HandlePointSelectionChange();
  39. void PopulateProgramComboBox();
  40. void PopulateErrorPointComboBox();
  41. void PopulateErrorsComboBox();
  42. void InitializeAllFields();
  43. void OnSetError( WPARAM, LPARAM );
  44. void OnRefresh( WPARAM, LPARAM );
  45. void OnCancel( WPARAM, LPARAM );
  46. void OnErrorsSelChange( WPARAM, LPARAM );
  47. void OnPointSelChange( WPARAM, LPARAM );
  48. void OnProgramsSelChange( WPARAM, LPARAM );
  49. void OnClearAll( WPARAM, LPARAM );
  50. LRESULT OnInitDialog( WPARAM, LPARAM );
  51. LRESULT OnDestroy( WPARAM, LPARAM );
  52. LRESULT OnCtlColorStatic( WPARAM wParam, LPARAM lParam );
  53. LRESULT OnCommand( WPARAM wParam, LPARAM lParam );
  54. public:
  55. static INT_PTR __stdcall DialogProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  56. };
  57. #endif // __ERRDLG_H_INCLUDED