msgview.h

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

H
74
字号
//
// 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.
//

#pragma once

class CMsgView
{
public:

    CMsgView(CFormProvider* pFormProvider, CMsgForm *pForm, LPMESSAGE pMsg, LPMESSAGE pMsgBase, BOOL fCompose);
    ~CMsgView();

    virtual HRESULT Init(MESSAGEFIELDS*  pMsgFields);
    virtual BOOL Create(HWND hwndForm, HWND* phwndBody);

    virtual BOOL PreTranslateMsg(MSG* pmsg);
    
    MAPIMETHOD(ShowView)(ULONG ulAction);

    MAPIMETHOD(SetMessage)(
            WORD            wType, 
            LPMESSAGE       pmsg
    );


protected:
    virtual LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    virtual BOOL CreateTVWindow(LPCTSTR pszClass, LPCTSTR pszTitle, DWORD dwStyle, LPRECT pRC, HWND hwndForm, UINT nID);

    // Has the window class already been registered?
    static BOOL ms_fRegistered;

    // Main window
    HWND        m_hWnd;

private:
    static LRESULT CALLBACK WndProcStatic(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

    // Building up the message from the view and sending it...
    HRESULT OnSendCommon(CMsgView *pMsgView);

    // The message we have to fill from the contents of the view.
    LPMESSAGE m_pMsg;

    // For prefilling the form with an existing message's details if necessary.
    WORD      m_wType;
    LPMESSAGE m_pMsgBase;

    // Access back to the form so we can tell it that the user wants to close the window.
    CMsgForm *m_pForm;
    HWND m_hWndForm;

    // Allow us to get mime parts of messages.
    CFormProvider* m_pFormProvider;

    BOOL m_fCompose;

private:
    int         OnCreate(LPCREATESTRUCT pcs);
    void        OnCommand(WPARAM wParam, LPARAM lParam);
    void        OnPaint(HDC hdc);
    void        AddToField();
};


⌨️ 快捷键说明

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