📄 bcfcontrolsubwinctl.h
字号:
//=--------------------------------------------------------------------------=
// BCFControlSubWinCtl.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 BCFControlSubWin control.
//
#ifndef _BCFCONTROLSUBWINCONTROL_H_
#include "IPServer.H"
#include "CtrlObj.H"
#include "BCFControlInterfaces.H"
#include "Dispids.H"
typedef struct tagBCFCONTROLSUBWINCTLSTATE {
// TOOD: put state variables here, and probably get rid of fGarbage, unless
// you have a real need for it
//
VARIANT_BOOL fGarbage;
} BCFCONTROLSUBWINCTLSTATE;
//=--------------------------------------------------------------------------=
// CBCFControlSubWinControl
//=--------------------------------------------------------------------------=
// our control.
//
class CBCFControlSubWinControl : public COleControl, public IBCFControlSubWin, public ISupportErrorInfo {
public:
// IUnknown methods
//
DECLARE_STANDARD_UNKNOWN();
// IDispatch methods
//
DECLARE_STANDARD_DISPATCH();
// ISupportErrorInfo methods
//
DECLARE_STANDARD_SUPPORTERRORINFO();
// IBCFControlSubWin methods
//
// TODO: copy over the method declarations from BCFControlSubWinInterfaces.H
// don't forget to remove the PURE from them.
//
STDMETHOD_(void, AboutBox)(THIS);
// OLE Control stuff follows:
//
CBCFControlSubWinControl(IUnknown *pUnkOuter);
virtual ~CBCFControlSubWinControl();
// 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.
//
BCFCONTROLSUBWINCTLSTATE 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_BCFControlSubWinCustomVerbs [];
//
extern const GUID *rgBCFControlSubWinPropPages [];
DEFINE_CONTROLOBJECT(BCFControlSubWin,
&CLSID_BCFControlSubWin,
"BCFControlSubWinCtl",
CBCFControlSubWinControl::Create,
1,
&IID_IBCFControlSubWin,
"BCFControlSubWin.HLP",
&DIID_DBCFControlSubWinEvents,
OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_RECOMPOSEONRESIZE|OLEMISC_CANTLINKINSIDE|OLEMISC_INSIDEOUT,
0, // no IPointerInactive policy by default
RESID_TOOLBOX_BITMAP3,
"BCFControlSubWinWndClass",
1,
rgBCFControlSubWinPropPages,
0,
NULL);
#define _BCFCONTROLSUBWINCONTROL_H_
#endif // _BCFCONTROLSUBWINCONTROL_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -