Click here to Skip to main content
15,867,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can Signnal'ed Event Generate a User Message Pin
Adam Roderick J8-Apr-10 2:15
Adam Roderick J8-Apr-10 2:15 
GeneralRe: Can Signnal'ed Event Generate a User Message Pin
ForNow8-Apr-10 4:36
ForNow8-Apr-10 4:36 
QuestionHow to develop a desktop icon manager like the software "fences"? [modified] Pin
letianzhu7-Apr-10 22:03
letianzhu7-Apr-10 22:03 
AnswerRe: How to develop a desktop icon manager like the software "fences"? Pin
Adam Roderick J7-Apr-10 22:20
Adam Roderick J7-Apr-10 22:20 
GeneralRe: How to develop a desktop icon manager like the software "fences"? Pin
letianzhu8-Apr-10 1:33
letianzhu8-Apr-10 1:33 
AnswerRe: How to develop a desktop icon manager like the software "fences"? Pin
KarstenK8-Apr-10 0:13
mveKarstenK8-Apr-10 0:13 
GeneralRe: How to develop a desktop icon manager like the software "fences"? Pin
letianzhu8-Apr-10 1:10
letianzhu8-Apr-10 1:10 
QuestionHow to enable the dynamically sub menu in the dialog program ? Pin
wangningyu7-Apr-10 21:39
wangningyu7-Apr-10 21:39 
Hello everybody !


I'm try to enable the dynamically menu,such as this code :

ListCtrl (Report style)

void CTestDlg::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	CString s10,s11,s12; // the position strings.
	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) // -- Execute this loop as long as GetNextSelectedItem() returns -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" )
		{
			// Enabled the menu when the strings is "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 ? Poke tongue | ;-P
AnswerRe: How to enable the dynamically sub menu in the dialog program ? Pin
Code-o-mat8-Apr-10 2:15
Code-o-mat8-Apr-10 2:15 
GeneralRe: How to enable the dynamically sub menu in the dialog program ? Pin
wangningyu8-Apr-10 14:54
wangningyu8-Apr-10 14:54 
QuestionQuickTimeSdk prob Pin
002comp7-Apr-10 21:05
002comp7-Apr-10 21:05 
AnswerRe: QuickTimeSdk prob Pin
002comp7-Apr-10 23:54
002comp7-Apr-10 23:54 
QuestionMessage of right-clicking on column header of CListCtrl Pin
includeh107-Apr-10 19:17
includeh107-Apr-10 19:17 
AnswerRe: Message of right-clicking on column header of CListCtrl Pin
PJ Arends7-Apr-10 21:16
professionalPJ Arends7-Apr-10 21:16 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
Iain Clarke, Warrior Programmer7-Apr-10 21:19
Iain Clarke, Warrior Programmer7-Apr-10 21:19 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
PJ Arends8-Apr-10 8:07
professionalPJ Arends8-Apr-10 8:07 
AnswerRe: Message of right-clicking on column header of CListCtrl PinPopular
Iain Clarke, Warrior Programmer7-Apr-10 21:16
Iain Clarke, Warrior Programmer7-Apr-10 21:16 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
includeh107-Apr-10 23:00
includeh107-Apr-10 23:00 
RantRe: Message of right-clicking on column header of CListCtrl Pin
Iain Clarke, Warrior Programmer7-Apr-10 23:05
Iain Clarke, Warrior Programmer7-Apr-10 23:05 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
Adam Roderick J7-Apr-10 23:06
Adam Roderick J7-Apr-10 23:06 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
David Crow8-Apr-10 3:40
David Crow8-Apr-10 3:40 
AnswerRe: Message of right-clicking on column header of CListCtrl Pin
Rolf Kristensen12-Apr-10 9:26
Rolf Kristensen12-Apr-10 9:26 
GeneralBarcode Application Usage [was: Re: Message of right-clicking on column header of CListCtrl] Pin
gvMadhav24-Jul-10 17:53
gvMadhav24-Jul-10 17:53 
Questionactivex Pin
mazizi7-Apr-10 18:52
mazizi7-Apr-10 18:52 
AnswerRe: activex Pin
Garth J Lancaster7-Apr-10 20:19
professionalGarth J Lancaster7-Apr-10 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.