| View previous topic :: View next topic |
| Author |
Message |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Sat Oct 26, 2002 3:14 pm Post subject: Multiple dialogs |
|
|
Here's the thing.
I wrote several programs which I'd like to combine into one big exe and then call the separate exes using command line parameters. This means that the combined exe has multiple dialogs.
2 of those dialogs use 'dialog set,<control name>'.
The first one is a task icon for which I use the 'dialog set,<control name>' to change the infotext whenever the status of the exe changes.
The other one is a "flash"-dialog with a progressbar. The other dialogs may or may not appear before or after these two dialogs and here's the problem; In order to set the next step for the progressbar or the infotext for the taskicon I need to know the dialognumber of the these dialogs so I can select them. Unfortunately they can change whithout an actual event occurring so I can't use the @Event(D)-function.
Is there a solution for this or am I just waisting my time?  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Oct 26, 2002 5:38 pm Post subject: |
|
|
| Maybe you can make something with the use of @winontop()... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Oct 26, 2002 11:44 pm Post subject: |
|
|
If I understand the question correctly....
You can use a list as an index for multiple windows.
Add the child window names to the list (add a blank
line to the list first, or the name of the main dialog).
When a child window is opened, add it's window title
to the list. When a child window is closed, use @match()
to find it's title in the list and remove it. The @index()
number will always be the dialog number for that window.
If several are open, use @winactive() to find the active
window, then @match() to search the list and retrieve
the @index() number (which is the dialog number).
Here's an example using multiple windows:
http://www.vdsworld.com/forum/viewtopic.php?t=714
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Oct 27, 2002 2:26 am Post subject: |
|
|
I find that using CLASS names for each dialog is much better, especially if
you change the title bar of the child windows. And you can use
@name(@datetime())@ext(@datetime()) to generate unique class names for
each child, or use one of the random number dlls or routines.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Oct 27, 2002 6:14 am Post subject: |
|
|
Or use your initials and a large incremented number.
Chances of duplicates by others on a given system at
a given time are kinda slim...
Using @datetime() is a nice idea Garrett.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Oct 27, 2002 7:48 pm Post subject: |
|
|
I did neglect to mention that I usually put the name of the program before
the datetime string to insure that it's even more unique, just like you
suggest using initials.
For me though, I've never had undetermined child windows... Mine have all
been planned out and giving them all unique names is rather easy since
they are all planned. But even if you have a program that allows
undetermined child windows, you should have no problems with giving
unique class names to each.
-Garrett |
|
| Back to top |
|
 |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Mon Oct 28, 2002 7:08 am Post subject: |
|
|
Thanks guys!
Once again you're lifesavers...  |
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Mon Oct 28, 2002 2:10 pm Post subject: |
|
|
| Quote: |
For me though, I've never had undetermined child windows... Mine have all
been planned out and giving them all unique names is rather easy since
they are all planned. But even if you have a program that allows
undetermined child windows, you should have no problems with giving
unique class names to each.
|
I think we could all take a lesson from Garrett (especially you younger
folks) planned child windows are the only responsible approach. Think of
your future and the expense of a child window. Most of all think of the
poor child window who will now depend upon a parent window for all the
necessities of life, most importantly love and understanding. Are you
prepared to make that kind of commitment without a great deal of
planning before you're certain?
Maybe you could try a pet window first.
Garrett plans so well he even knows the name of the child before hand.
I wonder how he knows the gender?
Garrett you are an inspiration to us all!
Another public service message from:
moke |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Oct 28, 2002 7:41 pm Post subject: |
|
|
Way to go, moke! VDS family planning.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Oct 28, 2002 9:34 pm Post subject: |
|
|
Ah man! Did I get to be the whipping boy on that one or what!! LOL!!!
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Oct 28, 2002 9:44 pm Post subject: |
|
|
Lol Garrett, it's nice to know you believe in "planned
programming"...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Mon Oct 28, 2002 9:51 pm Post subject: |
|
|
Sorry Garrett,
I couldn't resist.
moke |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Oct 29, 2002 5:40 am Post subject: |
|
|
Ok, since we're on this.....
Do Trojan's keep our programs from producing little child windows???
-Garrett |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Tue Oct 29, 2002 5:51 am Post subject: |
|
|
LoL, had to think about that one twice
Ribbed for Microsoft's pleasure. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
moke Contributor

Joined: 02 Jan 2002 Posts: 162
|
Posted: Tue Oct 29, 2002 5:04 pm Post subject: |
|
|
Good one Garrett,
I hate to sound old fashioned but what's wrong with abstinence until both
the programmer and the program are ready for commitment?
Too many programmers believe that just because they have a BIG
HARD DISC that they should use it, without thought for the
consequences. Well I say a little responsibility and moral fortitude go a
long way.
However, if you just can't resist all those opportunities for fun I have two
words for you:
VIRUS PROTECTION !!!
moke
PS - Tommy, if this post crosses the line of acceptable usage my
apologies and feel free to edit or delete it. Just having a little fun . |
|
| Back to top |
|
 |
|