100分征解:与TMainMenu有关
100分征解:与TMainMenu有关
楼主cnsuyong(小可)2002-11-22 19:25:57 在 Delphi / VCL组件开发及应用 提问 一、GetOle2AcceleratorTable方法:调用该方法得到的结果用途何在?
二、PopulateOle2Menu方法:调用该方法之前应如何准备每个参数? 问题点数:100、回复次数:8Top
1 楼hawksoft(明月清风)回复于 2002-11-22 20:21:10 得分 25
GetOle2AcceleratorTable 获取菜单加速键表.返回的参数用于合并菜单.
具体的说明你可以查看TmenuItem的groupindex属性的说明.
PopulateOle2Menu
可以看看在线帮助啊!
Top
2 楼liubat(我怎么会在这里?不可思议!)回复于 2002-11-22 20:45:14 得分 25
同意!Top
3 楼cnsuyong(小可)回复于 2002-11-22 21:02:28 得分 0
一、
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菜单中)?
恳请楼上两位继续不吝指教!!!Top
4 楼nihao1998(真心英雄)回复于 2002-11-24 15:07:31 得分 25
关注并UPTop
5 楼cnsuyong(小可)回复于 2002-11-27 19:57:18 得分 0
呵呵,怎么都跑了?俺的问题还没解决呢!(第一个问题已经搞掂)Top
6 楼basai(晨峰)回复于 2002-12-01 01:24:41 得分 15
upTop
7 楼sccd1989(小白)回复于 2002-12-01 13:56:22 得分 10
关注Top
8 楼cnsuyong(小可)回复于 2002-12-04 23:49:39 得分 0
惭愧啊,俺的三角星都没了,可这问题还在此挂着。
我会一直耐心地等下去...Top
-
相关文章
2秒记住本站域名
玩过泡泡龙吗?Readygo?Go! 再加上.Com.Cn的后缀,那就是大名小顶的readygo.com.cn
