我怎样得到菜单的文字信息(比如'打开','编辑','查看'等等)(还有子菜单的文字信息)
最好有代码?
最好有代码?
解决方案 »
- delphi6 ado 在执行insert 报错
- delphi 已知3点坐标,需要画一个圆,并计算它的半径!
- 打印前 动态调整Edit的坐标
- 特急!如何在查询结果中添加字段
- 假设在多层系统中用到了一个SQL数据库‘info.sql',那么在服务器端和客户端各应该怎么分发?又怎么使客户端和服务端的数据库联系起来?(
- winnt下,money类型字段的显示问题!!
- ★★★拒绝灌水、拒绝倒分、拒绝散分★★★-----※※※支持的进来签个名※※※------●●●让这里的空气更清新●●●
- 这段代码用在query1中就好使,用在adoquery中就不好使,怎么办呢?
- 如何把一个删除的文件恢复(没有放到回收站),用程序如何实现(可以给到200分,绝不食言)
- 使用adoconnection时,在程序中如何设定其connectstring
- 如何在程序运行中动态生成的菜单项上定义其onclick事件?
- 请问哪有delphi 5 开发人员指南配套程序下载?
HMENU hMenu, // handle to the menu
UINT uIDItem, // menu item identifier
LPTSTR lpString, // buffer for the string
int nMaxCount, // maximum length of string
UINT uFlag // options
);
Parameters
hMenu
[in] Handle to the menu.
uIDItem
[in] Specifies the menu item to be changed, as determined by the uFlag parameter.
lpString
[out] Pointer to the buffer that receives the null-terminated string. If the string is as long or longer than lpString, the string is truncated and the NULL terminator is added.
If lpString is NULL, the function returns the length of the menu string. nMaxCount
[in] Specifies the maximum length, in characters, of the string to be copied. If the string is longer than the maximum specified in the nMaxCount parameter, the extra characters are truncated.
If nMaxCount is 0, the function returns the length of the menu string. uFlag
[in] Specifies how the uIDItem parameter is interpreted. This parameter must be one of the following values. Value Meaning
MF_BYCOMMAND Indicates that uIDItem gives the identifier of the menu item. If neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified, the MF_BYCOMMAND flag is the default flag.
MF_BYPOSITION Indicates that uIDItem gives the zero-based relative position of the menu item.
Return Values
If the function succeeds, the return value specifies the number of characters copied to the buffer, not including the terminating null character.If the function fails, the return value is zero. If the specified item is not of type MFT_STRING, then the return value is zero.Windows 98/Me and Windows 2000/XP: MIIM_STRING supersedes MFT_STRING. Res
The nMaxCount parameter must be one larger than the number of characters in the text string to accommodate the terminating null character. If nMaxCount is 0, the function returns the length of the menu string.Windows 95/98/Me: GetMenuStringW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.Example Code
For an example, see Creating User-Editable Accelerators. Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP. Also supported by Microsoft Layer for Unicode.
Mn,你要得到汉字信息可以这样:Mn.Caption就可以得到你要的资料!
不知道你要的是不是这个??????????????????????????