📄 smiley.odl
字号:
// smiley.odl : type library source for OLE Custom Control project.
// This file will be processed by the Make Type Library (mktyplib) tool to
// produce the type library (Smile.tlb) that will become a resource in
// Smile.ocx.
#if defined(_WIN32_WCE) && (_WIN32_WCE < 200)
#error "This sample can only be compiled for Windows CE 2.0 or later."
#endif
#include <olectl.h>
[ uuid(C01FA300-B475-11d1-87E8-006097BA8D75), version(1.0),
helpstring("Smile OLE Custom Control module"), control ]
library SMILELib
{
importlib(STDOLE_TLB);
importlib(STDTYPE_TLB);
// Primary dispatch interface for CSmileCtrl
[ uuid(C01FA301-B475-11d1-87E8-006097BA8D75),
helpstring("Dispatch interface for Smile Control"), hidden ]
dispinterface _DSmile
{
properties:
// NOTE - ClassWizard will maintain property information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_PROP(CSmileCtrl)
[id(DISPID_BACKCOLOR), bindable, requestedit] OLE_COLOR BackColor;
[id(DISPID_FORECOLOR), bindable, requestedit] OLE_COLOR ForeColor;
[id(DISPID_CAPTION), bindable, requestedit] BSTR Caption;
[id(DISPID_BORDERSTYLE), bindable, requestedit] short BorderStyle;
[id(1)] boolean Sad;
//}}AFX_ODL_PROP
methods:
// NOTE - ClassWizard will maintain method information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(CSmileCtrl)
[id(2)] void Beep();
[id(3)] void Wink(boolean bWink);
//}}AFX_ODL_METHOD
[id(DISPID_ABOUTBOX)] void AboutBox();
};
// Event dispatch interface for CSmileCtrl
[ uuid(C01FA302-B475-11d1-87E8-006097BA8D75),
helpstring("Event interface for Smile Control") ]
dispinterface _DSmileEvents
{
properties:
// Event interface has no properties
methods:
// NOTE - ClassWizard will maintain event information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_EVENT(CSmileCtrl)
[id(1)] void Outside();
[id(2)] void Inside(long x, long y);
//}}AFX_ODL_EVENT
};
// Class information for CSmileCtrl
[ uuid(C01FA303-B475-11d1-87E8-006097BA8D75),
helpstring("Smile Control"), control ]
coclass Smile
{
[default] dispinterface _DSmile;
[default, source] dispinterface _DSmileEvents;
};
//{{AFX_APPEND_ODL}}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -