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 


SetParent

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon Aug 18, 2003 7:20 am    Post subject: SetParent Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Aug 18, 2003 1:47 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon Aug 18, 2003 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon Aug 18, 2003 1:53 pm    Post subject: Reply with quote

hi freezing fire.

thank you for your code, but it does not help.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Aug 19, 2003 4:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Aug 19, 2003 11:56 am    Post subject: Reply with quote

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

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
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