编辑：说三道四文库 发布时间：2018-05-22 03:51
This interface can be used by an add-in to insert a page into the Solid Edge Edgebar tool. The Edgebar is available starting with Version 8. The pages that exist on the Edgebar tool are always document-specific. That means that a page added to the Edgebar for one document, will not appear on the Edgebar for any other document. In order to obtain the Edgebar interface, query the AddIn interface passed into the ISolidEdgeAddIn::OnConnection method using IID_ISolidEdgeBar. Once obtained, the interface can be used to add a page to the Edgebar, remove a previously added page from the Edgebar, and to set the active page of the Edgebar to one that has been added.
HRESULT AddPage( IDispatch *theDocument, long nInstanceHandle,
long nBitmapID, BSTR strTooltip, long nOption,
· theDocument is the dispatch interface of the document for which the page is being added.
· nInstanceHandle is HINSTANCE of the add-in's resource DLL, cast to a long, in which the bitmap resides.
· nBitmapID is the resource identifier of the bitmap that will appear on the added page's tab. The bitmap dimensions should be 20 by 20.
· sStrTootip is a string which appears as a tooltip for the user when the cursor is passed over the page's bitmap.
· nOption indicates which options the page wants. The options available are enumerated by EdgeBarConstant located in the Solid Edge constants typelib. A value of zero is valid and indicates no option. When this document was written, the only available option indicates that resize events are not needed. Hence, zero indicates that resize events are needed.
· hWndPage is the HWND of the added page and is returned by Solid Edge to the caller. The handle can be used to, for example, to draw items on the page.
IDispatch *theDocument, long nInstanceHandle, long nBitmapID, BSTR strTooltip, long nOption, long *hWndPage