Able to take controls in parent window even after launch of another dialog using DoModal - visual-c++

I have an application which is created using MFC and I have created a MFC dll on click of a button the exe will call the dll which in turn will launch a dll using dialogClass.DoModal().
My Problem is even after this dialog I am able to access my parent application. which I should
not be able to access. Is there any setting for this . Can somebody help me on this

Sounds like you have created a modal-less dialog. If you create the same dialog as a modal pop-up dialog, then you should get the behaviour you have described.
This link should give you the information you are looking for: Using Dialog boxes
Other links that might be useful are:
Dialog box styles
Window styles

Related

How to disable intrusive template picker dialog?

Is there any global option to disable the template picker dialog for 2sxc after the application is configured? Now this dialog is popping up every page load in edit mode and interferes with general website editing.
I'm not sure what your question is - maybe add some context or screenshot.
My guess is you added a module to the page and didn't configure it yet - so the picker automatically appears. Just pick something - or delete the module, and you should be good to go.

window.opener does not work in Excel for Windows

I have built an Excel add-in, it opens a popup by window.open, then the add-in communicates with the popup site. I just realised that it does NOT work in Excel for Windows, the reason is that the popup can NOT get the host by $window.opener.
To illustrate this and avoid cross-domain, I have made a xml, which refers to the add-in and the test page. It works well in Excel Online in Chrome and in IE. However, while running it in Excel for Windows, $window.opener returns undefined.
Could anyone tell me what happened, and what's the workaround?
(for people who recommend Dialog API, please see this thread. So now neither Dialog nor window.open works in Excel for Windows).
UI.messageParent also won't work? It's from the official docs.
Example:
Office.context.ui.messageParent("Message from Dialog box")
Docs:
Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent.
(I assume this isn't the Dialog API which you referring)

Dailog box not visible when custom control is added in MFC Dailog Application

i have add custom control on dailog box in MFC Dailog application.when i run my code dailog box is not visible.
anyone having any idea how to fix this??
Yes. Usually it's because the window class (WNDCLASS) of the custom control has not been registered (RegisterClass()) yet. Make sure you register the class first.

Add sucsess message after uninstalling process in advanced installer

I created a setup file for my project with advanced installer but when i try to uninstall the package from control panel i don't see any dialog showing up telling me that uninstallation is a success, it's just run, uninstalling the application and then close. how can i add a dialog to show after uninstallation process?
I'm using advanced installer 12.3.1 and I'm using a custom theme if that is relevant to the question.
It's because your MSI uninstallation through Control Panel goes in Basic UI mode.
There are several ways to do what you want:
If you need simple end success or failure dialog:
you need to create a custom action which will change INSTALLUILEVEL to INSTALLUILEVEL_BASIC and INSTALLUILEVEL_ENDDIALOG. Please refer these links to find more information about it: MSDN and MSDN
The second way is a trick to hide Uninstall button from Add\Remove Programs and left only Change button. Then you need hide Change and Modify buttons from Maintenance dialog window in AdvancedInstaller (InstallShield, Orca, InstEd, etc). In this case you will receive uninstallation in Full UI mode.

How to create a dialog box dynamically in MFC application?

I am working on a MFC SDI application. I want to get a dialog box called on the click of a menu button but I want to create that dialog box dynamically and not use the resource view. I am not able to figure out how to do that even after googling a lot.
Create an empty dialog resource or use a empty resource template in memory.
Create the dialog. Either using a pointer to the resource template in memory, or in the resource.
Call DoModal.
In OnInitDialog. Resize the dialog, Create all child windows, set the dialog title...
Back around Visual Studio 2008, there was some sample code called DLGTEMPL. I've used it to build a dynamic dialog just like you want. I'm using VS2013 and I could not seem to find the sample code on my local hard drive. However, Microsoft still makes this available here via a VS2005 samples page. Simply click on "Download Sample" at the top and it will install the sample onto your hard drive. The sample provides the basis for creating a dynamic dialog from an in memory resource.

Resources