Wow, very cooool!!!Pupil wrote:Maybe this help?
viewtopic.php?t=6753
thank's

yes your rightTruth_Seeker wrote: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.Edwin Knoppert wrote:forget the whole thing
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
It work but i was talking in mdi....Truth_Seeker wrote:This code:
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...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
There is some way to see only the video? (Without menu, without list of reproduction. ..)Truth_Seeker wrote:This code:
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...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