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.

115 lines
4.1 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // icobutt.h - interface for icon button functions in icobutt.c
  24. ////
  25. #ifndef __ICOBUTT_H__
  26. #define __ICOBUTT_H__
  27. #include "winlocal.h"
  28. #define ICOBUTT_VERSION 0x00000106
  29. // handle to icon button control
  30. //
  31. DECLARE_HANDLE32(HICOBUTT);
  32. #define ICOBUTT_ICONCENTER 0x00000000
  33. #define ICOBUTT_ICONLEFT 0x00000001
  34. #define ICOBUTT_ICONRIGHT 0x00000002
  35. #define ICOBUTT_NOFOCUS 0x00000004
  36. #define ICOBUTT_NOTEXT 0x00000008
  37. #define ICOBUTT_SPLITTEXT 0x00000010
  38. #define ICOBUTT_NOSIZE 0x00000020
  39. #define ICOBUTT_NOMOVE 0x00000040
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. // IcoButtInit - initialize icon button
  44. // <hwndButton> (i) button window handle
  45. // NULL create new button
  46. // <dwVersion> (i) must be ICOBUTT_VERSION
  47. // <hInst> (i) instance handle of calling module
  48. // <id> (i) id of button
  49. // <hIconMono> (i) icon to display on mono displays
  50. // <hIconColor> (i) icon to display on color displays
  51. // 0 use mono icon
  52. // <hIconGreyed> (i) icon to display when button disabled
  53. // 0 use mono icon
  54. // <hFont> (i) font to use for text
  55. // NULL use variable-pitch system font (ANSI_VAR_FONT)
  56. // <lpszText> (i) button text string
  57. // <x> (i) button horizontal position
  58. // <y> (i) button vertical position
  59. // <cx> (i) button width
  60. // <cy> (i) button height
  61. // <hwndParent> (i) button parent
  62. // <dwFlags> (i) control flags
  63. // ICOBUTT_ICONCENTER draw icon centered above text (default)
  64. // ICOBUTT_ICONLEFT draw icon on the left side of text
  65. // ICOBUTT_ICONRIGHT draw icon on the right side of text
  66. // ICOBUTT_NOFOCUS do not draw control showing focus
  67. // ICOBUTT_NOTEXT do not draw any button text
  68. // ICOBUTT_SPLITTEXT split long text onto two rows if necessary
  69. // ICOBUTT_NOSIZE ignore <cx> and <cy> param
  70. // ICOBUTT_NOMOVE ignore <x> and <y> param
  71. // return handle (NULL if error)
  72. //
  73. // NOTE: if <hwndButton> is set to an existing button,
  74. // a new button is not created. Rather, only the icon button
  75. // control structure <hIcoButt> is created. This allows
  76. // existing buttons to be turned into an icon button.
  77. //
  78. HICOBUTT DLLEXPORT WINAPI IcoButtInit(HWND hwndButton,
  79. DWORD dwVersion, HINSTANCE hInst, UINT id,
  80. HICON hIconMono, HICON hIconColor, HICON hIconGreyed,
  81. HFONT hFont, LPTSTR lpszText, int x, int y, int cx, int cy,
  82. HWND hwndParent, DWORD dwFlags);
  83. // IcoButtTerm - terminate icon button
  84. // <hwndButton> (i) button window handle
  85. // NULL destroy window
  86. // <hIcoButt> (i) handle returned from IcoButtCreate
  87. // return 0 if success
  88. //
  89. // NOTE: if <hwndButton> is set to an existing button,
  90. // the button is not destroyed. Rather, only the icon button
  91. // control structure <hIcoButt> is destroyed. This allows
  92. // IcoButtInit() to be called again for the same button.
  93. //
  94. int DLLEXPORT WINAPI IcoButtTerm(HWND hwndButton, HICOBUTT hIcoButt);
  95. // IcoButtDraw - draw icon button
  96. // <lpDrawItem> (i) structure describing how to draw control
  97. // return 0 if success
  98. //
  99. int DLLEXPORT WINAPI IcoButtDraw(const LPDRAWITEMSTRUCT lpDrawItem);
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103. #endif // __ICOBUTT_H__