funct GetDesktopArea

funct GetDesktopArea

Postby Loren » Wed May 27, 2020 9:43 pm

Hola a todos, compañeros

Podría alguien, por favor, enviarme el código de GetDesktopArea()

Tengo la versión FWH 17.11 y al parecer esta función está incluida a partir de la versión 17.12

Mil gracias.
LORENZO.
Loren
 
Posts: 479
Joined: Fri Feb 16, 2007 10:29 am
Location: Cadiz - España

Re: funct GetDesktopArea

Postby Antonio Linares » Thu May 28, 2020 10:20 am

Lorenzo,

Code: Select all  Expand view
HB_FUNC( GETDESKTOPAREA )
{
   RECT rct;

   SystemParametersInfo( SPI_GETWORKAREA, 0, &rct, 0 );

   hb_reta( 4 );
   hb_storvnl( rct.top,    -1, 1 );
   hb_storvnl( rct.left,   -1, 2 );
   hb_storvnl( rct.bottom, -1, 3 );
   hb_storvnl( rct.right,  -1, 4 );

}
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: funct GetDesktopArea

Postby Loren » Fri May 29, 2020 6:15 am

Antonio, mil gracias por contestar...

pero al incluir este código en mi .PRG y compilar, me genera los siguientes errores:

Error E0020 Incomplete statement or unbalanced delimiters
Error E0030 Syntax error: "syntax error at 'RCT'"
Error E0030 Syntax error: "syntax error at 'HB_STORVNL'"
Error E0030 Syntax error: "syntax error at '}'"


Utilizo xHarbour

¿Debo incluir algo más?

Lo único que pretendo con todo esto es que NO se oculte la barra de tareas en el stylo Metro.
Yo en mi código tengo lo siguiente:
Code: Select all  Expand view
  DEFINE WINDOW ::oWnd STYLE nOr( WS_POPUP, WS_VISIBLE ) COLOR CLR_WHITE, CLR_BLACK
ACTIVATE WINDOW ::oWnd MAXIMIZED


Mil gracias nuevamente
Saludos.
LORENZO
Desde Cádiz, España.
Loren
 
Posts: 479
Joined: Fri Feb 16, 2007 10:29 am
Location: Cadiz - España

Re: funct GetDesktopArea

Postby Enrico Maria Giordano » Fri May 29, 2020 9:33 am

This is a working sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    WQOUT( GETDESKTOPAREA() )

    RETURN NIL


#pragma BEGINDUMP

#include "windows.h"
#include "hbapi.h"


#ifdef __XHARBOUR__
  #define hb_storvnl( v, x, y ) hb_stornl( v, x, y )
#endif


HB_FUNC( GETDESKTOPAREA )
{
   RECT rct;

   SystemParametersInfo( SPI_GETWORKAREA, 0, &rct, 0 );

   hb_reta( 4 );
   hb_storvnl( rct.top,    -1, 1 );
   hb_storvnl( rct.left,   -1, 2 );
   hb_storvnl( rct.bottom, -1, 3 );
   hb_storvnl( rct.right,  -1, 4 );

}

#pragma ENDDUMP


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests