Click here to get back home

how to dynamic change the menubar??

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to dynamic change the menubar?? Tim 02-27-2006
Get Chitika Premium
Posted by Tim on February 27, 2006, 2:05 am
Please log in for more thread options

I use the code below:

void DDView::SetMenu(int nResMenuId)
{
        HWND hWndOldMenu = SHFindMenuBar(m_hWnd);
        if (hWndOldMenu) {
                DestroyWindow(hWndOldMenu);
        }


        // create the menu bar
        SHMENUBARINFO mbi;
        ZeroMemory(&mbi, sizeof(SHMENUBARINFO));
        mbi.cbSize = sizeof(SHMENUBARINFO);
        mbi.hwndParent = m_hWnd;
        mbi.nToolBarId = nResMenuId;
        mbi.hInstRes = g_hInstance;
        if (!SHCreateMenuBar(&mbi)) {
                // Couldn't create the menu bar. Fail creation of the window.
                return;
        }

        m_hMenu = mbi.hwndMB;
        UpdateWindow(m_hMenu);

}

I call the SetMenu(...) with different MENUBAR id,
it doesn't work. although I see the menubar is changed. but I cannot clicked
the menu item.


any item.

Similar ThreadsPosted
Dynamic change of homescreen's softkey July 9, 2007, 10:09 am
Dynamic DNS for smartphone February 13, 2006, 5:08 am
How to make a dynamic installer November 20, 2006, 9:23 am
Dynamic Instance list in Perfmon July 14, 2008, 7:02 am
MenuBar doesn't display July 2, 2005, 10:17 pm
Menubar Woes December 18, 2006, 4:55 pm
hide menubar January 26, 2007, 5:47 am
A Problem about Creating a Menubar October 27, 2005, 8:00 am
problems if no menubar while FULL SCREEN August 10, 2006, 6:06 am
Smartphone menubar and menu item creation.. July 5, 2006, 9:14 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap