| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Aug 18, 2003 7:20 am Post subject: SetParent |
|
|
Hi,
because of the incompatibility of vdswnd with vds5 I made the same using
a api call in my perfect-intranet application.
I used the following:
| Code: |
DIALOG CREATE, ....
LOADLIB user32.dll
if @ok()
%%dummy = @lib(user32.dll,SetParent,NIL,@strdel(@winexists(#piaddrdetails),1,1),@strdel(@memorymap(get,client_hwnd),1,1))
end
FREELIB user32.dll
DIALOG SHOW
|
This works good, but I have some problems if a message box appears (generated by a dsu) - I hear the bing but no message box comes up and the script stops.
Maybe you can help me, Tommy ? Do you use more commands to get this in vdswnd working or is this a problem on the dsu ?
Thanks for your help.
Bye, Fabian |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 18, 2003 1:47 pm Post subject: |
|
|
You're almost there X-Tools. I revised your API call so that it works.
Note that I replaced "NIL" with "INT:" because you are getting an
integer for a return value. Also you have to use the ":" mark after
the "INT".
Try this example
| Code: | Title SetParent Example
DIALOG CREATE,Parent Window,-1,0,800,508,CLASS TVDSParentWin,COLOR GRAY
DIALOG SHOW
DIALOG CREATE,Child Window,-1,0,319,184,CLASS TVDSChildWin
DIALOG SHOW
LOADLIB user32.dll
%%parent_hwnd = @strdel(@winexists(#TVDSParentWin),1,1)
%%child_hwnd = @strdel(@winexists(#TVDSChildWin),1,1)
%A = @lib(user32.dll,SetParent,INT:,%%child_hwnd,%%parent_hwnd)
FREELIB user32.dll
:Evloop
wait event
goto @event()
:Close
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Aug 18, 2003 1:49 pm Post subject: |
|
|
the problem is much more complex than i thought.
on other apps in my perfect-intranet the same is working fine,
so I analyzed it a little bit more.
In my main app the user can call the addressmanager.
This window comes with setparent into the mainwindows. Inside
this you can choose a addresses. If the address is clicked, a new
app "addressdetails" is opend and comes also into the mainwindow
with setparent. Now there is the problem if the addressdetails app generates a msg box , its now shown.
If I kill the task of the address app, the msg box comes up.
I solved the problem with changing the RUN parameter which calls the addressdetails inside the address application. Before I used RUN .....,WAIT. Without using wait everything is working fine.
Can somebody explain me why ?
Thank you and bye,
Fabian |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Aug 18, 2003 1:53 pm Post subject: |
|
|
hi freezing fire.
thank you for your code, but it does not help. |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Tue Aug 19, 2003 4:56 am Post subject: |
|
|
| FreezingFire wrote: | Also you have to use the ":" mark after
the "INT". |
FF, Have you tried it without the ":"? Although it doesn't matter, I don't think you have to use it. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Aug 19, 2003 11:56 am Post subject: |
|
|
Sorry, wrong words I guess. I didn't know it was optional but it's best
to do it the way the help file states.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|
|
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
|
|