⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcfbasiccontrolctl.h

📁 htm网页格式的参考资料
💻 H
字号:
//=--------------------------------------------------------------------------=
// BCFBasicControlCtl.H
//=--------------------------------------------------------------------------=
// Copyright  1995  Microsoft Corporation.  All Rights Reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
//
// class declaration for the BCFBasicControl control.
//
#ifndef _BCFBASICCONTROLCONTROL_H_

#include "IPServer.H"
#include "CtrlObj.H"
#include "BCFBasicControlInterfaces.H"
#include "Dispids.H"

typedef struct tagBCFBASICCONTROLCTLSTATE {

    // TOOD: put state variables here, and probably get rid of fGarbage, unless
    // you have a real need for it
    //
    VARIANT_BOOL fGarbage;

} BCFBASICCONTROLCTLSTATE;

//=--------------------------------------------------------------------------=
// CBCFBasicControlControl
//=--------------------------------------------------------------------------=
// our control.
//
class CBCFBasicControlControl : public COleControl, public IBCFBasicControl, public ISupportErrorInfo {

  public:
    // IUnknown methods
    //
    DECLARE_STANDARD_UNKNOWN();

    // IDispatch methods
    //
    DECLARE_STANDARD_DISPATCH();

    // ISupportErrorInfo methods
    //
    DECLARE_STANDARD_SUPPORTERRORINFO();

    // IBCFBasicControl methods
    //
    // TODO: copy over the method declarations from BCFBasicControlInterfaces.H
    //       don't forget to remove the PURE from them.
    //
    STDMETHOD_(void, AboutBox)(THIS);

    // OLE Control stuff follows:
    //
    CBCFBasicControlControl(IUnknown *pUnkOuter);
    virtual ~CBCFBasicControlControl();

    // static creation function.  all controls must have one of these!
    //
    static IUnknown *Create(IUnknown *);

  private:
    // overridables that the control must implement.
    //
    STDMETHOD(LoadBinaryState)(IStream *pStream);
    STDMETHOD(SaveBinaryState)(IStream *pStream);
    STDMETHOD(LoadTextState)(IPropertyBag *pPropertyBag, IErrorLog *pErrorLog);
    STDMETHOD(SaveTextState)(IPropertyBag *pPropertyBag, BOOL fWriteDefault);
    STDMETHOD(OnDraw)(DWORD dvAspect, HDC hdcDraw, LPCRECTL prcBounds, LPCRECTL prcWBounds, HDC hicTargetDev, BOOL fOptimize);
    virtual LRESULT WindowProc(UINT msg, WPARAM wParam, LPARAM lParam);
    virtual BOOL    RegisterClassData(void);

    virtual HRESULT InternalQueryInterface(REFIID, void **);
    virtual BOOL    BeforeCreateWindow(DWORD *pdwWindowStyle, DWORD *pdwExWindowStyle, LPSTR pszWindowTitle);

    // private state information.
    //
    BCFBASICCONTROLCTLSTATE m_state;
};


// TODO: if you have an array of verbs, then add an extern here with the name
//       of it, so that you can include it in the DEFINE_CONTROLOBJECT.
//       ie.  extern VERBINFO m_BCFBasicControlCustomVerbs [];
//
extern const GUID    *rgBCFBasicControlPropPages [];
DEFINE_CONTROLOBJECT(BCFBasicControl,
    &CLSID_BCFBasicControl,
    "BCFBasicControlCtl",
    CBCFBasicControlControl::Create,
    1,
    &IID_IBCFBasicControl,
    "BCFBasicControl.HLP",
    &DIID_DBCFBasicControlEvents,
    OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_RECOMPOSEONRESIZE|OLEMISC_CANTLINKINSIDE|OLEMISC_INSIDEOUT,
    0,                              // no IPointerInactive policy by default
    RESID_TOOLBOX_BITMAP,
    "BCFBasicControlWndClass",
    1,
    rgBCFBasicControlPropPages,
    0,
    NULL);



#define _BCFBASICCONTROLCONTROL_H_
#endif // _BCFBASICCONTROLCONTROL_H_

⌨️ 快捷键说明

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