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.

75 lines
1.7 KiB

  1. // Copyright (c) 2000 Microsoft Corporation
  2. //
  3. // multi-line edit box control wrapper
  4. //
  5. // 22 Nov 2000 sburns
  6. //
  7. // added to fix NTRAID#NTBUG9-232092-2000/11/22-sburns
  8. #ifndef MULTILINEEDITBOXTHATFORWARDSENTERKEY_HPP_INCLUDED
  9. #define MULTILINEEDITBOXTHATFORWARDSENTERKEY_HPP_INCLUDED
  10. #include "ControlSubclasser.hpp"
  11. // Class for hooking the window proc of a multi-line edit control to cause
  12. // it to forward enter keypresses to its parent window as WM_COMMAND
  13. // messages.
  14. class MultiLineEditBoxThatForwardsEnterKey : public ControlSubclasser
  15. {
  16. public:
  17. static const WORD FORWARDED_ENTER = 1010;
  18. MultiLineEditBoxThatForwardsEnterKey();
  19. virtual
  20. ~MultiLineEditBoxThatForwardsEnterKey();
  21. // subclasses the edit control
  22. //
  23. // editControl - in, handle to the edit control to be hooked. This must be
  24. // a handle to an edit control, or we assert and throw rotten eggs.
  25. HRESULT
  26. Init(HWND editControl);
  27. // Invoked upon receipt of any window message.
  28. //
  29. // message - in, the message code passed to the dialog window.
  30. //
  31. // wparam - in, the WPARAM parameter accompanying the message.
  32. //
  33. // lparam - in, the LPARAM parameter accompanying the message.
  34. LRESULT
  35. OnMessage(
  36. UINT message,
  37. WPARAM wparam,
  38. LPARAM lparam);
  39. private:
  40. // not implemented: no copying allowed
  41. MultiLineEditBoxThatForwardsEnterKey(
  42. const MultiLineEditBoxThatForwardsEnterKey&);
  43. const MultiLineEditBoxThatForwardsEnterKey&
  44. operator=(const MultiLineEditBoxThatForwardsEnterKey&);
  45. };
  46. #endif // MULTILINEEDITBOXTHATFORWARDSENTERKEY_HPP_INCLUDED