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.

102 lines
3.6 KiB

  1. /*************************************************************************
  2. **
  3. ** OLE 2 Sample Code
  4. **
  5. ** frametls.h
  6. **
  7. ** This file contains file contains data structure defintions,
  8. ** function prototypes, constants, etc. used by the frame level
  9. ** tools used by the Outline series of sample applications. The
  10. ** frame level tools include a formula bar and a button bar (toolbar)
  11. **
  12. ** (c) Copyright Microsoft Corp. 1992 - 1993 All Rights Reserved
  13. **
  14. *************************************************************************/
  15. #if !defined( _FRAMETLS_H_ )
  16. #define _FRAMETLS_H_
  17. #ifndef RC_INVOKED
  18. #pragma message ("INCLUDING FRAMETLS.H from " __FILE__)
  19. #endif /* RC_INVOKED */
  20. #include "bttncur.h"
  21. #include "gizmobar.h"
  22. #define SPACE 5
  23. #define POPUPSTUB_HEIGHT 5
  24. /* forward type references */
  25. typedef struct tagOUTLINEDOC FAR* LPOUTLINEDOC;
  26. #define IDC_GIZMOBAR 1000
  27. #define IDC_FORMULABAR 1001
  28. #define IDB_CANCEL 0
  29. #define IDB_EDITLINE 1
  30. #define IDB_ADDLINE 2
  31. #define IDB_UNINDENTLINE 3
  32. #define IDB_INDENTLINE 4
  33. #define BARSTATE_TOP 1
  34. #define BARSTATE_BOTTOM 2
  35. #define BARSTATE_POPUP 3
  36. #define BARSTATE_HIDE 4
  37. #define CLASS_PALETTE "Tool Palette"
  38. typedef struct tagBAR{
  39. UINT m_uHeight;
  40. HWND m_hWnd;
  41. int m_nState;
  42. } BAR, FAR* LPBAR;
  43. typedef struct tagFRAMETOOLS {
  44. HWND m_hWndPopupPalette; // Popup Tool Palette window
  45. HWND m_hWndApp; // App Frame window
  46. UINT m_uPopupWidth; // Width of the popup palette
  47. HBITMAP m_hBmp; // Image bitmaps
  48. BOOL m_fInFormulaBar; // does formula bar have edit focus
  49. BOOL m_fToolsDisabled; // when TRUE all tools are hidden
  50. BAR m_ButtonBar; // Button Bar
  51. BAR m_FormulaBar; // Formula Bar
  52. TOOLDISPLAYDATA m_tdd; // from UIToolConfigureForDisplay
  53. } FRAMETOOLS, FAR* LPFRAMETOOLS;
  54. BOOL FrameToolsRegisterClass(HINSTANCE hInst);
  55. BOOL FrameTools_Init(LPFRAMETOOLS lpft, HWND hWndParent, HINSTANCE hInst);
  56. void FrameTools_AttachToFrame(LPFRAMETOOLS lpft, HWND hWndFrame);
  57. void FrameTools_AssociateDoc(LPFRAMETOOLS lpft, LPOUTLINEDOC lpOutlineDoc);
  58. void FrameTools_Destroy(LPFRAMETOOLS lpft);
  59. void FrameTools_Move(LPFRAMETOOLS lpft, LPRECT lprcClient);
  60. void FrameTools_PopupTools(LPFRAMETOOLS lpft);
  61. void FrameTools_Enable(LPFRAMETOOLS lpft, BOOL fEnable);
  62. void FrameTools_EnableWindow(LPFRAMETOOLS lpft, BOOL fEnable);
  63. #if defined( INPLACE_CNTR ) || defined( INPLACE_SVR )
  64. void FrameTools_NegotiateForSpaceAndShow(
  65. LPFRAMETOOLS lpft,
  66. LPRECT lprcFrameRect,
  67. LPOLEINPLACEFRAME lpTopIPFrame
  68. );
  69. #endif // INPLACE_CNTR || INPLACE_SVR
  70. void FrameTools_GetRequiredBorderSpace(LPFRAMETOOLS lpft, LPBORDERWIDTHS lpBorderWidths);
  71. void FrameTools_UpdateButtons(LPFRAMETOOLS lpft, LPOUTLINEDOC lpOutlineDoc);
  72. void FrameTools_FB_SetEditText(LPFRAMETOOLS lpft, LPSTR lpsz);
  73. void FrameTools_FB_GetEditText(LPFRAMETOOLS lpft, LPSTR lpsz, UINT cch);
  74. void FrameTools_FB_FocusEdit(LPFRAMETOOLS lpft);
  75. void FrameTools_FB_SendMessage(LPFRAMETOOLS lpft, UINT uID, UINT msg, WPARAM wParam, LPARAM lParam);
  76. void FrameTools_ForceRedraw(LPFRAMETOOLS lpft);
  77. void FrameTools_BB_SetState(LPFRAMETOOLS lpft, int nState);
  78. void FrameTools_FB_SetState(LPFRAMETOOLS lpft, int nState);
  79. int FrameTools_BB_GetState(LPFRAMETOOLS lpft);
  80. int FrameTools_FB_GetState(LPFRAMETOOLS lpft);
  81. LRESULT FAR PASCAL FrameToolsWndProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
  82. #endif // _FRAMETLS_H_
  83.