一、GetOle2AcceleratorTable方法:调用该方法得到的结果用途何在?
二、PopulateOle2Menu方法:调用该方法之前应如何准备每个参数?

解决方案 »

  1.   

    GetOle2AcceleratorTable 获取菜单加速键表.返回的参数用于合并菜单.
    具体的说明你可以查看TmenuItem的groupindex属性的说明.
    PopulateOle2Menu
    可以看看在线帮助啊!
      

  2.   

    一、
    Returns the main menu' accelerator table.procedure GetOle2AcceleratorTable(var AccelTable: HAccel; var AccelCount: Integer; const Groups: array of Integer);DescriptionCall GetOle2AcceleratorTable to obtain a handle to an accelerator table for all menu items with a GroupIndex value that appears in the Groups parameter. The AccelTable parameter is set to the accelerator table handle, and the AccelCount is set to the number of entries in the table. GetOle2AcceleratorTable is used by OLE containers when merging menus.俺的问题是:我如何获得“an accelerator table”的内容,它的数据类型是什么,有何用途?(俺猜想存放的就是Ctrl+N、Ctrl+X等存在的加速键,但我如何取到这些加速键呢?)二、
    Populates an OLE menu with items from the main menu.procedure PopulateOle2Menu(SharedMenu: HMenu; const Groups: array ofInteger; var Widths: array of Longint);DescriptionCall PopulateOle2Menu to merge the menu items with GroupIndex values specified by the Groups parameter into the menu that uses the SharedMenu handle. PopulateOle2Menu appends all menu items in the specified groups to the menu, and increments the corresponding entries in the Widths array for every menu item appended. PopulateOle2Menu is used by OLE containers when merging menus.Note: PopulateOle2Menu populates the menu specified by the SharedMenu parameter but does not set this as the OLE menu associated with the menu.俺的问题是,参数“SharedMenu”从哪里来?如何才能完成一次对该方法的有意义的调用(即在调用之前和调用之后俺的菜单发生了变化,并且不是两个TMainMenu对象的菜单合并,而是一个OLE菜单合并到一个TMainMenu菜单中)?恳请楼上两位继续不吝指教!!!