Page 2 of 2

Posted: Fri Apr 29, 2005 5:15 pm
by porfirio
Pupil wrote:Maybe this help?
viewtopic.php?t=6753
Wow, very cooool!!!

thank's ;)

Posted: Fri Apr 29, 2005 6:52 pm
by Truth_Seeker
Edwin Knoppert wrote:forget the whole thing
Just curious but why do you say to forget the whole thing? I mean I think it is intresting that you can embed another application in yours.

Posted: Fri Apr 29, 2005 7:04 pm
by porfirio
Truth_Seeker wrote:
Edwin Knoppert wrote:forget the whole thing
Just curious but why do you say to forget the whole thing? I mean I think it is intresting that you can embed another application in yours.
yes your right ;)

opk i know how to get the handle and now i want to know hot to put it in my mdigadgect, setparent_(win,win) work but i want it in mdi so it will have scrollbar and he could be maximizated inside the window....

so if someone know how do i add the opened window in my mdi i will apreciate ;)

Posted: Fri Apr 29, 2005 7:08 pm
by Truth_Seeker
By the way is it legal to sell an application that embeds another?

Posted: Fri Apr 29, 2005 7:14 pm
by porfirio
Truth_Seeker wrote:By the way is it legal to sell an application that embeds another?
it depends of the aplication you want to use i think....

[edit]

by the way i buy a aplication for my store that costs 500€ and it embeds calc.exe so...

Posted: Fri Apr 29, 2005 10:16 pm
by Edwin Knoppert
It's not an issue if it's nice, it's an issue you simply can't.
Of course maybe the notepad window is embedded but that would behave very poorly.
All kinds of things conflict.

My recomendation if you want to pursuit?
Try to move the window's position along with desired location.
This is somehow of an embedded windows media viewer behavious.
Drag while playing and you'll notice the video is kept behind.
It's just an idea.
Not parent window stuff but more a stay above window matter.
Still seperated from the app controlling it.

Posted: Fri Apr 29, 2005 10:58 pm
by Truth_Seeker
This code:

Code: Select all

RunProgram("c:\Program Files\Windows Media Player\wmplayer.exe") 
hWndApp=FindWindow_("WMPlayerApp" , #Null)
While hWndApp=0 
  Delay(100) 
  hWndApp=FindWindow_("WMPlayerApp" , #Null) 
Wend 

hwndMain=OpenWindow(1,0,0,640,480,#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget,"Containt Notepad") 
If hwndMain=0 
  End 
EndIf 
CreateGadgetList(hwndMain) 
hContainer=ContainerGadget(1,3,3,636,470,#PB_Container_BorderLess) 
; --> Add #WS_CLIPCHILDREN to the ContainerGadget 
SetWindowLong_(hContainer, #GWL_STYLE, GetWindowLong_(hContainer, #GWL_STYLE) | #WS_CLIPCHILDREN) 
; --> Add #WS_CHILD to the APP 
SetWindowLong_(hWndApp, #GWL_STYLE, GetWindowLong_(hWndApp, #GWL_STYLE) | #WS_CHILD ! #WS_POPUP) 
; --> Set the ContainerGadget as the parent 
; --> Remove WS_POPUP style, Now App's menu available,and works better! 
SetParent_(hWndApp,hContainer) 
; --> Position Notepad 
;SetWindowPos_(hWndApp, 0, 20, 20, 500, 400, 0) 
ShowWindow_(hWndApp,#SW_SHOWMAXIMIZED)

Repeat 
  event=WindowEvent()
  Delay(10)
Until event=#PB_Event_CloseWindow

SendMessage_(hWndApp, #WM_CLOSE, #Null, #Null)
End
Works for me as long as I do not minimize and restore the window. Movie shows just like normal even if you move the window around. Maybe I am not understanding or something...

Posted: Sat Apr 30, 2005 10:08 am
by porfirio
Truth_Seeker wrote:This code:

Code: Select all

RunProgram("c:\Program Files\Windows Media Player\wmplayer.exe") 
hWndApp=FindWindow_("WMPlayerApp" , #Null)
While hWndApp=0 
  Delay(100) 
  hWndApp=FindWindow_("WMPlayerApp" , #Null) 
Wend 

hwndMain=OpenWindow(1,0,0,640,480,#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget,"Containt Notepad") 
If hwndMain=0 
  End 
EndIf 
CreateGadgetList(hwndMain) 
hContainer=ContainerGadget(1,3,3,636,470,#PB_Container_BorderLess) 
; --> Add #WS_CLIPCHILDREN to the ContainerGadget 
SetWindowLong_(hContainer, #GWL_STYLE, GetWindowLong_(hContainer, #GWL_STYLE) | #WS_CLIPCHILDREN) 
; --> Add #WS_CHILD to the APP 
SetWindowLong_(hWndApp, #GWL_STYLE, GetWindowLong_(hWndApp, #GWL_STYLE) | #WS_CHILD ! #WS_POPUP) 
; --> Set the ContainerGadget as the parent 
; --> Remove WS_POPUP style, Now App's menu available,and works better! 
SetParent_(hWndApp,hContainer) 
; --> Position Notepad 
;SetWindowPos_(hWndApp, 0, 20, 20, 500, 400, 0) 
ShowWindow_(hWndApp,#SW_SHOWMAXIMIZED)

Repeat 
  event=WindowEvent()
  Delay(10)
Until event=#PB_Event_CloseWindow

SendMessage_(hWndApp, #WM_CLOSE, #Null, #Null)
End
Works for me as long as I do not minimize and restore the window. Movie shows just like normal even if you move the window around. Maybe I am not understanding or something...
It work but i was talking in mdi....

Posted: Sat Apr 30, 2005 4:25 pm
by Truth_Seeker
@Porfirio: sorry I was trying to see what Edwin was talking about.

Posted: Sat Apr 30, 2005 4:52 pm
by porfirio
Truth_Seeker wrote:@Porfirio: sorry I was trying to see what Edwin was talking about.
ok no problem ;)

but i still dont get my window in mdi :(

Posted: Sat Apr 30, 2005 5:06 pm
by Truth_Seeker
I do get a refresh problem and other problems when trying it inside a MDI, it probably could be fixed if you knew how to repaint the child window and the embed application. But I dont know enough winapi.

Posted: Sat Apr 30, 2005 9:10 pm
by porfirio
Truth_Seeker wrote:I do get a refresh problem and other problems when trying it inside a MDI, it probably could be fixed if you knew how to repaint the child window and the embed application. But I dont know enough winapi.
ok .....

glad you try ;)

Posted: Tue Jul 12, 2005 12:02 pm
by zikitrake
Truth_Seeker wrote:This code:

Code: Select all

RunProgram("c:\Program Files\Windows Media Player\wmplayer.exe") 
hWndApp=FindWindow_("WMPlayerApp" , #Null)
While hWndApp=0 
  Delay(100) 
  hWndApp=FindWindow_("WMPlayerApp" , #Null) 
Wend 

hwndMain=OpenWindow(1,0,0,640,480,#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget,"Containt Notepad") 
If hwndMain=0 
  End 
EndIf 
CreateGadgetList(hwndMain) 
hContainer=ContainerGadget(1,3,3,636,470,#PB_Container_BorderLess) 
; --> Add #WS_CLIPCHILDREN to the ContainerGadget 
SetWindowLong_(hContainer, #GWL_STYLE, GetWindowLong_(hContainer, #GWL_STYLE) | #WS_CLIPCHILDREN) 
; --> Add #WS_CHILD to the APP 
SetWindowLong_(hWndApp, #GWL_STYLE, GetWindowLong_(hWndApp, #GWL_STYLE) | #WS_CHILD ! #WS_POPUP) 
; --> Set the ContainerGadget as the parent 
; --> Remove WS_POPUP style, Now App's menu available,and works better! 
SetParent_(hWndApp,hContainer) 
; --> Position Notepad 
;SetWindowPos_(hWndApp, 0, 20, 20, 500, 400, 0) 
ShowWindow_(hWndApp,#SW_SHOWMAXIMIZED)

Repeat 
  event=WindowEvent()
  Delay(10)
Until event=#PB_Event_CloseWindow

SendMessage_(hWndApp, #WM_CLOSE, #Null, #Null)
End
Works for me as long as I do not minimize and restore the window. Movie shows just like normal even if you move the window around. Maybe I am not understanding or something...
There is some way to see only the video? (Without menu, without list of reproduction. ..)

Thank you!