Click here to Skip to main content
16,010,394 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Check e-mail? Pin
Nish Nishant6-Dec-01 22:30
sitebuilderNish Nishant6-Dec-01 22:30 
GeneralThis CDC* is killing me Pin
6-Dec-01 21:42
suss6-Dec-01 21:42 
GeneralRe: This CDC* is killing me Pin
Rickard Andersson206-Dec-01 21:56
Rickard Andersson206-Dec-01 21:56 
Questionhow to get the handle of the control of another app Pin
6-Dec-01 20:16
suss6-Dec-01 20:16 
AnswerRe: how to get the handle of the control of another app Pin
Rickard Andersson206-Dec-01 21:42
Rickard Andersson206-Dec-01 21:42 
AnswerRe: how to get the handle of the control of another app Pin
6-Dec-01 22:04
suss6-Dec-01 22:04 
GeneralCTreeCtrl right mouse click handling :( Pin
6-Dec-01 19:44
suss6-Dec-01 19:44 
GeneralRe: CTreeCtrl right mouse click handling :( Pin
6-Dec-01 22:09
suss6-Dec-01 22:09 
afx_msg void OnRclickTree1(NMHDR* pNMHDR, LRESULT* pResult);
ON_NOTIFY(NM_RCLICK, ID_XML_TREE, OnRclickTree1)

void C3DTabViewBar::OnRclickTree1(NMHDR* pNMHDR, LRESULT* pResult)
{
UNREFERENCED_PARAMETER(pNMHDR);

// TODO: Add your control notification handler code here
TRACE(_T("OnRclickTree1\n"));

HTREEITEM hItem = m_treeClass.GetSelectedItem();
if (hItem != NULL)
{
CCMGTreeData* pData = reinterpret_cast<ccmgtreedata*>(m_treeClass.GetItemData(hItem));
switch (pData->GetType())
{
case CCMGTreeData::REFERENCES:
DoPopupMenu(IDR_REFERENCES);
break;
case CCMGTreeData::SCHEMAS:
DoPopupMenu(IDR_SCHEMAS);
break;
}
}

*pResult = 0;
}




void C3DTabViewBar::DoPopupMenu(UINT nMenuID)
{
CMenu popMenu;

popMenu.LoadMenu(nMenuID);

CPoint posMouse;
GetCursorPos(&posMouse);

UINT uiDisable = MF_BYCOMMAND|MF_GRAYED;
UINT uiEnable = MF_BYCOMMAND|MF_ENABLED;

if (nMenuID == IDR_REFERENCES)
{
popMenu.EnableMenuItem(ID_REFERENCES_ADD_MESSAGE_DEFENITION, IsRefernceIncluded(CCMGTreeData::MESSAGE_DEFENITION) ? uiDisable: uiEnable);
popMenu.EnableMenuItem(ID_REFERENCES_ADD_CLASS_OF_SERVICE, IsRefernceIncluded(CCMGTreeData::CLASS_OF_SERVICE) ? uiDisable: uiEnable);
popMenu.EnableMenuItem(ID_REFERENCES_ADD_BALANCE_DEFENITION, IsRefernceIncluded(CCMGTreeData::BALANCE_DEFENITION) ? uiDisable: uiEnable);
}

popMenu.GetSubMenu(0)->TrackPopupMenu(0, posMouse.x, posMouse.y, this);
}


Good luck! Smile | :)
GeneralRe: CTreeCtrl right mouse click handling :( Pin
6-Dec-01 22:12
suss6-Dec-01 22:12 
GeneralRe: CTreeCtrl right mouse click handling :( Pin
Morozov Alexey6-Dec-01 23:28
Morozov Alexey6-Dec-01 23:28 
GeneralRe: CTreeCtrl right mouse click handling :( Pin
7-Dec-01 2:57
suss7-Dec-01 2:57 
GeneralRe: CTreeCtrl right mouse click handling :( Pin
7-Dec-01 3:21
suss7-Dec-01 3:21 
GeneralRe: Resources in a static library Pin
Henry Jacobs7-Dec-01 4:15
Henry Jacobs7-Dec-01 4:15 
GeneralRe: Resources in a static library Pin
HintiFlo24-Jan-02 4:13
HintiFlo24-Jan-02 4:13 
GeneralRe: Resources in a static library Pin
cdehelean7-Dec-01 4:37
cdehelean7-Dec-01 4:37 
GeneralHistory List Logic Pin
Kevin Power6-Dec-01 18:37
Kevin Power6-Dec-01 18:37 
QuestionHow to get path to the registry key Pin
Eugene Pustovoyt6-Dec-01 18:34
Eugene Pustovoyt6-Dec-01 18:34 
QuestionIs there a way to set how far an icon is from the top in a list control? Pin
Bart-Man6-Dec-01 15:41
Bart-Man6-Dec-01 15:41 
Questionhow to get the word under the cursor Pin
hex6-Dec-01 14:25
hex6-Dec-01 14:25 
AnswerRe: how to get the word under the cursor Pin
Christian Graus6-Dec-01 14:36
protectorChristian Graus6-Dec-01 14:36 
GeneralRe: how to get the word under the cursor Pin
hex6-Dec-01 14:44
hex6-Dec-01 14:44 
GeneralRe: how to get the word under the cursor Pin
Christian Graus6-Dec-01 14:48
protectorChristian Graus6-Dec-01 14:48 
GeneralRe: how to get the word under the cursor Pin
hex6-Dec-01 14:57
hex6-Dec-01 14:57 
GeneralRe: how to get the word under the cursor Pin
Christian Graus6-Dec-01 16:13
protectorChristian Graus6-Dec-01 16:13 
GeneralRe: how to get the word under the cursor Pin
Lars Dirks7-Dec-01 1:40
Lars Dirks7-Dec-01 1:40 

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.