popup menu
my popup menu is not wrking in release mode
plz help
[56 byte] By [
shosha] at [2007-11-18 17:42:45]

# 1 Re: popup menu
Maybe I should get my crystal ball out to find out what's wrong.
Maybe the forum could hold a seance and ask the spirits.
Without more information we can't possibly help. Chances are that there's a member variable which you aren't initialising : this is the most likely culprit for something working in debug and not in release.
What is your app : is it Win32/MFC SDI/MDI ?
Darwen.
darwen at 2007-11-11 1:26:01 >

# 2 Re: popup menu
sir
actually i have dynamically attached a popup menu when application give some results.in my application results are specific URLs.
when i right click,popup menu appears.
But when i click on the popup menu option(Go to URL) it doesn't do anything in release mode
it simply do not enter into the handler of GOTOURL option.
however same thing works very much fine in debug mode.
i think i've made myself much clear
so plz help me.
shosha at 2007-11-11 1:26:58 >

# 4 Re: popup menu
HI! Try to give ur code along with ur problem! It will become easy to findout the error!
Just u remove ur existing message handler! and create a new message handler! I think this will solves the problem?
KVR1 at 2007-11-11 1:29:02 >

# 5 Re: popup menu
void MyView::OnMouseDownResults(short Button, short Shift, long x, long y)
{
intResultButton=Button;
xResult=x;
yResult=y;
}
//and other function is
void MYView::OnClickResults()
{
CMenu menu;
CMenu* ptrMenu=NULL;
menu.LoadMenu(IDR_POPUP);
strGotoURL="";
ptrMenu=menu.GetSubMenu(0);
if(m_resultsGrid.GetText()=="")
{
ptrMenu->EnableMenuItem(ID_POPUP_GOTOURL, MF_GRAYED);
ptrMenu->EnableMenuItem(ID_POPUP_SENDEMAIL, MF_GRAYED);
}
else
{
ptrMenu->EnableMenuItem(ID_POPUP_GOTOURL, MF_ENABLED);
ptrMenu->EnableMenuItem(ID_POPUP_SENDEMAIL, MF_ENABLED);
}
if(intResultButton==2)
{
ptrMenu->TrackPopupMenu
(
TPM_LEFTALIGN|TPM_RIGHTBUTTON,
xResult+32,
yResult+175,
this,
NULL
);
m_resultsGrid.SetCol(0);
strMailid=m_resultsGrid.GetText();
m_resultsGrid.SetCol(1);
strGotoURL=m_resultsGrid.GetText();
}
}
//strgotoURL and strMailid recieve their respective value
but the message handler for them aren't working(in release mode)
shosha at 2007-11-11 1:30:10 >
