Mfcfont.exe and Mfcfontvcnet.exe samples demonstrate how to persist the stock font property of a Microsoft Foundation Classes (MFC) ActiveX control in Visual C++ (199796)



The information in this article applies to:

  • The Microsoft Foundation Classes (MFC), when used with:
    • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
    • Microsoft Visual C++, 32-bit Professional Edition 6.0
    • Microsoft Visual C++, 32-bit Learning Edition 6.0
    • Microsoft Visual C++ .NET (2002)

This article was previously published under Q199796

SUMMARY

Mfcfont.exe and Mfcfontvcnet.exe are samples that demonstrate how to persist the stock font property of a Microsoft Foundation Classes (MFC) ActiveX control.

MORE INFORMATION

The following files are available for download from the Microsoft Download Center:

Visual C++ 6.0

Visual C++ .NET

Release Date: June 24, 2002

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

By default, the stock font property for an MFC ActiveX control is persisted as a binary COM object (IFontDisp). Many Web authoring tools expect to deal with properties as text name/value pairs using the IPersistPropertyBag interface.

These samples demonstrate how to persist the stock font as a set of text properties to enable the control to be used by Web authoring tools such as FrontPage and the ActiveX Control Pad.

A sample HTML file is provided that demonstrates how to access the font properties from a Web page.

REFERENCES

For more information about the Microsoft Foundation Classes and implementing ActiveX controls, see the Microsoft Visual C++ online documentation.

For more information about how to use ActiveX controls on Web pages, see the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:9/30/2005
Keywords:kbProperties kbhowto kbinfo kbdownload kbCtrlCreate kbfile kbInprocSvr kbSample KB199796 kbAudDeveloper