|
在Wince5.0 下 做了个菜单,想在菜单的子项中选中后 出现 选中的 勾标记
代码如下
hwndCB = CommandBar_Create(g_hInst, hWnd, IDR_MENU);
if (hwndCB)
{
CommandBar_InsertMenubar(hwndCB, g_hInst, IDR_MENU, 0);
CommandBar_AddAdornments(hwndCB, 0, 0);
g_hPlayerMenuBar = hwndCB;
TBBUTTONINFO tbbi = {0};
tbbi.cbSize = sizeof(tbbi);
tbbi.dwMask = TBIF_LPARAM;
SendMessage(g_hPlayerMenuBar, TB_GETBUTTONINFO, 0, (LPARAM)&tbbi);
g_hMenu = (HMENU)tbbi.lParam;
}
结果在 CheckMenuItem(hMenu ,nCheckedID,MF_CHECKED);时报错,Getlasterror返回6 句柄无效
请问如何解决?? 谢谢
|
|