* GetConsoleInfos.prg - ConnaƮtre les positions et taille de la console. * ---------------------------------------------------------------------- * /* */ * * --------------------------------- FUNCTION GetConsoleInfos( hHandle ) * --------------------------------- * LOCAL nPosHaut && Position haut. LOCAL nPosGauche && Position gauche. LOCAL nPosDroite && Position droite LOCAL nPosBas && position bas. * LOCAL tRetour := {} && Tableau de retour. * CCGETCONSOLEINFOS( hHandle, @nPosGauche, @nPosHaut, @nPosDroite, @nPosBas ) * AADD( tRetour, nPosHaut ) && 1 -> Position haut. AADD( tRetour, nPosGauche ) && 2 -> Position gauche. AADD( tRetour, nPosBas - nPosHaut ) && 3 -> Hauteur. AADD( tRetour, nPosDroite - nPosGauche ) && 4 -> Largeur. * RETURN tRetour * * ----------------------- * Fonction en language C++ * ----------------------- * #pragma BEGINDUMP #include #include HB_FUNC( CCGETCONSOLEINFOS ) { WINDOWINFO wi ; GetWindowInfo( (HWND) hb_parnl( 1 ), &wi ); hb_storni(wi.rcWindow.left, 2); hb_storni(wi.rcWindow.top, 3); hb_storni(wi.rcWindow.right, 4); hb_storni(wi.rcWindow.bottom, 5); } #pragma ENDDUMP