July 17th, 2003, 10:03 AM
Problems with multiple instances of dialogs in a DLL
Hope somebody can help with this:
I am writing a DLL which, amongst other things needs to display a Dialog box, the contents of the dialog is dynamic depending on various parameters passed in and is all created on the fly.
I can do all of this quite happily and everything works fine when I have only 1 instance of the dialog box displaying.
Unfortunately, my DLL may be called multiple times within the same Process memory space sometimes these calls will be consecutive (i.e. only one dialog showing at a time) - which works fine, other times will be concurrent - so multiple dialog boxes are required.
The problem I have is that as soon as I open more than 1 dialog box, only the most recently opened dialog works correctly, all the others cease to work.
I need to pass large amounts of data backout of my dialogs to update back to a database or be manipulated in some other way, I also need to pass back the modal result from the dialog, as other functionality may then need to be triggered.
The reason for doing this as a DLL rather than a stand alone App is that this is to be used alongside a commercial product which has exit points for DLL's to hook into for custom code - an example of this would be when you tab out of a Edit field in the commercial product it can call some custom code to perform validation against the data that was entered etc.
I'm using MSVC 5.0 (writing in C not C++)
To be deployed on WinNT or W2K
If anyone can advise as to how to achieve the desired results it would be extremely useful.
Last edited by srarthur; July 17th, 2003 at 10:13 AM.