读书人

VS2005 WinCE MFC调用SHCreateMenuBar

发布时间: 2012-05-04 12:36:09 作者: rapoo

VS2005 WinCE MFC调用SHCreateMenuBar链接出错
直接贴吗

//Create a MenuBar for WCE devices
SHMENUBARINFO mbi;
memset(&mbi, 0, sizeof(SHMENUBARINFO));
mbi.cbSize = sizeof(SHMENUBARINFO);
mbi.hwndParent = GetSafeHwnd();
mbi.nToolBarId = IDM_BTM_OKBACK;
mbi.hInstRes = theApp.m_hInstance;
mbi.nBmpId = 0;
mbi.cBmpImages = 0;

if (FALSE == ::SHCreateMenuBar(&mbi))
{
::MessageBox(GetSafeHwnd(), L"SHCreateMenuBar Failed", L"Error", MB_OK);
EndDialog(IDCANCEL);
return FALSE;
}

链接错误:
error LNK2001: 无法解析的外部符号 SHCreateMenuBar

[解决办法]
在工程中链接aygshell.lib
[解决办法]
会不会是版本不匹配?
[解决办法]

Requirements

--------------------------------------------





Header

sipapi.h



Library

coredll.lib



Windows Embedded CE

Windows CE 2.10 and later



Windows Mobile

Windows Mobile Version 5.0 and later

[解决办法]
和定制系统相关,定制系统的时候被拿掉了

读书人网 >WinCE

热点推荐