He montado este pequeño ejemplo :
Code: Select all
#include "fivewin.ch"
Static oMain, oDlgGet, oBtn, oWndPop
function main()
define dialog oMain title "Principal" FROM 0,0 TO 50,160
activate dialog oMain CENTERED NOMODAL
define dialog oDlgGet title "Test Autoget" size 600, 50 pixel COLOR CLR_WHITE, CLR_BLUE OF oMain
@ 0.5,20 BUTTON oBtn PROMPT "&Crear" OF odlgGet ACTION MuestraPop()
activate dialog oDlgGet centered
return nil
Function Muestrapop()
Local oRect
// Prueba 1
oRect:=oDlgGet:GetRect()
nTop:= oRect:nTop
nLeft:= oRect:nLeft
// Prueba 2
aRect := GetWndRect( oDlgGet:hWnd )
nTop := aRect[ 1 ]
nLeft := aRect[ 2 ]
// Coincide
DEFINE DIALOG oWndPop FROM nTop, nLeft TO nTop+300, nLeft+500 OF oMain PIXEL
ACTIVATE DIALOG oWndPop
// No coincide
DEFINE WINDOW oWndPop FROM nTop, nLeft TO nTop+300, nLeft+500 OF oMain PIXEL
ACTIVATE WINDOW oWndPop
REturn (nil)
¿Alguna explicación?
Gracias!