An object that has a pointer to the moniker object's IMoniker interface can locate, activate, and get access to the identified object without having any other specific information on where the object is actually located in a distributed system. Implement IMoniker only if you are writing a new moniker class. This is necessary only if you need to identify objects that cannot be identified using one of the COM-supplied moniker classes described below.
解决方案 »
- 读取一个bmp文件 同时操作象素的疑问
- vc++ 静态对话框 增加一个combobox 怎么往里加项目
- 谁能实现下图效果?200分
- 求CHttpResponse 和 CHttpRequest 的例子
- 程序突然不能修改了?!
- 高分求解有关不同dll的问题?
- 关于太多全局变量所造成的heap问题
- list view控件中怎样添加subitem?
- 有哪位知道关于 WinCgi 方面的啊? 欢迎进来讨论!
- 救急!!!!!为什么我把BITMAP类型的位图存为.ico图标类型文件,在vc资源resources中import(导入)该ico图标,系统还是将其放入bitmap类型中,而不是icon类型中
- 两个问题,关于程序的内存占用?
- CListCtrl为Icon模式时,当删除一条时,这个位置被空出来,下一条不会补上来,怎么办?
A_func*(...);
B_func*(...);
enum { IamA, IamB } m_Type;
WhoAmI(init_type) : m_Type(init_type) {}
};
#define ClassA WhoAmI(IamA)
#define ClassB WhoAmI(IamB)
#define Moniker(x) Class##x *有时候我们需要很多种类,但是它们都有类似之处,
- 通过FSP(暴力工程)为每个类定义一个CLSID,当然从数学角度看这是个不会收敛的过程;
- 声明一个通用类,通过初始化完成各种子类的合并。但这样做使各子类看起来不够独立,而且在应用中也有很多不便;
- 为上述通用类建立子类包装,连接通用类的名字和用于初始化的参数,比如CFileDialog(FALSE) ==> CFileDialog_FALSE, 这个名字被称作“DisplayName”,以后建立该类时通过“CreateByDisplayName("CFileDialog_FALSE")”来完成。