Microsoft KB Archive/319616

= How to create a resource-only DLL to host an Outlook Today page =

Article ID: 319616

Article Last Modified on 4/30/2004

-

APPLIES TO


 * Microsoft Office Outlook 2003
 * Microsoft Outlook 2000 Standard Edition
 * Microsoft Visual C++ 6.0 Service Pack 5

-



This article was previously published under Q319616



IN THIS TASK

 * INTRODUCTION
 * Sample
 * REFERENCES



INTRODUCTION
This article describes how to build a resource-only DLL to host an HTML page. This HTML page can be used as a folder home page or as an Outlook Today page. You will build a DLL without the help of any other code having been provided.

For more information about customizing Outlook Today, see the &quot;References&quot; section.

back to the top

Sample
To build a resource-only DLL for use as an Outlook Today page, follow these steps:  In Microsoft Visual C++, create a simple DLL project. To add a resource script file to the project, click New on the File menu, and then click Add. In the project explorer Resource view, insert a new HTML type resource.

To do so, click Project, point to Add Resource, click HTML, and then click New. In the Properties dialog box of the new HTML resource, change the ID property to &quot;Myoutlook.htm&quot;. Make sure that you include the quotation marks.  Paste the following HTML in the new HTML resource file: My Outlook Today This is a simple Resource DLL   Use Import to add another resource, and then import a .gif file.</li> Set the Resource type to HTML.</li> Change the ID property of the resource to &quot;clock.gif&quot;. (Include the quotation marks because this is how the resource is referenced in the HTML.)

Note The Microsoft Visual C++ IDE corrupts the .gif format of the image when the .gif file is imported as an HTML resource. Copy a clean copy of the .gif file over the imported file in the DLL project folder.

Alternatively, to avoid the .gif file format becoming corrupted, follow these steps: <ol style="list-style-type: lower-alpha;"> Copy all the .gif files that you need to the DLL project folder.</li> Close the project, and then manually edit the resource script file to add the .gif files.</li></ol>

Use a text editor such as Notepad to open the resource script file. You can expect the format of the resource script file to be easy to understand after you have added at least one HTML page as an HTML resource.</li> Compile the DLL.</li> Set this Myoutlook.htm file as a folder home page or as an Outlook Today page by using the resource protocol. For example, use the full Res:// path of the DLL/Myoutlook.htm file.</li></ol>

back to the top

<div class="references_section">