正在学习Mobile系统下的二次开发,环境为VS2008.
具体实现为:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndCommandBar.Create(this) ||
!m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME) ||
!m_wndCommandBar.AddAdornments(dwAdornmentFlags))
{
TRACE0("未能创建 CommandBar\n");
return -1; // 未能创建
}
m_wndCommandBar.SetBarStyle(m_wndCommandBar.GetBarStyle() | CBRS_SIZE_FIXED);
SetForegroundWindow();
SHFullScreen(m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
CRect rc;
SetRect( &rc, 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ));
MoveWindow(rc);
CWnd* pWndSIP = FindWindow( _T("menu_worker"), NULL ); //隐藏系统菜单栏
if (pWndSIP)
pWndSIP->ShowWindow(SW_HIDE);
return 0;
}
很正常,都能单步过来,但就是不显示IDR_MAINFRAME,为什么??
注:Mobile为6.5,我使的是5.0的SDK,会有影响么?
------解决方案--------------------
求Mobile的大湿来支支招啊,都别藏着啊!
话说我跳过了Mobile开始学WP7了,Mobile貌似要过时了.
我来帮你顶顶!
------解决方案--------------------
CWnd* pWndSIP = FindWindow( _T("menu_worker"), NULL ); //隐藏系统菜单栏
if (pWndSIP)
pWndSIP->ShowWindow(SW_HIDE);
==========
你把菜单栏都隐藏了,它要咋显示捏