|
Hello everybody !
I'm try to enable the dynamically menu,such as this code :
ListCtrl (Report style)
void CTestDlg::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult)
{
CString s10,s11,s12;
int nSelRows = m_List1.GetSelectedCount();
if(!nSelRows)
return;
POSITION pos = m_List1.GetFirstSelectedItemPosition();
int i = m_List1.GetNextSelectedItem(pos);
TRACE("First Item %d\n",i);
if (i != -1)
{
s10 = m_List1.GetItemText(i,10);
s11 = m_List1.GetItemText(i,11);
s12 = m_List1.GetItemText(i,12);
LPPOINT lpoint = new tagPOINT;
CMenu *pSubMenu;
CMenu m_Menu;
::GetCursorPos(lpoint);
m_Menu.LoadMenu(IDR_MENU18);
pSubMenu = m_Menu.GetSubMenu(0);
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN,lpoint->x,lpoint->y,this);
if( s11 == "Receive" )
{
pSubMenu->EnableMenuItem(3,MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
}
if( s11 == "UnReceive" )
...
pSubMenu->DestroyMenu();
}
*pResult = 0;
}
I tried but failed. Why cannot disable this sub menu ?
|
|
|
|
|
I'd say, try EnableMenuItem before TrakPopupMenu , not after.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
thanks !
|
|
|
|
|
hello Friends
I am updating one of my dll using compiler 64 bit.But i am not able to find 64bit lib files for Quicktimesdk tht I am using as Aditional Libraries,So i ise the same lib but it is giving too many eroors like some variables not found and many more.
Do u have any idea from where i can get 64 bit sdk for QuickTime?
Or Can i run by using same sdk?
THanks
Yogesh
|
|
|
|
|
So,no one having idea of Quick time Sdk for 64 bit?
|
|
|
|
|
What is message/notification/event caused by right-clicking on column header of CListCtrl?
|
|
|
|
|
HDN_ITEMCLICK
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: HDN_ITEMCLICK
a) do the header notifications gets passed up to the parents of the list control?
b| He wants right click.
c) Good to see you about tgain - when's the next article? It's been months!
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: a) do the header notifications gets passed up to the parents of the list control?
No idea, that is up to the OP to test.
Iain Clarke, Warrior Programmer wrote: b| He wants right click.
The iButton member of the NMHEADER structure contains that information.
Iain Clarke, Warrior Programmer wrote: c) Good to see you about tgain - when's the next article? It's been months!
I am always lurking in the forums, just not much time to actually answer any questions. Life seems to get in the way too much lately.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I presume you got downvoted, as you've been around for long enough to work this one out for yourself.
A quick search gives me this list of notifications for you:
http://msdn.microsoft.com/en-us/library/ff485962(v=VS.85).aspx[^]
Try making a small dialog box application, with a list control on it. Then use spy++ to see what notifications are available to you.
There's a LVN_COLUMNCLICK - but also a NM_RCLICK worth looking at.
LVM_HITTEST will help you find out where you're clicking, as will LVM_GETHEADER / HDM_HITTEST.
The messages will have their MFC equivalents, I'm sure.
I hope that gives you enough information to flesh out,
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
If you do not have any experience about my post, please do not say it is "enough" for nothing.
|
|
|
|
|
includeh10 wrote: If you do not have any experience about my post, please do not say it is "enough" for nothing.
If you do have the manners to say thank you, please do not post asking for help. I'll try and remember to leave you struggling in the future.
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
I think that answer is enough, if your question is as mentioned above. But if you are expecting some other answer then please change the question
Величие не Бога может быть недооценена.
|
|
|
|
|
It's responses like this that keep you in the "gray." Are you this grating in person or is it just your online personification?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
Hello Includeh10,
I would like to ask a few usage policy and quesions on the barcode application you developed and posted on Code Project site in Mar 2006. Could you please respond by Test E-mail?
Looking forward to hearing from you.
Best regards,
-/Madhav
|
|
|
|
|
you know if you want to use an ocx(activex) file in your project, you have to register it in your system & subsequently the others who use your program have to do that. i'm looking for a way which load activex in a .h file so we don't need to register it. can you help me?
thanks.
|
|
|
|
|
even if you use #import or the Class-Wizard to generate the wrappers, I think you still need to have registered the control
'g'
|
|
|
|
|
|
Is their any way to pass a message other than a string in a MessageBox.
And would it require casting?
|
|
|
|
|
No. Why?
You could convert the data you wish to show to a text representation and then display it in a message box.
|
|
|
|
|
What are those functions?
|
|
|
|
|
|
will you try SendMessage(...)? The parameters [WPARAM] and [LPARAM] can be set a string or other types.
|
|
|
|
|