要如何使用?
解决方案 »
- 怎么使保存对话框可以选择编码?
- 大家帮忙看看VB中计算问题
- 相对VC,VB在应用范围上有什么不同么
- vb打包后安装提示失败?
- datalist与listview有什么区别?如何用datalist显示查询的内容?
- VB6.0+SQL2000作的程序,如何打包阿?
- 谁知道 google 网页打不开是怎么回事?
- 我是菜鸟。100分问几个关于sql问题。在线等......
- vc中的回调函数在VB中该怎么定义?
- 一个数据库与内存的问题,高手请进, !!--救命咯
- ***********请问VB如何打开并访问Notes数据库**************
- 一个限定字段输入长度的数据库的菜鸟问题?给高分呀!在线等着呢.
fVirt As Byte
key As Integer
cmd As Integer
End TypefVirt
Specifies the accelerator behavior. This member can be one or more of the following values.
FALT
The ALT key must be held down when the accelerator key is pressed.
FCONTROL
The CTRL key must be held down when the accelerator key is pressed.
FNOINVERT
Specifies that no top-level menu item is highlighted when the accelerator is used. If this flag is not specified, a top-level menu item will be highlighted, if possible, when the accelerator is used. This attribute is obsolete and retained only for backward compatibility with resource files designed for 16-bit Windows.
FSHIFT
The SHIFT key must be held down when the accelerator key is pressed.
FVIRTKEY
The key member specifies a virtual-key code. If this flag is not specified, key is assumed to specify a character code.
key
Specifies the accelerator key. This member can be either a virtual-key code or a character code.
cmd
Specifies the accelerator identifier. This value is placed in the low-order word of the wParam parameter of the WM_COMMAND or WM_SYSCOMMAND message when the accelerator is pressed. 最后调用DestroyAcceleratorTable
ACCEL acAccel[4]; acAccel[0].fVirt = FCONTROL | FVIRTKEY;
acAccel[0].key = ( DWORD )VkKeyScan( ( TCHAR )'a' );
acAccel[0].cmd = IDM_TEST1;
acAccel[1].fVirt = FVIRTKEY;
acAccel[1].key = ( DWORD )VkKeyScan( ( TCHAR )'b' );
acAccel[1].cmd = IDM_TEST2;
acAccel[2].fVirt = FSHIFT | FVIRTKEY;
acAccel[2].key = ( DWORD )VkKeyScan( ( TCHAR )'C' );
acAccel[2].cmd = IDM_TEST3;
acAccel[3].fVirt = FSHIFT | FVIRTKEY;
acAccel[3].key = ( DWORD )VkKeyScan( ( TCHAR )'c' );
acAccel[3].cmd = IDM_TEST3;
hAccel = CreateAcceleratorTable( acAccel, 4 );
while( ( bRet = GetMessage( &msg, NULL, 0, 0 ) ) != 0 ){
if( bRet == -1 ){
break;
}else{
if( !TranslateAccelerator( hWnd, hAccel, &msg ) ){
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
}
DestroyAcceleratorTable( hAccel );
return msg.wParam;
大概意思 ___
( ">
)(
// ) [email protected]
--//""------------
-/------
menuhelp又怎样用?我在菜单上移过里状态栏里只显示空白..我实现搞不懂那些参数
假如我的菜单如下 标题 ID 提示用语
文件
打开 1000 打开一个存在的文件
保存 1001 保存当前文件
退出 1002 退出本程序