What's a good way to pass information to a DialogBox().
For example I've got a general dialog box that I want to use for selecting
items
from a list. I have several lists that the user might choose from. What
I'd like to do is pass in a title for the dialog box and a pointer to the
list of strings to choose from when the dialog box is created, but the
DialogBox function doesn't appear to have any type of parameter to support
user data. (I've heard that win95 has another version of DialogBox, but I'm
interested in an app for win 3.1 (16 bit)).
The only way I know to get around it is through using global variables,
yuuck. Any help would be much appreciated. Thanks.
Mitchel Soltys
"DialogBox" doesn't, but "DialogBoxParam" does!
Chris
----------------------------------------------------------------
Chris Marriott, Microsoft Certified Solution Developer.
SkyMap Software, U.K. e-mail: ch...@skymap.com
Visit our web site at http://www.skymap.com
In case of mfc programming under vc++, you have an own from CDialog
derived class with some member variables in it. You would bring the box
to the screen via:
CMyDialog d;
d.my_member_variables = ...
d.DoModal();
where the automated DDX-functions would do the rest for you, if you
choose to connect the controls in the box to the member variables using
Class Wizard.
bye
Uwe
--
--------------------------
Dipl.-Phys. Uwe Post
Redaktion c't
u...@ct.heise.de
--------------------------