FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour funct GetDesktopArea
Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
funct GetDesktopArea
Posted: Wed May 27, 2020 09: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.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: funct GetDesktopArea
Posted: Thu May 28, 2020 10:20 AM
Lorenzo,

Code (fw): Select all Collapse
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
Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
Re: funct GetDesktopArea
Posted: Fri May 29, 2020 06: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 (fw): Select all Collapse
 聽 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.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: funct GetDesktopArea
Posted: Fri May 29, 2020 09:33 AM
This is a working sample:

Code (fw): Select all Collapse
#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

Continue the discussion