sometimes i need to change Control Parent.
i have a Progressbar which have a own Window so it will not move when Main Window is moving ...
as i don´t want that i "Over-paint" Titlebar with Progressbar so User can´t hit it
but that was just a Workaround.
i found c:\MiniGUI\SAMPLES\BASIC\StatusBar_ProgressBar\demo.prg
that Demo have a Progressbar in Statusbar ( STATUSITEM / PROGRESSITEM ) but it is not compatible to HMG
---
in e:\hmg.3.4.4\SOURCE\c_windows.c i found
Code: Select all
// SetParent (hWndChild, hWndNewParent)
HB_FUNC ( SETPARENT )
Code: Select all
#IFDEF ON_STATUSBAR
nHwnd := GetProperty( "Pbar_Form", "Handle" )
nSbHwnd := GetControlHandle( "STATUSBAR","Win_1" )
SETPARENT(nHwnd,nSbHwnd)
nHwnd := GetControlHandle( "ProgressBar_1","Pbar_Form" )
nSbHwnd := GetControlHandle( "STATUSBAR","Win_1" )
SETPARENT(nHwnd,nSbHwnd)
#ENDIFthis Way you can also "DragDrop" Item from 1st Windows to 2nd Window ... "just" change Parent ( in Background )
---
i know that HMG have a Array for each Control but i did not touch it.
i understand that "Hack" like these can "confuse" hole App so it is NOT recommend when not know exact what doing.
it would be nice if HMG can "integrate" a "safe" Function to change Control Parent.