谁可以把这段代码改成c#的,谢谢了。小弟拜谢了。

lifeis 2003-08-18 09:50:17
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);

}

...全文
65 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
lifeis 2003-08-19
  • 打赏
  • 举报
回复
就没有人知道吗?
smartcreater 2003-08-19
  • 打赏
  • 举报
回复
可以重写 :
你把VC中你用到的 数据结构/类型 , pNotifyStruct 按VC中的定义在c#中重定义匹配
的类型;
lifeis 2003-08-19
  • 打赏
  • 举报
回复
in pocket pc
lifeis 2003-08-19
  • 打赏
  • 举报
回复
在pocket pc 中
lifeis 2003-08-19
  • 打赏
  • 举报
回复
我不是要修改菜单,我就是要触发pword的任务栏中那个new菜单
心雨楼 2003-08-19
  • 打赏
  • 举报
回复
ft
colinmad 2003-08-19
  • 打赏
  • 举报
回复
gz
chainet 2003-08-19
  • 打赏
  • 举报
回复
这段代码是不是用来修改菜单和工具栏的button的?
如果你要实现同样的功能,完全可以自己用C#写一个,不然会很麻烦。

你把需求详细说一下吧!
huoyan999 2003-08-19
  • 打赏
  • 举报
回复
up~!
lifeis 2003-08-19
  • 打赏
  • 举报
回复
急得上蹿下跳
heroux 2003-08-19
  • 打赏
  • 举报
回复
最简单的方法,是用vs.net2003中的托管vc++(可视化编程效果最好)产生这段代码,然后将其功能封装成dll提供给 c# 用,就解决了!
lifeis 2003-08-19
  • 打赏
  • 举报
回复
救命呀
panyee 2003-08-18
  • 打赏
  • 举报
回复
这vc的代码和c#差太远了, 实现的方式完全不同

110,502

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧