The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
Thread Tools Display Modes
Old 04-30-2004, 04:20 PM   #1
Raw Wave
 
Laidback's Avatar
 
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
My Photos: (0)
Embedding apps in vb6

VB6

How do you embed another app like Coyote does?

I launch the app using shell and get it's pid, then I've found some code to match up one of the open windows with the pid and then change the parent but it still doesn't work!

The nearest I've got is capturing the splash screen of the app!!

Can anyone point me to a code example?
__________________
Laidback

Laidback Carputer
Laidback is offline   Reply With Quote
Sponsored Links
Old 04-30-2004, 04:37 PM   #2
Confusion Master
Enforcer's CarPC Specs
 
Enforcer's Avatar
 
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Vehicle: 1997 BMW E36 328I
Posts: 9,725
My Photos: (1)
I second that emotion
Enforcer is offline   Reply With Quote
Old 04-30-2004, 07:04 PM   #3
Variable Bitrate
 
SilentAdmirer's Avatar
 
Join Date: Jul 2003
Location: Linz Am Rhein , DE
Vehicle: 2000 BMW 316 compact
Posts: 276
My Photos: (0)
here is a small c code I wrote which works.
RECT rect;
GetWindowRect(&rect);

MoveWindow(m_hApp,0,0,0,0,TRUE);
DWORD dwStyle = GetWindowLong(m_hApp,GWL_STYLE);
dwStyle &= ~WS_OVERLAPPEDWINDOW;
SetWindowLong(m_hApp,GWL_STYLE,dwStyle);
HWND hAppParent = GetParent(m_hApp);
SetParent(m_hApp,hWnd); //hWnd is the handle of the current App
MoveWindow(m_hApp,0,0,rect.right - rect.left,rect.botton - rect.top,TRUE);

Hope it helps
Satish
SilentAdmirer is offline   Reply With Quote
Old 05-01-2004, 05:29 AM   #4
Raw Wave
 
Laidback's Avatar
 
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
My Photos: (0)
I don't know c but that looks like what I'm trying to do, get the window handle, set the parent, then move the window. It works for Notepad but I can't get it to work for other programs, so there must be something simple I'm missing! For Netstumbler it sometimes grabs the splash screen and moves that but not always and never the main window.
__________________
Laidback

Laidback Carputer
Laidback is offline   Reply With Quote
Old 05-01-2004, 05:54 AM   #5
9 Fingered Administrator
Lesbian
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
My Photos: (0)
Pic
Attached Images
 
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 05-01-2004, 05:55 AM   #6
9 Fingered Administrator
Lesbian
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
My Photos: (0)
Talking

This should get you started
Attached Files
File Type: zip examplecapture.zip (67.0 KB, 354 views)
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 05-01-2004, 05:58 AM   #7
9 Fingered Administrator
Lesbian
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
My Photos: (0)
Quote: Originally Posted by Laidback
I don't know c but that looks like what I'm trying to do, get the window handle, set the parent, then move the window. It works for Notepad but I can't get it to work for other programs, so there must be something simple I'm missing! For Netstumbler it sometimes grabs the splash screen and moves that but not always and never the main window.

Because you are grabbing the wrong window. The handle you get back from shell will not always be the right one. With netstumbler it grabs the splash, but then the splash screen or some other process launches the main app, (different handle)

Use my example will show you how to enumerate and search for the window you want.

Frodo
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 05-01-2004, 06:40 AM   #8
Raw Wave
 
Laidback's Avatar
 
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
My Photos: (0)
Thanks, I'll take a look
__________________
Laidback

Laidback Carputer

Last edited by Laidback : 05-09-2004 at 04:16 PM.
Laidback is offline   Reply With Quote
Old 05-09-2004, 04:17 PM   #9
Raw Wave
 
Laidback's Avatar
 
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
My Photos: (0)
Quote: Originally Posted by Laidback
Thanks, I'll take a look

Yea, forgot to say on this thread but thanks, frodo, for the sample! Just what I needed
__________________
Laidback

Laidback Carputer
Laidback is offline   Reply With Quote
Old 05-09-2004, 07:44 PM   #10
9 Fingered Administrator
Lesbian
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
My Photos: (0)
Quote: Originally Posted by Laidback
Yea, forgot to say on this thread but thanks, frodo, for the sample! Just what I needed


I aim to please.
__________________
FrodoPlayer.com
TeaBaggins.com
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screwy docked toolbox in VB6!! deadweasel Software & Software Development 5 02-12-2004 02:06 AM
Adding apps craigyb MediaCar 4 12-01-2003 06:52 AM
external apps reda4 MediaCar 6 11-20-2003 03:46 AM
How to remove winamp AVS border. - Sample VB6 code Fusion-One Software & Software Development 1 10-03-2003 07:55 PM
2 or more external apps option... cyrocr ME Archive 0 03-27-2003 08:37 AM


All times are GMT -5. The time now is 10:15 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics