文件名称:VC++菜单设计,制作界面
文件大小:3KB
文件格式:CPP
更新时间:2012-10-29 07:50:44
VC++
void CMenu2View::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default CClientDC dc(this); if(0x0d==nChar) { if(0==++m_nIndex) { m_menu.CreatePopupMenu(); GetParent()->GetMenu()->AppendMenu(MF_POPUP,(UINT)m_menu.m_hMenu,"PhoneBook"); GetParent()->DrawMenuBar(); } } else { m_strLine+=nChar; dc.TextOut(0,0,m_strLine); } CView::OnChar(nChar, nRepCnt, nFlags); }