How to Use OLE2UI Functionality in 32-bit Applications

Last reviewed: October 10, 1997
Article ID: Q135862
2.00 2.10 2.20 WINDOWS NT kbole

The information in this article applies to:

  • Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 2.2

SUMMARY

The OLE2UI library is a 16-bit DLL provided with the 16-bit OLE SDK. It contains a number of APIs that are useful for user interface (UI) related functionality. However, beginning with Windows NT version 3.51, this DLL is no longer provided. OLEDLG.DLL provides the dialog boxes that were included in OLE2UI. Two DLLs (MFCUIW32 and MFCUIA32) essentially wrap the APIs from OLEDLG.DLL, providing the ANSI and Unicode versions of the dialog boxes. If your application uses one of the approximately 122 other APIs that are no longer provided, copy the source code from the 32-bit version provided as a sample in the Visual C++ version 2.x directory ...\SAMPLES\MFC\MFCUIX32.

MORE INFORMATION

The two DLLs (MFCUIW32 and MFCUIA32) support the following APIs:

OleUIAddVerbMenu OleUIBusy OleUICanConvertOrActivateAs OleUIChangeIcon OleUIChangeSource OleUIConvert OleUIEditLinks OleUIInsertObject OleUIObjectProperties OleUIPasteSpecial OleUIPromptUser OleUIUpdateLinks

OLEDLG.DLL provides the A and W versions of these functions.

To use one of the other functions, you have two options:

  • Create a DLL using the sample code, and statically link to the library. This option is best if you were using a lot of the functions.

    -or-

  • Include the prototype for the function in one of your header files, and copy the source code from the .cpp file in the MFCUIX32 directory to your .cpp file. This option is probably best if you are using only one or two of the functions. For example, if you would like to use XformRectInPixelsToHimetric(), copy the prototype from \msvc20\... \mfcuix32\olestd.h, line 433, and the source code from \msvc20\ ... \mfcuix32\oleutl.cpp starting at line 401.

REFERENCES

For a list of the API entry points that have been removed, please see the project definition file (OLE2UI.DEF) in the \MSVC20\SAMPLES\MFC\MFCUIX32 directory.


Additional reference words: kbinf 2.00 2.10 2.20
KBCategory: kbole
KBSubcategory: MFCOle
Technology : kbMfc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.