|
|
1.1 ! root 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: ! 16: #if !defined( _FRAMETLS_H_ ) ! 17: #define _FRAMETLS_H_ ! 18: ! 19: #ifndef RC_INVOKED ! 20: #pragma message ("INCLUDING FRAMETLS.H from " __FILE__) ! 21: #endif /* RC_INVOKED */ ! 22: ! 23: #include "bttncur.h" ! 24: #include "gizmobar.h" ! 25: ! 26: #define SPACE 5 ! 27: #define POPUPSTUB_HEIGHT 5 ! 28: ! 29: ! 30: /* forward type references */ ! 31: typedef struct tagOUTLINEDOC FAR* LPOUTLINEDOC; ! 32: ! 33: #define IDC_GIZMOBAR 1000 ! 34: #define IDC_FORMULABAR 1001 ! 35: ! 36: #define IDB_CANCEL 0 ! 37: #define IDB_EDITLINE 1 ! 38: #define IDB_ADDLINE 2 ! 39: #define IDB_UNINDENTLINE 3 ! 40: #define IDB_INDENTLINE 4 ! 41: ! 42: #define BARSTATE_TOP 1 ! 43: #define BARSTATE_BOTTOM 2 ! 44: #define BARSTATE_POPUP 3 ! 45: #define BARSTATE_HIDE 4 ! 46: ! 47: #define CLASS_PALETTE "Tool Palette" ! 48: ! 49: typedef struct tagBAR{ ! 50: UINT m_uHeight; ! 51: HWND m_hWnd; ! 52: int m_nState; ! 53: } BAR, FAR* LPBAR; ! 54: ! 55: typedef struct tagFRAMETOOLS { ! 56: HWND m_hWndPopupPalette; // Popup Tool Palette window ! 57: HWND m_hWndApp; // App Frame window ! 58: UINT m_uPopupWidth; // Width of the popup palette ! 59: HBITMAP m_hBmp; // Image bitmaps ! 60: BOOL m_fInFormulaBar; // does formula bar have edit focus ! 61: BOOL m_fToolsDisabled; // when TRUE all tools are hidden ! 62: ! 63: BAR m_ButtonBar; // Button Bar ! 64: BAR m_FormulaBar; // Formula Bar ! 65: ! 66: TOOLDISPLAYDATA m_tdd; // from UIToolConfigureForDisplay ! 67: } FRAMETOOLS, FAR* LPFRAMETOOLS; ! 68: ! 69: ! 70: BOOL FrameToolsRegisterClass(HINSTANCE hInst); ! 71: BOOL FrameTools_Init(LPFRAMETOOLS lpft, HWND hWndParent, HINSTANCE hInst); ! 72: void FrameTools_AttachToFrame(LPFRAMETOOLS lpft, HWND hWndFrame); ! 73: void FrameTools_AssociateDoc(LPFRAMETOOLS lpft, LPOUTLINEDOC lpOutlineDoc); ! 74: void FrameTools_Destroy(LPFRAMETOOLS lpft); ! 75: void FrameTools_Move(LPFRAMETOOLS lpft, LPRECT lprcClient); ! 76: void FrameTools_PopupTools(LPFRAMETOOLS lpft); ! 77: void FrameTools_Enable(LPFRAMETOOLS lpft, BOOL fEnable); ! 78: ! 79: #if defined( INPLACE_CNTR ) || defined( INPLACE_SVR ) ! 80: void FrameTools_NegotiateForSpaceAndShow( ! 81: LPFRAMETOOLS lpft, ! 82: LPRECT lprcFrameRect, ! 83: LPOLEINPLACEFRAME lpTopIPFrame ! 84: ); ! 85: #endif // INPLACE_CNTR || INPLACE_SVR ! 86: ! 87: void FrameTools_GetRequiredBorderSpace(LPFRAMETOOLS lpft, LPBORDERWIDTHS lpBorderWidths); ! 88: ! 89: void FrameTools_UpdateButtons(LPFRAMETOOLS lpft, LPOUTLINEDOC lpOutlineDoc); ! 90: void FrameTools_FB_SetEditText(LPFRAMETOOLS lpft, LPSTR lpsz); ! 91: void FrameTools_FB_GetEditText(LPFRAMETOOLS lpft, LPSTR lpsz, UINT cch); ! 92: void FrameTools_FB_FocusEdit(LPFRAMETOOLS lpft); ! 93: void FrameTools_FB_SendMessage(LPFRAMETOOLS lpft, UINT uID, UINT msg, WPARAM wParam, LPARAM lParam); ! 94: void FrameTools_ForceRedraw(LPFRAMETOOLS lpft); ! 95: void FrameTools_BB_SetState(LPFRAMETOOLS lpft, int nState); ! 96: void FrameTools_FB_SetState(LPFRAMETOOLS lpft, int nState); ! 97: int FrameTools_BB_GetState(LPFRAMETOOLS lpft); ! 98: int FrameTools_FB_GetState(LPFRAMETOOLS lpft); ! 99: LRESULT FAR PASCAL FrameToolsWndProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam); ! 100: ! 101: #endif // _FRAMETLS_H_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.