anuj.juthani 0 Newbie Poster

I am developing a IE toolbar using MS VISUAL STUDIO 2010 VC++
I have a popup menu, having two options WEB SEARCH and IMAGE SEARCH.
my problem is the pop up menu works fine when i see the output in DEBUG mode ...
The pop up menu works fine even in the Release Mode but with an ambiguity ....

the problem is : -

If i see output ( by pressing F5) from the VISUAL STUDIO in RELEASE MODE then the pop up menu works fine .

But when i Open the INTERNET EXPLORER explicitly, ( by clicking the IE launch shortcut from desktop)
the toolbat gets loaded all functinality is fine ,, JUST EXCEPT THE POP UP MENU ...

BY clicking on the dropdown arrow button the POPUP MENU gets popped, but by clicking the MENU item
nothing happens, nor does the pop up menu goes unseen ....

How come this is happening that in RELEASE MODE itself it works fine when seen the output through VISUAL STUDIO
and not when the INTERNET EXPLORER(IE) is opened in other way ?

Kindly help !

LRESULT CBandToolBarCtrl::OnCommand(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
            if(nID==IDM_MENU_ID_BASE)
            {   
                //Functionality for the MENU item web search

                searchbuttonstate=0;
                LPWSTR buttName = L"Web Search..";
                TBBUTTONINFO tbButtonInfo;
                memset(&tbButtonInfo, 0, sizeof(TBBUTTONINFO));
                tbButtonInfo.cbSize   = sizeof(TBBUTTONINFO);
                tbButtonInfo.dwMask   =TBIF_SIZE  |TBIF_TEXT;
                tbButtonInfo.fsStyle  = BTNS_NOPREFIX|BTNS_BUTTON  | BTNS_AUTOSIZE | BTNS_SHOWTEXT;
                tbButtonInfo.pszText = (LPWSTR)buttName;
                tbButtonInfo.idCommand = IDC_BUTTON_BASE +3;;
                ::SendMessage(m_bar.m_hWnd, TB_SETBUTTONINFO, IDC_BUTTON_BASE +3, (LPARAM)&tbButtonInfo);
                PostSearchData();
            }


            if(nID==IDM_MENU_ID_BASE + 1)
            {
            /*Functionality for the MENU ITEM IMAGE SEARCH*/
                    searchbuttonstate=1;
                    LPWSTR buttName = L"Image Search";
                    TBBUTTONINFO tbButtonInfo;
                    memset(&tbButtonInfo, 0, sizeof(TBBUTTONINFO));
                    tbButtonInfo.cbSize   = sizeof(TBBUTTONINFO);
                    tbButtonInfo.dwMask   =TBIF_SIZE  |TBIF_TEXT;
                    tbButtonInfo.fsStyle  = BTNS_NOPREFIX|BTNS_BUTTON  | BTNS_AUTOSIZE | BTNS_SHOWTEXT;
                    tbButtonInfo.pszText = (LPWSTR)buttName;
                    tbButtonInfo.idCommand = IDC_BUTTON_BASE +3;
                    ::SendMessage(m_bar.m_hWnd, TB_SETBUTTONINFO, IDC_BUTTON_BASE +3, (LPARAM)&tbButtonInfo);
                    PostImageData();    
            }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.