My suggestion is to follow what beko said. In addition to that you can mark it as expired once the expiry date reached. After that you should not allow the application to continue working even if the date is changed back.
I am working on an mfc application in which I am opening a dialog box containing smileys on button click. Now what I want is to close the dialog dialog box with smileys when mouse click event is fired anywhere on the screen.
1) A CDialog derived CDlgClass
2) A CCmdTarget derived CAnotherClass
I am unable to disable an item of the launched context-menu.
Please follow the comments below to track the problem.
//On Right-clicking the dialog, this function is called
VOID CDlgClass::OnContextMenu(CWnd* pWnd, CPoint point)
//Here, another class' ShowContextMenu is called to load the menu and show it
m_pAnotherClass->ShowContextMenu( this, point);
//Control reaches here when menu item 1 is clicked
void CDlgClass::OnUpdateMenuItemEdit1(CCmdUI* pCmdUI)
//Control is expected to reach here before the menu launches but doesn't do so. Why?//I am expecting menu Item 1 to be disabled before it shows up.
VOID CAnotherClass::ShowContextMenu(CWnd *pDlg, CPoint point)
CMenu *pcmPopupMenu = cmCtxtMenu.GetSubMenu(0);
pcmPopupMenu->TrackPopupMenu (TPM_RIGHTBUTTON|TPM_LEFTALIGN, point.x, point.y, pDlg );
What could be the problem with disabling the menu item although I could actually activate the menu item handler
The function CDlgClass::OnUpdateMenuItemEdit1(CCmdUI* pCmdUI) itself is not getting called before launch of the menu,
when the menu is loaded in a different class.
I wanted to know if one exe can be controlled by another exe. for example i have 2 dialog boxes which are 2 different exes. now in the first exe i am doing a simple addition where there are 3 edit boxes and a button to calculate. now in the 2nd dialog box i only have one button "calculate". now when i click on the 2nd exes calculate button, the event on the first exes button should execute. i hope i have made my problem clear. give me some leads for this.
I have referred a term "ActivexDll" I think there exist a concept called ActiveDll, if I am wrong then kindly excuse me and clarify "Difference between a Dll and ActiveX Components ".
If I am correct then can any one explain me the difference between a Dll and an ActicexDll.
Thanks for the response. can you explain what is the difference between the dll and activex dll. With respect to you answer may be I would put it this way, how does a dll differ when its purpose is to serve an ActiceX Object?