100分征解:与TMainMenu有关

cnsuyong 2002-11-22 07:25:57
一、GetOle2AcceleratorTable方法:调用该方法得到的结果用途何在?
二、PopulateOle2Menu方法:调用该方法之前应如何准备每个参数?
...全文
39 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
cnsuyong 2002-12-04
  • 打赏
  • 举报
回复
惭愧啊,俺的三角星都没了,可这问题还在此挂着。
我会一直耐心地等下去...
sccd1989 2002-12-01
  • 打赏
  • 举报
回复
关注
basai 2002-12-01
  • 打赏
  • 举报
回复
up
cnsuyong 2002-11-27
  • 打赏
  • 举报
回复
呵呵,怎么都跑了?俺的问题还没解决呢!(第一个问题已经搞掂)
nihao1998 2002-11-24
  • 打赏
  • 举报
回复
关注并UP
cnsuyong 2002-11-22
  • 打赏
  • 举报
回复
一、
Returns the main menu' accelerator table.

procedure GetOle2AcceleratorTable(var AccelTable: HAccel; var AccelCount: Integer; const Groups: array of Integer);

Description

Call 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);

Description

Call 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菜单中)?

恳请楼上两位继续不吝指教!!!
liubat 2002-11-22
  • 打赏
  • 举报
回复
同意!
广州接入 2002-11-22
  • 打赏
  • 举报
回复
GetOle2AcceleratorTable 获取菜单加速键表.返回的参数用于合并菜单.
具体的说明你可以查看TmenuItem的groupindex属性的说明.
PopulateOle2Menu
可以看看在线帮助啊!

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧