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.
|
04-30-2004, 04:20 PM
|
#1
|
|
Raw Wave
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
|
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?
|
|
|
04-30-2004, 04:37 PM
|
#2
|
|
Confusion Master
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
|
I second that emotion
|
|
|
04-30-2004, 07:04 PM
|
#3
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Linz Am Rhein , DE
Vehicle: 2000 BMW 316 compact
Posts: 276
|
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
|
|
|
05-01-2004, 05:29 AM
|
#4
|
|
Raw Wave
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
|
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.
|
|
|
05-01-2004, 05:54 AM
|
#5
|
|
9 Fingered Administrator Lesbian
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
|
Pic
__________________
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!
|
|
|
05-01-2004, 05:55 AM
|
#6
|
|
9 Fingered Administrator Lesbian
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
|
This should get you started
__________________
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!
|
|
|
05-01-2004, 05:58 AM
|
#7
|
|
9 Fingered Administrator Lesbian
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
|
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!
|
|
|
05-01-2004, 06:40 AM
|
#8
|
|
Raw Wave
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
|
Thanks, I'll take a look 
Last edited by Laidback : 05-09-2004 at 04:16 PM.
|
|
|
05-09-2004, 04:17 PM
|
#9
|
|
Raw Wave
Join Date: Oct 2003
Location: Madrid
Vehicle: Jeep GC
Posts: 1,979
|
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 
|
|
|
05-09-2004, 07:44 PM
|
#10
|
|
9 Fingered Administrator Lesbian
Join Date: Jan 2003
Location: Ruston, LA
Vehicle: 1998 Ranger/1991 Sunbird
Posts: 9,852
|
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!
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:15 PM.
|
|