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.

99 lines
3.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltsslt.hxx
  7. Header file for the SPIN_SLT_SEPARATOR class.
  8. The SPIN_SLT_SEPARATOR class is similar to SLT class.
  9. However, it can only live inside a SPIN_GROUP and
  10. it CANNOT use outside a SPIN_GROUP .
  11. FILE HISTORY:
  12. terryk 08-May-91 Creation
  13. terryk 20-Jun-91 code review changed. Attend: beng
  14. terryk 05-Jul-91 second code review changed. Attend: beng
  15. chuckc rustanl annmc terryk
  16. */
  17. #ifndef _BLTSSLT_HXX_
  18. #define _BLTSSLT_HXX_
  19. #include "bltctrl.hxx"
  20. #include "bltedit.hxx"
  21. /**********************************************************\
  22. NAME: SPIN_SLT_SEPARATOR
  23. WORKBOOK: core\dd\cc.doc
  24. SYNOPSIS: Similar to SLT but it can be only used within a SPIN_GROUP
  25. INTERFACE: Here is a list of public functions:
  26. SPIN_SLT_SEPARATOR() - constructor
  27. PARENT: SLT, STATIC_SPIN_ITEM
  28. USES: OWNER_WINDOW
  29. CAVEATS: This can be only used within a SPIN_GROUP .
  30. It has the same function as SLT. However, it is
  31. directly interact with the SPIN_GROUP control.
  32. For example, in the case of "date control" object as:
  33. 4 / 16 / 91
  34. Each of the number item inside the SPIN BUTTON
  35. will be a SPIN_SLE_NUM object. And the "/" will be a
  36. SPIN_SLT_SEPARATOR object.
  37. The different between a SPIN_SLT_SEPARATOR and a normal SLT
  38. object is that the SPIN_GROUP will look at the first
  39. character of the SPIN_SLE object and perform the jumping
  40. from one field to another within the spin button. For
  41. instance, we are current focus to the SPIN_SLE_NUM object
  42. with the value 4 as above. Then we hit the "/" key. The
  43. spin button knows that "/" is not a valid key within the
  44. SPIN_SLE_NUM field. Then it will ask whether the next
  45. field needs to process the "/" key. Since "/" is the
  46. first character of the SPIN_SLT_SEPARATOR object in the
  47. example, the SPIN_SLT_SEPARATOR object will get the
  48. control of the spin button and perform the proper
  49. action according to the specify method. In this case,
  50. it will jump to the next field, i.e., jump to the next
  51. SPIN_SLE_NUM object with the value 16.
  52. Also, SPIN-SLT-SEPARATOR redefines the OnCtlColor method
  53. to change its default background color.
  54. NOTES:
  55. HISTORY:
  56. terryk 08-May-91 creation
  57. jonn 05-Sep-95 OnCtlColor
  58. \**********************************************************/
  59. DLL_CLASS SPIN_SLT_SEPARATOR: public SLT, public STATIC_SPIN_ITEM
  60. {
  61. private:
  62. APIERR Initialize();
  63. static const TCHAR * _pszClassName;
  64. protected:
  65. virtual APIERR GetAccKey( NLS_STR * pnlsAccKey );
  66. public:
  67. SPIN_SLT_SEPARATOR( OWNER_WINDOW * powin, CID cid );
  68. SPIN_SLT_SEPARATOR( OWNER_WINDOW * powin, CID cid,
  69. const TCHAR * pszText,
  70. XYPOINT xy, XYDIMENSION dxy, ULONG flStyle =
  71. SS_CENTER | WS_CHILD );
  72. virtual HBRUSH OnCtlColor( HDC hdc, HWND hwnd, UINT * pmsgid );
  73. };
  74. #endif // _BLTSSLT_HXX_