´ 新建一个 activex dll 工程,名称 smartsubclasslib
´ ----------------------------------------------------´ module msmartsubclass´´ version... 1.0´ date...... 24 april 2001´´ copyright (c) 2001 andr閟 pons (andres@vbsmart.com)´ ---------------------------------------------------- 【程序编程相关:世界500强面试题(经典)】
´ 以下代码放在标准模块里,模块名 msmartsubclass 【推荐阅读:经典人生故事 4】
public const ssc_oldproc = "ssc_oldproc"public const ssc_objaddr = "ssc_objaddr" 【扩展信息:关于我对城市的喜厌观】
´api declarations:option explicit
private declare function getprop lib "user32" alias "getpropa" ( _ byval hwnd as long, _ byval lpstring as string) as long
private declare sub copymemory lib "kernel32" alias "rtlmovememory" ( _ destination as any, _ source as any, _ byval length as long)
´´ function startsubclasswindowproc()´´ this is the first windowproc that receives messages´ for all subclassed windows.´ the aim of this function is to just collect the message´ and deliver it to the right smartsubclass instance.´public function smartsubclasswindowproc( _ byval hwnd as long, _ byval umsg as long, _ byval wparam as long, _ byval lparam as long) as long
dim lret as long dim osmartsubclass as smartsubclass
... 下一页