Hello Przemek I am wondering if there is a way to typecast <pGT> according to its origin.
To clarify my point: static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT ) { ... ... hWndParent = NULL; if( pWVT->pPP->bConfigured ) { PHB_GT pGTp = hb_gt_ItemBase( pWVT->pPP->pParentGT ); if( pGTp ) { PHB_GTWVT pWVTp = HB_GTWVT_GET( pGTp ); hWndParent = pWVTp->hWnd; hb_gt_BaseFree( pGTp ); if( hWndParent ) ... } } } PHB_GTWVT pWVTp = HB_GTWVT_GET( pGTp ); is refering to local declaration at the top of the .c whereas pGTp comes from the other GT, may be GTWVG or GTWGU and hence returns NULL. Is there any mechanism that I can detect the correct GT context here? If the GT is the same then no problems, I have experimented and is working in demowvg.prg. After introducing GTWGU I loose <pGTp> context if it belongs to another GT. Regards Pritpal Bedi -- View this message in context: http://www.nabble.com/GT---Parent-%7C-Child-Relation-tp20613798p20613798.html Sent from the Harbour - Dev mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour