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.

82 lines
2.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. sendmsg.hxx
  7. This file contains the Send Message Base Dialog Class definition.
  8. The common code is avail from APPLIB.
  9. FILE HISTORY:
  10. ChuckC 06-Aug-1991 Created
  11. */
  12. #ifndef _SENDMSG_HXX_
  13. #define _SENDMSG_HXX_
  14. #ifndef _BLT_HXX_
  15. #define INCL_BLT_DIALOG
  16. #define INCL_BLT_CONTROL
  17. #include "blt.hxx"
  18. #endif
  19. #include "strlst.hxx"
  20. /*************************************************************************
  21. NAME: MSG_DIALOG_BASE
  22. SYNOPSIS: The base class for send message dialogs,
  23. as per LM NT UI Standards. A new client
  24. will need to redefine 2 methods when
  25. subclassing: QueryUsers() and ActionOnError().
  26. INTERFACE:
  27. QueryUsers() - virtual method to be replaced by
  28. subclasses. This is called when
  29. OK is hit, and it returns a STRLST
  30. of users to send the message to.
  31. ActionOnError() - virtual method which determines
  32. where focus goes on error.
  33. GetAndSendText() - does the real work of calling NETAPI
  34. OnOK() - standard stuff
  35. MSG_DIALOG_BASE() - constructor takes HWND of parent,
  36. a resource name for dialog, and a
  37. CID for the message text MLE.
  38. USES: NLS_STR, STRLIST
  39. CAVEATS:
  40. NOTES:
  41. HISTORY:
  42. ChuckC 06-Aug-1991 Created
  43. beng 05-Oct-1991 Win32 conversion
  44. **************************************************************************/
  45. DLL_CLASS MSG_DIALOG_BASE : public DIALOG_WINDOW
  46. {
  47. private:
  48. MLE _mleTextMsg;
  49. APIERR GetAndSendText();
  50. BOOL OnOK();
  51. protected:
  52. virtual APIERR QueryUsers( STRLIST *pslUsers ) = 0 ;
  53. virtual BOOL ActionOnError( APIERR err ) ;
  54. VOID SetFocusToMLE( VOID ) { _mleTextMsg.ClaimFocus(); }
  55. MSG_DIALOG_BASE( HWND hDlg, const TCHAR *pszResource, CID cidMsgText );
  56. ~MSG_DIALOG_BASE();
  57. public:
  58. };
  59. #endif // _SENDMSG_HXX_