谁可以把这段代码改成c#的,谢谢了。小弟拜谢了。
void CMainFrame::OnCreateDocList(DLNHDR* pNotifyStruct, LRESULT* result)
{
CCeDocList* pDocList = (CCeDocList*)FromHandle(pNotifyStruct->nmhdr.hwndFrom);
ASSERT_KINDOF(CCeDocList, pDocList);
CCeCommandBar* pDocListCB = pDocList->GetCommandBar();
ASSERT(pDocListCB != NULL);
pDocListCB->InsertMenuBar(IDM_DOCLIST);
pDocListCB->SendMessage(TB_SETTOOLTIPS, (WPARAM)(1), (LPARAM)(m_ToolTipsTable));
CFrameWnd::OnCreateDocList(pNotifyStruct, result);
//Here we change menu. We set it again and so remove "New" button
SHMENUBARINFO smb;
smb.cbSize = sizeof(SHMENUBARINFO);
smb.hwndParent = pDocListCB->GetSafeHwnd();
smb.dwFlags = 0;
smb.nToolBarId = IDM_DOCLIST;
smb.hInstRes = ::AfxGetInstanceHandle();
smb.nBmpId = 0;
smb.cBmpImages = 0;
BOOL bResult = SHCreateMenuBar(&smb);
}