(1) CCeCommandBar in vs 2005, CCeCommandBar is not supported any more. But CCommandBar does not work the same way ... // ppc 2003, eVC CCeCommandBar *pCommandBar = (CCeCommandBar*)m_pWndEmptyCB; m_pMenuBar = pCommandBar->InsertMenuBar(IDR_MENU); // windows mobile 5.0, visual studio 2005 #if 0 // method 1 SHMENUBARINFO mbi; ZeroMemory(&mbi, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.hwndParent = m_hWnd; mbi.nToolBarId = IDR_MENU; mbi.hInstRes = AfxGetApp()->m_hInstance; mbi.dwFlags |= SHCMBF_HMENU; HMENU hMenu = 0; if(SHCreateMenuBar(&mbi)) { m_hWndMB = mbi.hwndMB; hMenu = (HMENU) ::SendMessage(m_hWndMB, SHCMBM_GETMENU,0,0); } #else // method 2 CCommandBar *pBar = new CCommandBar; pBar->Create(this); pBar->InsertMenuBar(IDR_MENU); m_hWndMB = SHFindMenuBar(m_hWnd); HMENU hMenu = (HMENU) ::SendMessage(m_hWndMB, SHCMBM_GETMENU,0,0); #endif m_pMenuBar = CMenu::FromHandle(hMenu); (2) CTime::GetCurrentTime() in vs2005 version of mfc, CTime is based on UTC. if u want it deal with local time, please rewrite the GetCurrentTime(). CTime GetCurrentTime() { SYSTEMTIME t; GetLocalTime(&t); return t; } (3) DS_MODALFRAME DS_MODALFRAME is not allowed in wm5 although it is ok in wm 2003.