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.

95 lines
3.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltcc.hxx
  7. Custom control header file
  8. This is the parent class for all the custom control objects.
  9. This class is acted as a shadow class and provide those
  10. OnXXX method from DISPATCHER class to all the CC objects.
  11. FILE HISTORY:
  12. terryk 16-Apr-1991 Created
  13. terryk 20-Jun-1991 First code review changed. Attend: beng
  14. terryk 05-Jul-1991 Second code review changed. Attend:
  15. beng chuckc rustanl annmc terryk
  16. terryk 03-Aug-1991 Change Dispatch return type to ULONG
  17. beng 28-May-1992 Major shuffling between bltcc and bltdisph
  18. */
  19. #ifndef _BLTCC_HXX_
  20. #define _BLTCC_HXX_
  21. DLL_CLASS EVENT; // <bltevent.hxx>
  22. DLL_CLASS XYPOINT;
  23. DLL_CLASS QMOUSEACT_EVENT;
  24. extern "C"
  25. {
  26. extern LPARAM _EXPORT APIENTRY BltCCWndProc( HWND hwnd, UINT nMsg,
  27. WPARAM wParam, LPARAM lParam );
  28. }
  29. /*********************************************************************
  30. NAME: CUSTOM_CONTROL
  31. SYNOPSIS: Custom control object class definition
  32. INTERFACE:
  33. CUSTOM_CONTROL() - constructor
  34. ~CUSTOM_CONTROL() - destructor
  35. OnQDlgCode() - let cc return dialog code
  36. OnQHitTest() - let cc return window mouse hit-test
  37. OnQMouseActivate() - let cc be activated by mouseclick
  38. OnQMouseCursor() - let cc change the window cursor
  39. PARENT: DISPATCHER
  40. USES: EVENT, PROC_INSTANCE, WINDOW, XYPOINT, QMOUSEACT_EVENT
  41. CAVEATS: All the custom control objects must use CUSTOM_CONTROL
  42. class as their parent class.
  43. The constructor of this class will set the call back
  44. function to Dispatcher's WndProc.
  45. HISTORY:
  46. terryk 15-May-91 Created
  47. beng 17-Oct-1991 Win32 conversion
  48. beng 15-May-1992 Added OnQDlgCode member
  49. beng 18-May-1992 Added OnQHitTest, OnQMouseActivate members
  50. beng 21-May-1992 Added OnQMouseCursor
  51. beng 28-May-1992 Major bltcc vs. bltdisph reshuffle
  52. **********************************************************************/
  53. DLL_CLASS CUSTOM_CONTROL: public DISPATCHER
  54. {
  55. private:
  56. CONTROL_WINDOW *_pctrl;
  57. PROC_INSTANCE _instance; // Dispatcher WndProc
  58. MFARPROC _lpfnOldWndProc; // original window class's WndProc
  59. protected:
  60. LPARAM SubClassWndProc( const EVENT & event );
  61. public:
  62. CUSTOM_CONTROL( CONTROL_WINDOW * pctrl );
  63. ~CUSTOM_CONTROL();
  64. CONTROL_WINDOW * QueryControlWin() const
  65. { return _pctrl; }
  66. VOID CVSaveValue( BOOL fInvisible = TRUE );
  67. VOID CVRestoreValue( BOOL fInvisible = TRUE );
  68. static LPARAM WndProc( HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
  69. };
  70. #endif // _BLTCC_HXX_