Click here to Skip to main content
15,892,537 members
Articles / Desktop Programming / Windows Forms

C# WinForms Application Full Integration with HTMLHelp ( .chm ) - Help Topics, Context Sensitive Help, and Tooltips

Rate me:
Please Sign up or sign in to vote.
4.67/5 (12 votes)
4 May 2011CPOL5 min read 64.2K   2.2K   48  
Use HTMLHelp (.chm) to display help topics, context sensitive help and tooltips in C# Winform application
/*
 * Copyright (C) 2004 Mike McCormack
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "oaidl.idl";

typedef struct _ITS_Control_Data
{
    UINT cdwControlData;
    UINT adwControlData[1];

} ITS_Control_Data, *PITS_Control_Data;

typedef enum ECompactionLev { 
    COMPACT_DATA = 0,
    COMPACT_DATA_AND_PATH
} ECompactionLev;

[
  object,
  uuid(88cc31de-27ab-11d0-9df9-00a0c922e6ec),
  pointer_default(unique)
]
interface IITStorage : IUnknown
{
    HRESULT StgCreateDocfile(
        [in] const WCHAR * pwcsName,
        [in] DWORD grfMode,
        [in] DWORD reserved,
        [out] IStorage ** ppstgOpen);

    HRESULT StgCreateDocfileOnILockBytes(
        [in] ILockBytes * plkbyt,
        [in] DWORD grfMode,
        [in] DWORD reserved, 
        [out] IStorage ** ppstgOpen);


    HRESULT StgIsStorageFile(
        [in] const WCHAR * pwcsName);

    HRESULT StgIsStorageILockBytes(
        [in] ILockBytes * plkbyt);

    HRESULT StgOpenStorage(
        [in] const WCHAR * pwcsName,
        [in] IStorage * pstgPriority,
        [in] DWORD grfMode,
        [in] SNB snbExclude,
        [in] DWORD reserved,
        [out] IStorage ** ppstgOpen);

    HRESULT StgOpenStorageOnILockBytes(
        [in] ILockBytes * plkbyt,
        [in] IStorage * pStgPriority,
        [in] DWORD grfMode,
        [in] SNB snbExclude,
        [in] DWORD reserved,
        [out] IStorage ** ppstgOpen);

    HRESULT StgSetTimes(
        [in] WCHAR const * lpszName,
        [in] FILETIME const * pctime,
        [in] FILETIME const * patime,
        [in] FILETIME const * pmtime);

    HRESULT SetControlData(
        [in] PITS_Control_Data pControlData);
    
    HRESULT DefaultControlData(
        [out] PITS_Control_Data * ppControlData);

    HRESULT Compact(
        [in] const WCHAR * pwcsName,
        [in] ECompactionLev iLev);
}

cpp_quote("DEFINE_GUID(CLSID_ITStorage,0x5d02926a,0x212e,0x11d0,0x9d,0xf9,0x00,0xa0,0xc9,0x22,0xe6,0xec);")
cpp_quote("DEFINE_GUID(CLSID_MSFSStore,0xd54eee56,0xaaab,0x11d0,0x9e,0x1d,0x00,0xa0,0xc9,0x22,0xe6,0xec);")
cpp_quote("DEFINE_GUID(CLSID_MSITStore,0x9d148290,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);")
cpp_quote("DEFINE_GUID(CLSID_ITSProtocol,0x9d148291,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);")

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions