OLE SDK - Frame Interface (2): ioleinplaceframe :: setStatustext

zhaozj2021-02-08  230

IoleinplaceFrame :: setStatustext

Set and display the status text of the in-place object in the frame window status line of the container.

HRESULT SETSTATUSTEXT (LPCOLESTR PSZSTATUSTEXT / / Pointer to display messages);

parameter

PSZSTATUSTEXT

Contains the address of the string that is ended with empty characters to display the message.

return value

This method supports standard return values ​​E_FAIL, E_INVALIDARG, and E_UNEXPECTED, also supports the following:

S_ok

The text is shown.

S_truncated

Some text is displayed, but the news is too long to have been deleted.

Comment

Caller

If the container frame window has a status line, you should call SetStatusText when you need to tell the container to display the object text in its framework status line. Because the window window of the window has a status line, calling IoleInplaceFrame :: SetStatusText just a method of displaying status information in the window window of the window. If the container rejects the object's request, the corresponding application can still negotiate the border space to display its own status bar.

Note When switching between menus owned by the container and the menu owned by the in-place object, if the object does not call the IoleinplaceFrame :: setStatusText method of the container, the status bar text will not be reflected properly. For example, if the user selects the File menu during a in-place session, the status bar will reflect the action of this menu selection will occur. If the user selects the EDIT menu (owned by the bit object), the status bar will not change unless ILINPLACEFRAME :: setStatusText occurs. This is because the container has no way to distinguish an object's menu has been activated because all the messages that the container want to capture now.

Realize attention

To avoid potential problems, all objects should be processed in bit activation and call ioleinplaceframe :: setStatusText, even if the object does not provide status information (such, the object can just provide a null string for the request status text.)

Note You cannot call Windows PeekMessage and GetMessage Functions, or a dialog box. Doing so may cause a crash of the system. The method and function of the OLE interface are called in GetBorder, there is a more step-by-step constraint.

Quick information

Windows NT: 3.1 or higher. Windows: Windows 95 or higher. Windows CE: does not support. HEADER: Oleidl.h.

See

Peekmessage in Win32, GetMessage

转载请注明原文地址:https://www.9cbs.com/read-3425.html

New Post(0)