mIRC Home    About    Download    Register    News    Help

Print Thread
dialogs #36989 18/07/03 09:21 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
$did(id).x = x position of control
$did(id).y = y position of control
$did(id).w = width of control
$did(id).h = height of control
/did -s name id x y w h = move and resizing of the control
grin
please tell me if theres already a way to get this info grin

Last edited by pheonix; 18/07/03 09:23 AM.

new username: tidy_trax
Re: dialogs #36990 18/07/03 01:31 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
mdx.dll has a function called "MoveControl" that moves and resizes, believe it or not, controls.

i don't think this is a needed feature since i wouldn't use it.


------
deep down, i'm really superficial.
Re: dialogs #36991 18/07/03 01:49 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
does mdx have a feature to get the xywh as well?
i made this as a suggestion so people can build their own dstudio's in mirc smile


new username: tidy_trax
Re: dialogs #36992 18/07/03 01:59 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
yes. using the same function, without specifying new coordinates.

from mdx.hlp:
//echo Control coordinates: $dll(mdx.dll,MoveControl,Uranium 235)

edit: (added to reduce number of posts)
using the mdx function "ConvertCoords" should allow you to convert between dbus and pixels

Last edited by feud; 18/07/03 02:03 PM.

------
deep down, i'm really superficial.
Re: dialogs #36993 18/07/03 01:59 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
ok thanx.
but, is there a way to choose if it reads option dbu or pixels?
and also a way to create a new control?
:tongue:

Last edited by pheonix; 18/07/03 02:33 PM.

new username: tidy_trax
Re: dialogs #36994 18/07/03 05:37 PM
Joined: Dec 2002
Posts: 86
Zmodem Offline
Babel fish
Offline
Babel fish
Joined: Dec 2002
Posts: 86
If you wanted to build your own dstudio and you wanted to 'get around' getting x/y/w/h utilizing something in mIRC, you can create your own. Say you have your own DSTUDIO and you have a canvas for it where the user builds the objects on the dialog. When they drag/drop, use something like a 'box' with no caption and have it follow the users' mouse across the screen until they let go. When that happens, just store the X & Y begin points and then store the W & H by calculating the positions and offset the width from where it started (W by X and H by Y).

After you do that, you can utilize a customized $identifier, so you could, in a sense, create something like: $didobj(ID#,x/y/w/h). In this case, you would store dialog object ID's into an ini file, or a hash table (which ever you'd prefer). Next, when a user wants to move an object, UNFORTUNATELY, you won't be able to drag/drop at real-time on the dialog, but when they click on the object, just use $mouse.x/y on the dialog and check to see if the x/y is within the location of a certain object. This is the hard way, unfortunately. Actually, a way around this would be to just use the ON DIALOG sclick events on ALL objects in a temporary dialog that you've created.

However, this WILL get tedious because you would have to load/reload/load/reload the dialog that the user is working on OVER AND OVER again. Anyhow, have fun! :-)


-Zmodem
Re: dialogs #36995 18/07/03 05:43 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
or i can use mdx, or tryyyyy a picwin.


new username: tidy_trax