I have the following code in a win32 app that shows a drop down menu on clicking a button. However, this does not work in WinCE as MENUINFO is not defined. Is there any way I can get around this? I need to view a drop down menu on clicking a button, and the name appearing on the button changes depending on the option on the menu.
void CTestDlg::OnBnClickedBtnMenu()
{
if( NULL == m_PopUpMenu.m_hMenu )
{
m_PopUpMenu.SetMenuDimension( 120 );
m_PopUpMenu.CreatePopupMenu();
m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("A") );
m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("B") );
m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("C") );
m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("D") );
MENUINFO MenuInfo;
memset( &MenuInfo, 0, sizeof(MENUINFO) );
MenuInfo.cbSize = sizeof(MENUINFO);
MenuInfo.fMask = MIM_STYLE;
MenuInfo.dwStyle = MNS_NOTIFYBYPOS;
m_PopUpMenu.SetMenuInfo( &MenuInfo );
}