|
阅读:1349回复:1
Customize dialog box和Component Category Manager
当我们做成的组件,哪些类型的组件用Customize dialog box注册,哪些类型的组件用Component Category Manager注册?
|
|
|
1楼#
发布于:2004-08-06 08:17
<FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">Component categories</FONT> are used by client applications to efficiently find all <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">components</FONT> of a particular type that are installed on the system. For example, a client application may support a data export function in which you can specify the output format. A <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">component category</FONT> could be used to find all the data export <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">components</FONT> for the various formats. If <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">component categories</FONT> were not used, the application would have to instantiate each COM <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">component</FONT> and interrogate it to see if it supported the required functionality, which is not a practical approach. <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">Component categories</FONT> support the extensibility of COM by allowing the developer of the client application to create and work with classes that belong to a particular <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">category</FONT>. If at a later date a new class is added to the <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">category</FONT>, the client application need not be changed to take advantage of the new class; it will automatically pick up the new class the next time the <FONT color=#ffffff style="BACKGROUND-COLOR: #0a246a">category</FONT> is read
|
|
|