S
satanmonkey
Unregistered / Unconfirmed
GUEST, unregistred user!
C++代码片段如下:<br> if (hCtxMenu)<br> {<br> HMENU hSubMenu = GetSubMenu(hCtxMenu, dwID);<br> if (hSubMenu)<br> {<br> // Get the language submenu<br> CComVariant var;<br> hr = spCT->Exec(&CGID_ShellDocView, SHDVID_GETMIMECSETMENU, 0, NULL, &var);<br> if (SUCCEEDED(hr))<br> {<br> MENUITEMINFO mii = {0};<br> mii.cbSize = sizeof(mii);<br> mii.fMask = MIIM_SUBMENU;<br> mii.hSubMenu = (HMENU) var.byref;<br><br> // Add language submenu to Encoding context item<br> SetMenuItemInfo(hSubMenu, IDM_LANGUAGE, FALSE, &mii);<br><br>。。。。<br>}<br>}<br>这句我翻译不来<br>mii.hSubMenu = (HMENU) var.byref;<br>我这里把var申明为<br>ComVar1,ComVar2:OLEVariant;<br>使用mii.hSubMenu=HMENU(Comvar1.byref)出错<br>我对C++不熟悉,这个byref什么意思?delphi里该怎么表示?<br>