form.h

来自「WIndows mobile 5.0 pocket pc sdk sample 」· C头文件 代码 · 共 82 行

H
82
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/******************************************************************************

    File: form.h

******************************************************************************/
#pragma once
#include "stdinc.h"

HRESULT ExtractPicsFromBody(LPTSTR pszBody, UINT* puNumPics, LPEMSPICINFO* ppEMSPics);
HRESULT ConvertToMonoBitmap(UINT uNumPics, LPEMSPICINFO* ppEMSPics, LPBITMAP pBitmap);

/******************************************************************************

    CFormProvider - IFormProviderEx implementation

******************************************************************************/
class CFormProvider : public IFormProviderEx
{
public:
    // Constructor and destructor
    CFormProvider();
    ~CFormProvider();

    // IFormProvider methods
    MAPIMETHOD(QueryInterface)(REFIID iid, void** ppvObject);
    MAPIMETHOD_(ULONG, AddRef)();
    MAPIMETHOD_(ULONG, Release)();

    MAPIMETHOD(GetMsgStatusIconIndex)(
            LPMAPIFOLDER    pfldr,          // Folder for message
            LPENTRYID       pid,            // Id of message
            ULONG           cbid,           // count of bytes for the id
            ULONG           ffFlags,        // Flags for the message
            ULONG           ffStatus,       // Status for the message
            LPCWSTR         pszMsgClass, 
            ULONG           cAttachments,
            ULONG*          pnIndex         // OUT: Index for the correct glyph
    );

    MAPIMETHOD(CreateComposeForm)(
            IMessageFormHostEx* pHost, 
            LPMESSAGE       pMsg,       // Object to compose
            FORMTYPE        eFormType,  // Reply, Reply All, Forward
            LPMESSAGE       pMsgBase,   // Message to prefill the form if necessary
            MESSAGEFIELDS*  pMsgFields, // message fields for the new message
            HWND            hwndForm,   // HWND of the form frame
            HWND*           phwndBody,  // HWND of the form-created body
            IMessageFormEx**  ppForm    // Form object
    );

    MAPIMETHOD(CreateReadForm)(
            IMessageFormHostEx* pHost,
            LPMESSAGE       pMsg,       // Object to read
            HWND            hwndForm,   // HWND of the form frame
            HWND*           phwndBody,  // HWND of the form-created body
            IMessageFormEx**  ppForm    // Form object
    );

    // Other public methods
    MAPIMETHOD(Init)(LPCWSTR pszMessageClass);

private:
    HRESULT CleanUpReadForm(VOID);

    static BOOL     m_fInitPropTags;
    static ULONG    m_tagSMSUnicode;

    ULONG           m_cRef;
    LPTSTR          m_pszMessageClass;
    ICEMAPISession* m_pSession;
    IMsgStore*      m_pMsgStore;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?