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 


An easy one

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
nemisis010
Newbie


Joined: 29 May 2002
Posts: 17
Location: Australia

PostPosted: Thu May 30, 2002 4:13 am    Post subject: An easy one Reply with quote

I've just got a quick question about multiple dialogs;

I've tried to integrate the code from the multidialog example that comes with VDS3/4 and i cannot understand why the hell it won't work, all i want to do is open an about box off of a menu item Sad

Title multitest
DIALOG CREATE,Multitest,-1,0,137,43
DIALOG ADD,BUTTON,Exit,10,34,64,24,Exit
DIALOG ADD,MENU,Help,About
DIALOG SHOW

:Main_evloop
wait event
%E = @event()
goto %E

:AboutMENU
goto Child_Dialog

:ExitBUTTON
goto Close

:CloseBUTTON
:CLOSE
exit

:Child_Dialog
DIALOG CREATE,Child Dialog,20,0,284,72,SAVEPOS Child,NOMIN
DIALOG SHOW

------------------------------------------------------------------------------
CAN SOMEONE PLEASE EXPLAIN FROM HERE;

:Child_evloop
wait event
parse "%E;%D",@event(D)
if @zero(%D)
beep
dialog select,1
goto Child_evloop
else
goto Child_%E
end
TO HERE,I DON'T QUITE UNDERSTAND WHAT IT'S TRYING TO DO
------------------------------------------------------------------------------


:Child_CancelBUTTON
:Child_CLOSE
DIALOG CLOSE
wait event
%E = @event()
goto Main_evloop


Any help would be greatly appreciated.
thanks

_________________
------------------------------------


Boo
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: Thu May 30, 2002 7:21 am    Post subject: Reply with quote

_____________________________________________________________
Having different event loops is totally unnecessary.

This should give you a better idea of how child
dialogs work (dialog 0 is always the main dialog):
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Main,-1,0,200,100
  DIALOG ADD,MENU,&File,E&xit
  DIALOG ADD,MENU,&Help,&About
DIALOG SHOW

:EVLOOP
  WAIT EVENT
  rem -- %e is event, %d is dialog number that issued it (0,1,2,etc.) --
  PARSE "%e;%d", @event(d)
  goto %e

:AboutMENU
  DIALOG CREATE,"About...",-1,0,100,50,NOMIN
    DIALOG ADD,TEXT,CT1,5,5,,,"Created By"@cr()"McLain Software"
  DIALOG SHOW
  goto EVLOOP

:ExitMENU
:CLOSE
  if @greater(%d, 0)
    DIALOG SELECT, %d
    DIALOG CLOSE
    rem -- Kill any extra events --
    %e = @event()
    goto EVLOOP
  end
  EXIT

_________________
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
nemisis010
Newbie


Joined: 29 May 2002
Posts: 17
Location: Australia

PostPosted: Thu May 30, 2002 9:18 am    Post subject: Thanks Reply with quote

Great, thanks for the help
_________________
------------------------------------


Boo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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