F
fengxiaoxiao
Unregistered / Unconfirmed
GUEST, unregistred user!
这是../Demos/ActiveX/ShellExt例程中的一段代码,请明白人给讲讲.
type
TContextMenu = class(TComObject, IShellExtInit, IContextMenu)
private
FFileName: array[0..MAX_PATH] of Char;
protected
{ IShellExtInit }
function IShellExtInit.Initialize = SEIInitialize
// Avoid compiler warning
function SEIInitialize(pidlFolder: PItemIDList
lpdobj: IDataObject;
hKeyProgID: HKEY): HResult
stdcall;
{ IContextMenu }
function QueryContextMenu(Menu: HMENU
indexMenu, idCmdFirst, idCmdLast,
uFlags: UINT): HResult
stdcall;
function InvokeCommand(var lpici: TCMInvokeCommandInfo): HResult
stdcall;
function GetCommandString(idCmd, uType: UINT
pwReserved: PUINT;
pszName: LPSTR
cchMax: UINT): HResult
stdcall;
end;
第一个问题:
TContextMenu=class(TComObject,IShellExtInit,IContextMenu)中Class是什麽意思?
还是类的意思吗?
第二个问题:
function IShellExtInit.Initialize = SEIInitialize;
这是什麽用法?这是定义一个函数吗?
type
TContextMenu = class(TComObject, IShellExtInit, IContextMenu)
private
FFileName: array[0..MAX_PATH] of Char;
protected
{ IShellExtInit }
function IShellExtInit.Initialize = SEIInitialize
// Avoid compiler warning
function SEIInitialize(pidlFolder: PItemIDList
lpdobj: IDataObject;
hKeyProgID: HKEY): HResult
stdcall;
{ IContextMenu }
function QueryContextMenu(Menu: HMENU
indexMenu, idCmdFirst, idCmdLast,
uFlags: UINT): HResult
stdcall;
function InvokeCommand(var lpici: TCMInvokeCommandInfo): HResult
stdcall;
function GetCommandString(idCmd, uType: UINT
pwReserved: PUINT;
pszName: LPSTR
cchMax: UINT): HResult
stdcall;
end;
第一个问题:
TContextMenu=class(TComObject,IShellExtInit,IContextMenu)中Class是什麽意思?
还是类的意思吗?
第二个问题:
function IShellExtInit.Initialize = SEIInitialize;
这是什麽用法?这是定义一个函数吗?