forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Multiple dialogs
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Sat Oct 26, 2002 3:14 pm    Post subject: Multiple dialogs Reply with quote

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? Sad
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Oct 26, 2002 5:38 pm    Post subject: Reply with quote

Maybe you can make something with the use of @winontop()...
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Oct 26, 2002 11:44 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Oct 27, 2002 2:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Oct 27, 2002 6:14 am    Post subject: Reply with quote

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Oct 27, 2002 7:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Mon Oct 28, 2002 7:08 am    Post subject: Reply with quote

Thanks guys!

Once again you're lifesavers... Razz
Back to top
View user's profile Send private message
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Mon Oct 28, 2002 2:10 pm    Post subject: Reply with quote

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. Smile

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! Laughing

Another public service message from:

moke
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Mon Oct 28, 2002 7:41 pm    Post subject: Reply with quote

Laughing Very Happy Laughing

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
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Oct 28, 2002 9:34 pm    Post subject: Reply with quote

Ah man! Did I get to be the whipping boy on that one or what!! Wink LOL!!!

-Garrett
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Oct 28, 2002 9:44 pm    Post subject: Reply with quote

Lol Garrett, it's nice to know you believe in "planned
programming"... Very Happy Very Happy Very Happy

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Mon Oct 28, 2002 9:51 pm    Post subject: Reply with quote

Sorry Garrett,
I couldn't resist. Smile

moke
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Oct 29, 2002 5:40 am    Post subject: Reply with quote

Ok, since we're on this.....

Do Trojan's keep our programs from producing little child windows???


-Garrett
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Oct 29, 2002 5:51 am    Post subject: Reply with quote

LoL, had to think about that one twice Wink
Ribbed for Microsoft's pleasure.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Tue Oct 29, 2002 5:04 pm    Post subject: Reply with quote

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 !!!

Laughing Laughing Laughing

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 Smile .
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group