hbwhat

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  
c:\harbour\contrib\hbwhat
whtbmp.c
TypeFunctionSourceLine
HB_FUNCVWN_LOADBITMAP(void)
HB_FUNC( VWN_LOADBITMAP )
{
   HB_RETWH( LoadBitmap(
             ISNIL(1) ? GetModuleHandle( NULL ): (HINSTANCE) HB_PARWH(1) ,
             hb_parinfo(2)==HB_IT_STRING ?
                       (LPCTSTR) hb_parcx( 2 ) :
                       MAKEINTRESOURCE( (WORD) hb_parni(2)) ) );
}
whtbmp.c42
HB_FUNCVWN_DRAWBITMAP(void)
HB_FUNC( VWN_DRAWBITMAP )
{
   HDC hDC = (HDC) HB_PARWH( 1 );
   HDC hDCmem = CreateCompatibleDC( hDC );
   DWORD dwraster = (ISNIL(3))? SRCCOPY : hb_parnl(3);
   HBITMAP hBitmap = (HBITMAP) HB_PARWH( 2 );
   BITMAP  bitmap;
   int nWidthDest = ( hb_pcount() >=5 && !ISNIL(6) )? hb_parni(6):0;
   int nHeightDest = ( hb_pcount()>=6 && !ISNIL(7) )? hb_parni(7):0;

   SelectObject( hDCmem, hBitmap );
   GetObject( hBitmap, sizeof( BITMAP ), ( LPVOID ) &bitmap );
   if( nWidthDest && ( nWidthDest != bitmap.bmWidth || nHeightDest != bitmap.bmHeight ))
   {
      StretchBlt( hDC, hb_parni(4), hb_parni(5), nWidthDest, nHeightDest, hDCmem,
                  0, 0, bitmap.bmWidth, bitmap.bmHeight, dwraster );
   }
   else
   {
      BitBlt( hDC, hb_parni(4), hb_parni(5), bitmap.bmWidth, bitmap.bmHeight, hDCmem, 0, 0, dwraster );
   }

   DeleteDC( hDCmem );
}
whtbmp.c55
HB_FUNCVWN_GETBITMAPSIZE(void)
HB_FUNC( VWN_GETBITMAPSIZE )
{
   PHB_ITEM aArray = hb_itemArrayNew( 2 );
   BITMAP bm;
   HBITMAP hBmp = ( HBITMAP ) HB_PARWH( 1 );

   GetObject( hBmp, sizeof( bm ), &bm );

   hb_arraySetNL( aArray, 1, bm.bmWidth );
   hb_arraySetNL( aArray, 2, bm.bmHeight );

   hb_itemReturnRelease( aArray );
}
whtbmp.c80
HB_FUNCVWN_GETBITMAPDIMENSIONEX(void)
HB_FUNC( VWN_GETBITMAPDIMENSIONEX )
{
   SIZE Size;

   if( GetBitmapDimensionEx( ( HBITMAP ) HB_PARWH( 1 ), &Size ) )
      hb_itemReturnRelease( Size2Array( &Size ) );
}
whtbmp.c100
HB_FUNCVWN_SETBITMAPDIMENSIONEX(void)
HB_FUNC( VWN_SETBITMAPDIMENSIONEX )
{
   SIZE Size;

   if ( SetBitmapDimensionEx( (HBITMAP) HB_PARWH( 1 ),
                                  hb_parni( 2 )          ,
                                  hb_parni( 3 )          ,
                                  &Size
                                  ) )
   {
      PHB_ITEM aSize = hb_itemArrayNew( 2 );

      hb_arraySetNL( aSize, 1, Size.cx );
      hb_arraySetNL( aSize, 2, Size.cy );

      hb_itemReturnRelease( aSize );
   }

}
whtbmp.c116
HB_FUNCVWN_SETSTRETCHBLTMODE(void)
HB_FUNC( VWN_SETSTRETCHBLTMODE )
{
   hb_retni( SetStretchBltMode( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtbmp.c141
HB_FUNCVWN_STRETCHBLT(void)
HB_FUNC( VWN_STRETCHBLT )
{
   hb_retl( StretchBlt( (HDC) HB_PARWH( 1 )   ,
                        hb_parni( 2 )         ,
                        hb_parni( 3 )         ,
                        hb_parni( 4 )         ,
                        hb_parni( 5 )         ,
                        (HDC) HB_PARWH( 6 )   ,
                        hb_parni( 7 )         ,
                        hb_parni( 8 )         ,
                        hb_parni( 9 )         ,
                        hb_parni( 10 )        ,
                        (DWORD) hb_parnl( 11 )
                        ) );
}
whtbmp.c150
HB_FUNCVWN_CREATEBITMAP(void)
HB_FUNC( VWN_CREATEBITMAP )
{
   HB_RETWH( CreateBitmap( hb_parni( 1 )       ,
                           hb_parni( 2 )       ,
                           (UINT) hb_parni( 3 ),
                           (UINT) hb_parni( 4 ),
                           hb_parcx(5)
                           ) );
}
whtbmp.c171
HB_FUNCVWN_CREATEBITMAPINDIRECT(void)
HB_FUNC( VWN_CREATEBITMAPINDIRECT )
{
   CONST BITMAP *bmp = (BITMAP * ) hb_parc( 1 );//hb_param( 1,HB_IT_STRING )->item.asString.value;

   HB_RETWH( CreateBitmapIndirect( bmp ) );
}
whtbmp.c188
HB_FUNCVWN_CREATECOMPATIBLEBITMAP(void)
HB_FUNC( VWN_CREATECOMPATIBLEBITMAP )
{
   HB_RETWH( CreateCompatibleBitmap( (HDC) HB_PARWH( 1 ),
                                            hb_parni( 2 )      ,
                                            hb_parni( 3 )
                                            ) );
}
whtbmp.c200
HB_FUNCVWN_CREATEDIBITMAP(void)
HB_FUNC( VWN_CREATEDIBITMAP )
{
   BITMAPINFOHEADER *bmih = (BITMAPINFOHEADER *) hb_parc( 2 );//hb_param( 2, HB_IT_STRING )->item.asString.value ;
   BITMAPINFO *bmi  = (BITMAPINFO *) hb_parc( 5 );//hb_param( 5, HB_IT_STRING)->item.asString.value ;

   HB_RETWH( CreateDIBitmap( (HDC) HB_PARWH( 1 )  ,
                                    bmih                ,
                                    (DWORD) hb_parnl( 3 ),
                                    (VOID *) hb_parcx( 3 ),
                                    bmi                 ,
                                    (UINT) hb_parni( 6 )
                                    ) );
}
whtbmp.c213
HB_FUNCVWN_CREATEDIBSECTION(void)
HB_FUNC( VWN_CREATEDIBSECTION )
{
   BITMAPINFO *bmi  = (BITMAPINFO *) hb_parc( 2 );//hb_param( 2, HB_IT_STRING)->item.asString.value ;
   VOID **ppBits = (VOID **) 0;

   HB_RETWH( CreateDIBSection( (HDC) HB_PARWH( 1 )   ,
                                      bmi                  ,
                                      (UINT) hb_parni( 3 )  ,
                                      ppBits                ,
                                      (HANDLE) HB_PARWH( 5 ),
                                      (DWORD) hb_parnl( 6 )
                                      ) );

   HB_STORWH( *ppBits, 4);
}
whtbmp.c234
HB_FUNCVWN_CREATEDISCARDABLEBITMAP(void)
HB_FUNC( VWN_CREATEDISCARDABLEBITMAP )
{
   HB_RETWH( CreateDiscardableBitmap( (HDC) HB_PARWH( 1 ),
                                             hb_parni( 2 )      ,
                                             hb_parni( 3 )
                                             ) );
}
whtbmp.c255
HB_FUNCVWN_MASKBLT(void)
HB_FUNC( VWN_MASKBLT )
{
   hb_retl( MaskBlt( (HDC) HB_PARWH( 1 )    ,
                     hb_parni( 2 )          ,
                     hb_parni( 3 )          ,
                     hb_parni( 4 )          ,
                     hb_parni( 5 )          ,
                     (HDC) HB_PARWH( 6 )    ,
                     hb_parni( 7 )          ,
                     hb_parni( 8 )          ,
                     (HBITMAP) HB_PARWH( 9 ),
                     hb_parni( 10 )         ,
                     hb_parni( 11 )         ,
                     (DWORD) hb_parnl( 12 )
                     ) );
}
whtbmp.c267
HB_FUNCVWN_BITBLT(void)
HB_FUNC( VWN_BITBLT )
{
   hb_retl( BitBlt( (HDC) HB_PARWH( 1 )  ,
                    hb_parni( 2 )        ,
                    hb_parni( 3 )        ,
                    hb_parni( 4 )        ,
                    hb_parni( 5 )        ,
                    (HDC) HB_PARWH( 6 )  ,
                    hb_parni( 7 )        ,
                    hb_parni( 8 )        ,
                    (DWORD) hb_parnl( 9 )
                    ) );
}
whtbmp.c288
HB_FUNCVWN_PATBLT(void)
HB_FUNC( VWN_PATBLT )
{
   hb_retl( PatBlt( (HDC) HB_PARWH( 1 )  ,
                    hb_parni( 2 )        ,
                    hb_parni( 3 )        ,
                    hb_parni( 4 )        ,
                    hb_parni( 5 )        ,
                    (DWORD) hb_parnl( 6 )
                    ) );
}
whtbmp.c306
HB_FUNCVWN_SETROP2(void)
HB_FUNC( VWN_SETROP2 )
{
   hb_retni( SetROP2( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtbmp.c321
HB_FUNCVWN_SETBITMAPBITS(void)
HB_FUNC( VWN_SETBITMAPBITS )
{
   hb_retnl( SetBitmapBits( (HBITMAP) HB_PARWH( 1 ),
                                   (DWORD) hb_parclen( 2 )  ,
                                   (VOID *) hb_parcx( 2 )
                                   ) );
}
whtbmp.c332
HB_FUNCVWN_SETDIBITS(void)
HB_FUNC( VWN_SETDIBITS )
{

   BITMAPINFO *bmi  = (BITMAPINFO *) hb_parc( 6 );//hb_param( 6, HB_IT_STRING)->item.asString.value ;



   // Your code goes here

   hb_retni( SetDIBits( (HDC) HB_PARWH( 1 )    ,
                        (HBITMAP) HB_PARWH( 2 ),
                        (UINT) hb_parni( 3 )   ,
                        (UINT) hb_parni( 4 )   ,
                        (VOID *) hb_parcx(5)    ,
                        bmi                    ,
                        (UINT) hb_parni( 7 )
                        ) );
}
whtbmp.c344
HB_FUNCVWN_GETROP2(void)
HB_FUNC( VWN_GETROP2 )
{
   hb_retni( GetROP2( (HDC) HB_PARWH( 1 ) ) );
}
whtbmp.c368
HB_FUNCVWN_GETSTRETCHBLTMODE(void)
HB_FUNC( VWN_GETSTRETCHBLTMODE )
{
   hb_retni( GetStretchBltMode( (HDC) HB_PARWH( 1 ) ) );
}
whtbmp.c377
HB_FUNCVWN_SETDIBITSTODEVICE(void)
HB_FUNC( VWN_SETDIBITSTODEVICE )
{

   BITMAPINFO *bmi  = (BITMAPINFO *) hb_parc( 11 );//hb_param( 11, HB_IT_STRING)->item.asString.value ;

   hb_retni( SetDIBitsToDevice( (HDC) HB_PARWH( 1 )  ,
                                hb_parni( 2 )        ,
                                hb_parni( 3 )        ,
                                (DWORD) hb_parnl( 4 ),
                                (DWORD) hb_parnl( 5 ),
                                hb_parni( 6 )        ,
                                hb_parni( 7 )        ,
                                (UINT) hb_parni( 8 ) ,
                                (UINT) hb_parni( 9 ) ,
                                (VOID *) hb_parcx(10) ,
                                bmi                  ,
                                (UINT) hb_parni( 12 )
                                ) );
}
whtbmp.c388
HB_FUNCVWN_STRETCHDIBITS(void)
HB_FUNC( VWN_STRETCHDIBITS )
{

   BITMAPINFO *bmi  = (BITMAPINFO *) hb_parc( 11 );//hb_param( 11, HB_IT_STRING)->item.asString.value ;

   hb_retni( StretchDIBits( (HDC) HB_PARWH( 1 )   ,
                            hb_parni( 2 )         ,
                            hb_parni( 3 )         ,
                            hb_parni( 4 )         ,
                            hb_parni( 5 )         ,
                            hb_parni( 6 )         ,
                            hb_parni( 7 )         ,
                            hb_parni( 8 )         ,
                            hb_parni( 9 )         ,
                            (VOID *) hb_parcx(10)  ,
                            bmi                   ,
                            (UINT) hb_parni( 12 ) ,
                            (DWORD) hb_parnl( 13 )
                            ) );
}


//-----------------------------------------------------------------------------

void Pic(HDC hDC, int x , int y , int dx , int dy , HBITMAP hBmp , COLORREF rgbTransparent , BOOL disabled)
whtbmp.c414
VOIDPic(HDC hDC, int x , int y , int dx , int dy , HBITMAP hBmp , COLORREF rgbTransparent , BOOL disabled)
{

   //  COLORREF rgbOld ;
     HDC      hDCMem ;
     HDC      hDCMem2 ;
     HBITMAP  hbmDefault ;

     HBITMAP  hbmTransMask ;
     HBRUSH   hBr  ;
     HBRUSH   hOld ;


     hDCMem       = CreateCompatibleDC(hDC);
     hDCMem2      = CreateCompatibleDC(hDC);
     hbmTransMask = CreateBitmap(dx,dy,1,1,NULL);


     SetBkColor(hDC, RGB(255,255,255)); //White)
     SetTextColor(hDC, RGB(0,0,0));     //Black)

     hbmDefault=(HBITMAP)SelectObject(hDCMem, hBmp);
     SelectObject(hDCMem2, hbmTransMask)   ;

    // build mask based on transparent color.

     SetBkColor(hDCMem, rgbTransparent);
     BitBlt(hDCMem2, 0, 0, dx, dy, hDCMem, 0, 0, SRCCOPY);

    if( disabled)
      {
        hBr=CreateSolidBrush(GetSysColor(COLOR_BTNHIGHLIGHT));
        hOld=(HBRUSH)SelectObject(hDC,hBr)  ;
        BitBlt(hDC, x+1, y+1, dx-2, dy-2, hDCMem2, 0, 0, 12060490);
        SelectObject(hDC,hOld);
        DeleteObject(hBr)      ;

        hBr=CreateSolidBrush(GetSysColor(COLOR_BTNSHADOW));
        hOld=(HBRUSH)SelectObject(hDC,hBr);
        BitBlt(hDC, x, y, dx-2, dy-2, hDCMem2, 0, 0, 12060490);
        SelectObject(hDC,hOld);
        DeleteObject(hBr);
      }
    else
      {
        BitBlt(hDC, x, y, dx, dy, hDCMem, 0, 0, SRCINVERT);
        BitBlt(hDC, x, y, dx, dy, hDCMem2, 0, 0, SRCAND)   ;
        BitBlt(hDC, x, y, dx, dy, hDCMem, 0, 0, SRCINVERT);
      }


    SelectObject(hDCMem, hbmDefault);
    SelectObject(hDCMem2, hbmDefault);
    DeleteObject(hbmTransMask);

    DeleteDC(hDCMem);
    DeleteDC(hDCMem2);

    return ;

}
whtbmp.c442
HB_FUNCVWN_DRAWGLYPH(void)
HB_FUNC( VWN_DRAWGLYPH )
   {
    Pic(    (HDC) HB_PARWH(1),
                  hb_parni(2),
                  hb_parni(3),
                  hb_parni(4),
                  hb_parni(5),
        (HBITMAP) HB_PARWH(6),
       (COLORREF) hb_parnl(7),
                  hb_parl(8));
    return;
   }





//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI DrawStateA( IN HDC, IN HBRUSH, IN DRAWSTATEPROC, IN LPARAM, IN WPARAM, IN int, IN int, IN int, IN int, IN UINT);

//The DrawState function displays an image and applies a visual effect to indicate a state, such as a disabled or default state.


/*

HB_FUNC( VWN_DRAWSTATE )
{
   DRAWSTATEPROC drawstateProc ;

   // Your code goes here

   hb_retl( DrawState( (HDC) HB_PARWH( 1 )   ,
                       (HBRUSH) HB_PARWH( 2 ),
                       drawstateProc         ,
                       (LPARAM) hb_parnint( 4 ),
                       (WPARAM) hb_parnint( 5 ),
                       hb_parni( 6 )         ,
                       hb_parni( 7 )         ,
                       hb_parni( 8 )         ,
                       hb_parni( 9 )         ,
                       (UINT) hb_parni( 10 )
                     ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI LONG WINAPI GetBitmapBits( IN HBITMAP, IN LONG, OUT LPVOID);

// obsolete

/*

HB_FUNC( VWN_GETBITMAPBITS )
{
   LPVOID  lpVoid  ;

   // Your code goes here

   HB_RETWH( GetBitmapBits( (HBITMAP) HB_PARWH( 1 ),
                                   hb_parnl( 2 )          ,
                                   lpVoid
                                   ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI int WINAPI GetDIBits( IN HDC, IN HBITMAP, IN UINT, IN UINT, OUT LPVOID, IN OUT LPBITMAPINFO, IN UINT);


// NOT FINISHED

/*
HB_FUNC( VWN_GETDIBITS )
{
   VOID *lpvBits ;
   BITMAPINFO *bmi  = (BITMAPINFO *) hb_param( 6, HB_IT_STRING)->item.asString.value ;

   hb_retni( GetDIBits( (HDC) HB_PARWH( 1 )       ,
                        (HBITMAP) HB_PARWH( 2 )   ,
                        (UINT) hb_parni( 3 )      ,
                        (UINT) hb_parni( 4 )      ,
                        ISNIL(5) ? NULL : lpvBits ,
                        bmi                       ,
                        (UINT) hb_parni( 7 )
                        ) );

  hb_storc( lpvBits, 5);
}
*/


//-----------------------------------------------------------------------------
// WINGDIAPI DWORD WINAPI GetGlyphIndicesA( IN HDC, IN LPCSTR, IN int, OUT LPWORD, IN DWORD);

/*

HB_FUNC( VWN_GETGLYPHINDICESA )
{
   LPWORD lpWord ;

   // Your code goes here

   HB_RETWH( GetGlyphIndicesA( (HDC) HB_PARWH( 1 )  ,
                                      (LPCSTR) hb_parcx( 2 ),
                                      hb_parni( 3 )        ,
                                      lpWord               ,
                                      (DWORD) hb_parnl( 5 )
                                      ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI DWORD WINAPI GetGlyphOutlineA( IN HDC, IN UINT, IN UINT, OUT LPGLYPHMETRICS, IN DWORD, OUT LPVOID, IN CONST MAT2 *);

/*

HB_FUNC( VWN_GETGLYPHOUTLINEA )
{
   LPGLYPHMETRICS lpglyphMetrics ;
   LPVOID         lpVoid         ;
   CONST          MAT2           ;

   // Your code goes here

   HB_RETWH( GetGlyphOutlineA( (HDC) HB_PARWH( 1 )  ,
                                      (UINT) hb_parni( 2 ) ,
                                      (UINT) hb_parni( 3 ) ,
                                      lpglyphMetrics       ,
                                      (DWORD) hb_parnl( 5 ),
                                      lpVoid               ,
                                      &MAT2
                                      ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI AlphaBlend( IN HDC, IN int, IN int, IN int, IN int, IN HDC, IN int, IN int, IN int, IN int, IN BLENDFUNCTION);

// NT only ?

/*
HB_FUNC( VWN_ALPHABLEND )
{
   BLENDFUNCTION *bf = (BLENDFUNCTION *) hb_param( 11, HB_IT_STRING)->item.asString.value ;

   hb_retl( AlphaBlend( (HDC) HB_PARWH( 1 ),
                        hb_parni( 2 )      ,
                        hb_parni( 3 )      ,
                        hb_parni( 4 )      ,
                        hb_parni( 5 )      ,
                        (HDC) HB_PARWH( 6 ),
                        hb_parni( 7 )      ,
                        hb_parni( 8 )      ,
                        hb_parni( 9 )      ,
                        hb_parni( 10 )     ,
                        *bf
                        ) );
}
*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI PlgBlt( IN HDC, IN CONST POINT *, IN HDC, IN int, IN int, IN int, IN int, IN HBITMAP, IN int, IN int);

/*

HB_FUNC( VWN_PLGBLT )
{
   CONST   POINT   ;

   // Your code goes here

   hb_retl( PlgBlt( (HDC) HB_PARWH( 1 )    ,
                    &POINT                 ,
                    (HDC) HB_PARWH( 3 )    ,
                    hb_parni( 4 )          ,
                    hb_parni( 5 )          ,
                    hb_parni( 6 )          ,
                    hb_parni( 7 )          ,
                    (HBITMAP) HB_PARWH( 8 ),
                    hb_parni( 9 )          ,
                    hb_parni( 10 )
                    ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI SetDIBColorTable( IN HDC, IN UINT, IN UINT, IN CONST RGBQUAD *);

whtbmp.c510
whtbrsh.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATESOLIDBRUSH(void)
HB_FUNC( VWN_CREATESOLIDBRUSH )
{
   HB_RETWH( CreateSolidBrush( (COLORREF) hb_parnl( 1 ) ) );    // brush color
}
whtbrsh.c28
HB_FUNCVWN_CREATEPATTERNBRUSH(void)
HB_FUNC( VWN_CREATEPATTERNBRUSH )
{
   HB_RETWH( CreatePatternBrush((HBITMAP) HB_PARWH( 1 ) ) );    // bitmap handle
}
whtbrsh.c36
HB_FUNCVWN_CREATEDIBPATTERNBRUSH(void)
HB_FUNC( VWN_CREATEDIBPATTERNBRUSH )
{
   HB_RETWH( CreateDIBPatternBrush( (HGLOBAL) HB_PARWH( 1 ),
                                           (UINT) hb_parni( 2 )
                                           ) );
}
whtbrsh.c45
HB_FUNCVWN_CREATEBRUSHINDIRECT(void)
HB_FUNC( VWN_CREATEBRUSHINDIRECT )
{
   //PHB_ITEM br = hb_param( 1,HB_IT_STRING );
   //LOGBRUSH *lb = (LOGBRUSH * ) br->item.asString.value;
   LOGBRUSH *lb = (LOGBRUSH * ) HB_PARWH( 1 );

   HB_RETWH( CreateBrushIndirect( lb ) );
}
whtbrsh.c59
HB_FUNCVWN_CREATEHATCHBRUSH(void)
HB_FUNC( VWN_CREATEHATCHBRUSH )
{

   HB_RETWH( CreateHatchBrush( hb_parni( 1 ), (COLORREF) hb_parnl(2) ) );
}


//-----------------------------------------------------------------------------

// no prototype ?

whtbrsh.c72
HB_FUNCVWN_CREATEDIBPATTERNBRUSHPT(void)
HB_FUNC( VWN_CREATEDIBPATTERNBRUSHPT )
{
   BITMAPINFO *bmi = (BITMAPINFO *) hb_parc( 1 );//hb_param( 1,HB_IT_STRING )->item.asString.value;

   HB_RETWH( CreateDIBPatternBrushPt( bmi, (UINT) hb_parni( 2 ) ) );
}
whtbrsh.c113
HB_FUNCVWN_FIXBRUSHORGEX(void)
HB_FUNC( VWN_FIXBRUSHORGEX )
{
   POINT *Point = (POINT *) hb_parc( 4 );//hb_param( 4,HB_IT_STRING )->item.asString.value;

   hb_retl( FixBrushOrgEx( (HDC) HB_PARWH( 1 ),
                           hb_parni( 2 )      ,
                           hb_parni( 3 )      ,
                           Point
                           ) );
}
whtbrsh.c126
HB_FUNCVWN_GETBRUSHORGEX(void)
HB_FUNC( VWN_GETBRUSHORGEX )
{
   POINT Point;

   if( GetBrushOrgEx( ( HDC ) HB_PARWH( 1 ), &Point ) )
   {
      PHB_ITEM aPt = hb_itemArrayNew( 2 );

      hb_arraySetNL( aPt, 1, Point.x );
      hb_arraySetNL( aPt, 2, Point.y );

      hb_itemReturnRelease( aPt );
   }
}
whtbrsh.c142
HB_FUNCVWN_SETBRUSHORGEX(void)
HB_FUNC( VWN_SETBRUSHORGEX )
{

   POINT Point;

   if( SetBrushOrgEx( ( HDC ) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ), &Point ) )
   {
      PHB_ITEM aPt = hb_itemArrayNew( 2 );

      hb_arraySetNL( aPt, 1, Point.x );
      hb_arraySetNL( aPt, 2, Point.y );

      hb_itemReturnRelease( aPt );
   }
}
whtbrsh.c164
whtcdlg.c
TypeFunctionSourceLine
HB_FUNCVWN_COMMDLGEXTENDEDERROR(void)
HB_FUNC( VWN_COMMDLGEXTENDEDERROR )
{
  hb_retnl( CommDlgExtendedError() );
}
whtcdlg.c36
HB_FUNCVWN_CHOOSEFONT(void)
HB_FUNC( VWN_CHOOSEFONT )
{
  CHOOSEFONT *cf =  (CHOOSEFONT * ) hb_parc( 1 );
                       //hb_param( 1, HB_IT_STRING )->item.asString.value;

  cf->lStructSize = sizeof(CHOOSEFONT);

  if (ChooseFont( cf ) )
      hb_retclen( (char *) cf, sizeof( CHOOSEFONT ));
}
whtcdlg.c45
HB_FUNCVWN__FINDTEXT(void)
HB_FUNC( VWN__FINDTEXT )
{
   FINDREPLACE fr ;

   fr.lStructSize = sizeof( fr );

   fr.hwndOwner        = (HWND) HB_PARWH( 1 );
   fr.hInstance        = (HINSTANCE) HB_PARWH( 2 );
   fr.Flags            = (DWORD)  hb_parnl( 3 );
   fr.lpstrFindWhat    = (LPTSTR) hb_parcx( 4 );
   fr.lpstrReplaceWith = NULL ;
   fr.wFindWhatLen     = (WORD) hb_parclen(4);
   fr.wReplaceWithLen  = 0 ;
   fr.lCustData        = 0 ;
//   fr.lpfnHook         = ISNIL(5) ? NULL : __DlgProc ;
   fr.lpTemplateName   = NULL ;


   HB_RETWH( FindText( &fr ) );
}
whtcdlg.c60
HB_FUNCVWN__REPLACETEXT(void)
HB_FUNC( VWN__REPLACETEXT )
{
   FINDREPLACE fr ;

   fr.lStructSize = sizeof( fr );

   fr.hwndOwner        = (HWND) HB_PARWH( 1 );
   fr.hInstance        = (HINSTANCE) HB_PARWH( 2 );
   fr.Flags            = (DWORD)  hb_parnl( 3 );
   fr.lpstrFindWhat    = (LPTSTR) hb_parcx( 4 )  ;
   fr.lpstrReplaceWith = (LPTSTR) hb_parcx( 5 )  ;
   fr.wFindWhatLen     = (WORD) hb_parclen( 4 );
   fr.wReplaceWithLen  = (WORD) hb_parclen( 5 );
   fr.lCustData        = 0 ;
//   fr.lpfnHook         = ISNIL(5) ? NULL : __DlgProc ;
   fr.lpTemplateName   = NULL ;

   HB_RETWH( FindText( &fr ) );
}
whtcdlg.c85
HB_FUNCVWN_PRINTDLG(void)
HB_FUNC( VWN_PRINTDLG )
{

   PRINTDLG *pd  = ( PRINTDLG * ) hb_parc( 1 );
                       //hb_param( 1, HB_IT_STRING )->item.asString.value;

   pd->lStructSize = sizeof(PRINTDLG);

   if ( PrintDlg( pd ) )
   {
      hb_storclen( (char*) pd, sizeof(PRINTDLG), 1 );
      hb_retl(TRUE);
   }
   else
     hb_retl(FALSE);
}
whtcdlg.c108
HB_FUNCVWN_PAGESETUPDLG(void)
HB_FUNC( VWN_PAGESETUPDLG )
{

   PAGESETUPDLG *psd = (PAGESETUPDLG * ) hb_parc( 1 );
                        //hb_param( 1, HB_IT_STRING )->item.asString.value;

   psd->lStructSize = sizeof(PAGESETUPDLG);

   if ( PageSetupDlg( psd ) )
   {
      hb_storclen( (char*) psd, sizeof(PAGESETUPDLG), 1 );
      hb_retl(TRUE);
   }
   else
   {
     hb_retl(FALSE);
   }
}
whtcdlg.c149
HB_FUNCVWN_CHOOSECOLOR(void)
HB_FUNC( VWN_CHOOSECOLOR )
{
   CHOOSECOLOR cc ;
   COLORREF crCustClr[16] ;
   int i ;

   for( i = 0 ; i <16 ; i++ )
     crCustClr[i] = (ISARRAY(3) ? ( COLORREF ) hb_parnl(3,i+1) : RGB(0,0,0));
                                    // GetSysColor(COLOR_BTNFACE));

   cc.lStructSize    = sizeof( CHOOSECOLOR );
   cc.hwndOwner      = ISNIL(1) ? GetActiveWindow():(HWND) HB_PARWH(1);
   cc.rgbResult      = (COLORREF)ISNIL(2) ?  0 : hb_parnl(2);
   cc.lpCustColors   = crCustClr ;
   cc.Flags          = (WORD) (ISNIL(4) ? CC_ANYCOLOR | CC_FULLOPEN | CC_RGBINIT : hb_parnl(4) );
   if ( ChooseColorA( &cc ) )
   {
      hb_retnl( cc.rgbResult );
   }
}
whtcdlg.c173
HB_FUNCVWN__GETOPENFILENAME(void)
HB_FUNC( VWN__GETOPENFILENAME )
{
   OPENFILENAME ofn;
   char *szFileName = ( char * ) hb_xgrab( hb_parclen( 2 ) + 1 );

   hb_strncpy( szFileName, hb_parcx( 2 ), hb_parclen( 2 ) );

   ZeroMemory( &ofn, sizeof(ofn) );
   ofn.hInstance       = GetModuleHandle(NULL)  ;
   ofn.lStructSize     = sizeof(ofn);
   ofn.hwndOwner       = (ISNIL  (1) ? GetActiveWindow() : (HWND) HB_PARWH(1));
   ofn.lpstrTitle      = hb_parc (3);
   ofn.lpstrFilter     = hb_parc (4);
   ofn.Flags           = (ISNIL  (5) ? OFN_EXPLORER : hb_parnl(5) );
   ofn.lpstrInitialDir = hb_parc (6);
   ofn.lpstrDefExt     = hb_parc (7);
   ofn.nFilterIndex    = hb_parni(8);
   ofn.lpstrFile       = szFileName;
   ofn.nMaxFile        = hb_parcsiz(2);

   if( GetOpenFileName( &ofn ) )
   {
      hb_stornl( ofn.nFilterIndex, 8 );
      hb_storclen( szFileName, hb_parcsiz(2), 2 );
      hb_xfree( szFileName );
      hb_retc( ( char * ) ofn.lpstrFile );
   }
   else
   {
      hb_retc( NULL );
   }
}
whtcdlg.c199
HB_FUNCVWN__GETSAVEFILENAME(void)
HB_FUNC( VWN__GETSAVEFILENAME )
{
    OPENFILENAME ofn;
    char szFileName[ MAX_PATH + 1 ];
    hb_strncpy( szFileName, hb_parc( 2 ), sizeof( szFileName ) - 1 );
    ZeroMemory( &ofn, sizeof( ofn ) );
    ofn.hInstance       = GetModuleHandle(NULL);
    ofn.lStructSize     = sizeof(ofn);
    ofn.hwndOwner       = ISNIL   (1)  ? GetActiveWindow() : (HWND) HB_PARWH(1);
    ofn.lpstrTitle      = hb_parc (3);
    ofn.lpstrFilter     = hb_parc (4);
    ofn.Flags           = (ISNIL  (5) ? OFN_FILEMUSTEXIST|OFN_EXPLORER : hb_parnl(4) );
    ofn.lpstrInitialDir = hb_parc (6);
    ofn.lpstrDefExt     = hb_parc (7);
    ofn.nFilterIndex    = hb_parni(8);
    ofn.lpstrFile       = szFileName;
    ofn.nMaxFile        = MAX_PATH;
    if(GetSaveFileName(&ofn))
     {
      hb_stornl(ofn.nFilterIndex , 8 );
      hb_retc( ofn.lpstrFile );
     }
    else
     {
      hb_retc( NULL );
   }
}
whtcdlg.c238
HB_FUNCVWN_SHBROWSEFORFOLDER(void)
HB_FUNC( VWN_SHBROWSEFORFOLDER )
{
   HWND hwnd = ISNIL   (1)  ? GetActiveWindow() : (HWND) HB_PARWH(1);
   BROWSEINFO BrowseInfo;
   char *lpBuffer = (char*) hb_xgrab( MAX_PATH + 1 );
   LPITEMIDLIST pidlBrowse;

   SHGetSpecialFolderLocation(hwnd, ISNIL(4) ? CSIDL_DRIVES : hb_parni(4), &pidlBrowse);
   BrowseInfo.hwndOwner = hwnd;
   BrowseInfo.pidlRoot = pidlBrowse;
   BrowseInfo.pszDisplayName = lpBuffer;
   BrowseInfo.lpszTitle = ISNIL (2) ?  "Select a Folder" : hb_parcx(2);
   BrowseInfo.ulFlags = hb_parni(3);
   BrowseInfo.lpfn = NULL;
   BrowseInfo.lParam = 1;
   BrowseInfo.iImage = 0;
   pidlBrowse = SHBrowseForFolder(&BrowseInfo);

   if ( pidlBrowse )
   {
     SHGetPathFromIDList(pidlBrowse,lpBuffer);
     hb_retc( lpBuffer );
   }
   else
   {
     hb_retc( NULL );
   }

   hb_xfree( lpBuffer);
}
whtcdlg.c270
whtclpb.c
TypeFunctionSourceLine
HB_FUNCVWN_CLOSECLIPBOARD(void)
HB_FUNC( VWN_CLOSECLIPBOARD )
{
   hb_retl( CloseClipboard() );
}
whtclpb.c37
HB_FUNCVWN_COUNTCLIPBOARDFORMATS(void)
HB_FUNC( VWN_COUNTCLIPBOARDFORMATS )
{
   hb_retni( CountClipboardFormats() );
}
whtclpb.c44
HB_FUNCVWN_EMPTYCLIPBOARD(void)
HB_FUNC( VWN_EMPTYCLIPBOARD )
{
   hb_retl( EmptyClipboard() );
}
whtclpb.c51
HB_FUNCVWN_ENUMCLIPBOARDFORMATS(void)
HB_FUNC( VWN_ENUMCLIPBOARDFORMATS )
{
   hb_retni( EnumClipboardFormats( (UINT) hb_parni(1) ) );
}
whtclpb.c58
HB_FUNCVWN_SETCLIPBOARDVIEWER(void)
HB_FUNC( VWN_SETCLIPBOARDVIEWER )
{
   HB_RETWH( SetClipboardViewer( (HWND) HB_PARWH(1) ) );
}
whtclpb.c65
HB_FUNCVWN_CHANGECLIPBOARDCHAIN(void)
HB_FUNC( VWN_CHANGECLIPBOARDCHAIN )
{
   hb_retl( ChangeClipboardChain( (HWND) HB_PARWH( 1 ), (HWND) HB_PARWH( 2 ) ) );
}
whtclpb.c70
HB_FUNCVWN_GETOPENCLIPBOARDWINDOW(void)
HB_FUNC( VWN_GETOPENCLIPBOARDWINDOW )
{
   HB_RETWH( GetOpenClipboardWindow(  ) );
}
whtclpb.c80
HB_FUNCVWN_GETPRIORITYCLIPBOARDFORMAT(void)
HB_FUNC( VWN_GETPRIORITYCLIPBOARDFORMAT )
{
   UINT *p, *paFP ;
   UINT i;

   p = paFP = (PUINT) hb_xgrab( hb_parinfa( 1, 0 ) * sizeof(UINT)  );
   for ( i=1; i<=hb_parinfa( 1, 0 ); i++ )
   {
     *p++ = hb_parni( 1, i );
   }
   hb_retni( GetPriorityClipboardFormat( (UINT *) paFP, hb_parinfa( 1, 0 ) ) );

}
whtclpb.c90
HB_FUNCVWN_GETCLIPBOARDSEQUENCENUMBER(void)
HB_FUNC( VWN_GETCLIPBOARDSEQUENCENUMBER )
{
   hb_retnl( (LONG) GetClipboardSequenceNumber(  ) );
}
whtclpb.c114
HB_FUNCVWN_GETCLIPBOARDOWNER(void)
HB_FUNC( VWN_GETCLIPBOARDOWNER )
{
   HB_RETWH( GetClipboardOwner() );
}
whtclpb.c123
HB_FUNCVWN_GETCLIPBOARDVIEWER(void)
HB_FUNC( VWN_GETCLIPBOARDVIEWER )
{
   HB_RETWH( GetClipboardViewer() );
}
whtclpb.c130
HB_FUNCVWN_ISCLIPBOARDFORMATAVAILABLE(void)
HB_FUNC( VWN_ISCLIPBOARDFORMATAVAILABLE )
{
   hb_retl( IsClipboardFormatAvailable( hb_parni(1) ) );
}
whtclpb.c137
HB_FUNCVWN_OPENCLIPBOARD(void)
HB_FUNC( VWN_OPENCLIPBOARD )
{
   hb_retl( OpenClipboard( (HWND) HB_PARWH(1) ) );
}
whtclpb.c144
HB_FUNCVWN_REGISTERCLIPBOARDFORMAT(void)
HB_FUNC( VWN_REGISTERCLIPBOARDFORMAT )
{
   hb_retni( RegisterClipboardFormat( (LPCSTR) hb_parcx(1) ) );
}
whtclpb.c151
HB_FUNCVWN_GETCLIPBOARDDATA(void)
HB_FUNC( VWN_GETCLIPBOARDDATA )
{
   WORD    wType = ( ISNIL( 1 ) ? CF_TEXT : ( WORD ) hb_parni( 1 ) );
   HGLOBAL hMem ;
   HANDLE  hClipMem ;
   LPSTR   lpClip ;

   switch( wType )
   {
      case CF_TEXT:
         hMem = GetClipboardData( CF_TEXT );
         if( hMem )
         {
            hb_retc( ( char * ) GlobalLock( hMem ) );
            GlobalUnlock( hMem );
         }
         else
            hb_retc( NULL );
         break;

      case CF_BITMAP:
         if( IsClipboardFormatAvailable( CF_BITMAP ) )
            HB_RETWH( DuplicateBitmap( ( HBITMAP ) GetClipboardData( CF_BITMAP ) ) );
         else
            HB_RETWH( 0 );
         break;

      default:
         hClipMem = GetClipboardData( ( UINT ) hb_parni( 1 ) );

         if( hClipMem )
         {
            lpClip = ( LPSTR )  GlobalLock( hClipMem );
            hb_retclen( lpClip, GlobalSize( hClipMem ) );
            GlobalUnlock( hClipMem );
         }
         break;
   }
}
whtclpb.c175
HB_FUNCVWN_GETCLIPBOARDFORMATNAME(void)
HB_FUNC( VWN_GETCLIPBOARDFORMATNAME )
{
   int nRet ;
   char cName[128] ;

   nRet = GetClipboardFormatName( (UINT) hb_parni(1), cName, 127 );

   if ( nRet == 0 )
      hb_retc(NULL);
   else
      hb_retclen(cName, nRet);
}
whtclpb.c217
HB_FUNCVWN_SETCLIPBOARDDATA(void)
HB_FUNC( VWN_SETCLIPBOARDDATA )
{
   WORD    wType = ( WORD ) hb_parni( 1 );
   HGLOBAL hMem ;
   DWORD   dwLen;
   void    *pMem;

   switch( wType )
   {
      case CF_TEXT:
         hMem = GetClipboardData( CF_TEXT );
         if( hMem )
         {
            hb_retc( ( char * ) GlobalLock( hMem ) );
            GlobalUnlock( hMem );
         }
         else
            hb_retc( NULL );
         break;

      case CF_BITMAP:
         if( IsClipboardFormatAvailable( CF_BITMAP ) )
            hb_retl( SetClipboardData( CF_BITMAP, DuplicateBitmap( ( HBITMAP ) HB_PARWH( 2 ) ) ) != NULL );
         else
            hb_retl( FALSE );
         break;

      default:
         dwLen = ( DWORD ) hb_parclen( 2 );
         hMem  = GlobalAlloc( ( GMEM_MOVEABLE | GMEM_DDESHARE) , dwLen );
         if ( hMem )
         {
            pMem = GlobalLock( hMem );
            memcpy( pMem, hb_parcx( 2 ), dwLen );
            GlobalUnlock( hMem );
            HB_RETWH( SetClipboardData( ( UINT ) hb_parni( 1 ), hMem ) );
         }
         else
         {
            HB_RETWH( 0 );
         }
         break;
   }
}
whtclpb.c256
HBITMAPDuplicateBitmap( HBITMAP hbmpSrc )
HBITMAP DuplicateBitmap( HBITMAP hbmpSrc )
{
   HBITMAP hbmpOldSrc, hbmpOldDest, hbmpNew;
   HDC     hdcSrc, hdcDest;
   BITMAP  bmp;

   hdcSrc  = CreateCompatibleDC( NULL );
   hdcDest = CreateCompatibleDC( hdcSrc );

   GetObject( hbmpSrc, sizeof( BITMAP ), &bmp );

   hbmpOldSrc = ( HBITMAP ) SelectObject( hdcSrc, hbmpSrc );

   hbmpNew = CreateCompatibleBitmap( hdcSrc, bmp.bmWidth, bmp.bmHeight );

   hbmpOldDest = ( HBITMAP ) SelectObject( hdcDest, hbmpNew );

   BitBlt( hdcDest, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcSrc, 0, 0, SRCCOPY);

   SelectObject( hdcDest, hbmpOldDest );
   SelectObject( hdcSrc, hbmpOldSrc );

   DeleteDC( hdcDest );
   DeleteDC( hdcSrc );

   return hbmpNew;
}
whtclpb.c303
whtcomm.c
TypeFunctionSourceLine
HB_FUNCVWN_INITCOMMONCONTROLS(void)
HB_FUNC( VWN_INITCOMMONCONTROLS )
{
  InitCommonControls();
}
whtcomm.c34
HB_FUNCVWN_INITCOMMONCONTROLSEX(void)
HB_FUNC( VWN_INITCOMMONCONTROLSEX )
{
  INITCOMMONCONTROLSEX icc ;
  icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
  icc.dwICC = hb_parnl( 1 );

  hb_retl( InitCommonControlsEx( &icc ) );
}
whtcomm.c45
HB_FUNCVWN_CREATESTATUSWINDOW(void)
HB_FUNC( VWN_CREATESTATUSWINDOW )
{
  HB_RETWH( CreateStatusWindow (
                                         hb_parnl(1),
                                         (LPCSTR) hb_parcx(2) ,
                                         (HWND) HB_PARWH(3) ,
                                         (UINT) hb_parni(4)
                                       )
                                   );
}
whtcomm.c54
HB_FUNCVWN_DRAWSTATUSTEXT(void)
HB_FUNC( VWN_DRAWSTATUSTEXT )
{
    RECT rc ;

    rc.left   = hb_parnl( 2, 1 );
    rc.top    = hb_parnl( 2, 2 );
    rc.right  = hb_parnl( 2, 3 );
    rc.bottom = hb_parnl( 2, 4 );

    DrawStatusText(
                     (HDC) HB_PARWH(1)  ,
                     (LPRECT) &rc       ,
                     (LPCTSTR) hb_parcx(3),
                     (UINT) hb_parni(4)
                  );

}
whtcomm.c69
HB_FUNCVWN_WRITESTATUSWINDOW(void)
HB_FUNC( VWN_WRITESTATUSWINDOW )
{
   SendMessage( (HWND) HB_PARWH( 1 ), SB_SETTEXT, hb_parni( 2 ), (LPARAM) hb_parcx( 3 ) );
}
whtcomm.c89
HB_FUNCVWN_STATUSBARGETRECT(void)
HB_FUNC( VWN_STATUSBARGETRECT )
{
  RECT rc;
  PHB_ITEM aRect ;
  HWND hWnd = (HWND) HB_PARWH(1);
  SendMessage ( hWnd, SB_GETRECT, hb_parnl(2), (LPARAM) &rc);
  aRect = Rect2Array( &rc  );
  hb_itemReturn( aRect );
  hb_itemRelease( aRect );
}
whtcomm.c95
HB_FUNCVWN_STATUSBARGETPARTS(void)
HB_FUNC( VWN_STATUSBARGETPARTS )
{
  RECT rc;
  PHB_ITEM aParts;
  HWND hWnd = (HWND) HB_PARWH(1);
  SendMessage ( hWnd, SB_GETPARTS, hb_parni(2), (LPARAM) &rc);
  aParts = Rect2Array( &rc  );
  hb_itemReturn( aParts );
  hb_itemRelease( aParts );
}
whtcomm.c107
HB_FUNCVWN_CREATEPROGRESSBAR(void)
HB_FUNC( VWN_CREATEPROGRESSBAR )
{
   HWND hPBar, hParentWindow = (HWND) HB_PARWH(1);
   RECT rcClient;
   LONG ProgressBarStyle;
   BOOL bBorder = ISNIL(7) ? FALSE : hb_parl(7);
   int cyVScroll = ISNIL(6) ? GetSystemMetrics( SM_CYVSCROLL ): hb_parni(6);
   LONG nStyle = ISNIL(8) ? 0 : hb_parnl(8);

   int x1, y1, nwidth, nheight;
   if( hb_pcount() > 2 )
   {
      x1 = hb_parni( 3 );
      y1 = hb_parni( 4 );
      nwidth = hb_parni( 5 );
      nheight = cyVScroll;
   }
   else
   {
      GetClientRect( hParentWindow, &rcClient );
      x1 = rcClient.left;
      y1 = rcClient.bottom - cyVScroll;
      nwidth = rcClient.right;
      nheight = cyVScroll;
   }

   hPBar = CreateWindowEx( 0, PROGRESS_CLASS, (LPSTR) NULL,
              WS_CHILD | WS_VISIBLE | nStyle,    /* style  */
              x1,                       /* x */
              y1,                       /* y */
              nwidth, nheight,          /* nWidth, nHeight */
              hParentWindow,            /* parent window    */
              (HMENU) NULL,
              GetModuleHandle( NULL ), NULL );

   SendMessage( hPBar, PBM_SETRANGE, 0, MAKELPARAM( 0, hb_parni( 2 ) ) );
   SendMessage(hPBar, PBM_SETSTEP, (WPARAM) 1, 0);


  if( bBorder )
    {
    ProgressBarStyle = GetWindowLong(hPBar, GWL_EXSTYLE);
    ProgressBarStyle = ProgressBarStyle - WS_EX_STATICEDGE;
    SetWindowLong(hPBar, GWL_EXSTYLE, ProgressBarStyle);
    }

   HB_RETWH( hPBar );
}
whtcomm.c151
HB_FUNCVWN_UPDATEPROGRESSBAR(void)
HB_FUNC( VWN_UPDATEPROGRESSBAR )
{
   SendMessage( (HWND) HB_PARWH(1), PBM_STEPIT, 0, 0 );
}
whtcomm.c206
HB_FUNCVWN_SETPROGRESSBAR(void)
HB_FUNC( VWN_SETPROGRESSBAR )
{
   SendMessage( (HWND) HB_PARWH(1), PBM_SETPOS, (WPARAM) hb_parnint(2), 0 );
}
whtcomm.c216
HB_FUNCVWN_INITLISTVIEW(void)
HB_FUNC( VWN_INITLISTVIEW )
{
   HWND hwnd;
   HWND hbutton;

   INITCOMMONCONTROLSEX  i;

   i.dwSize = sizeof(INITCOMMONCONTROLSEX);
   i.dwICC = ICC_DATE_CLASSES;
   InitCommonControlsEx(&i);

   hwnd = (HWND) HB_PARWH (1);

   hbutton = CreateWindowEx(WS_EX_CLIENTEDGE,"SysListView32","",
   LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_BORDER | LVS_REPORT,
   hb_parni(3), hb_parni(4), hb_parni(5), hb_parni(6) ,
   hwnd, ( HMENU ) HB_PARWH(2), GetModuleHandle(NULL) , NULL );

   SendMessage(hbutton,LVM_SETEXTENDEDLISTVIEWSTYLE, 0,LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP );

   if ( hb_parni(8) != 0)
   {
      //SendMessage(hbutton,(UINT)WM_SETFONT,(WPARAM) PrepareFont ( hb_parcx(7) , (LPARAM) hb_parnint(8)) , 1 );
   }

   HB_RETWH( hbutton );
}
whtcomm.c261
HB_FUNCVWN_INITLISTVIEWCOLUMNS(void)
HB_FUNC( VWN_INITLISTVIEWCOLUMNS )
{
   PHB_ITEM wArray;
   PHB_ITEM hArray;
   char *caption;
   HWND hc;
   LV_COLUMN COL;
   int l9;
   int s;
   int vi;

   hc = (HWND) HB_PARWH( 1 );

   l9 = hb_parinfa( 2, 0 ) - 1 ;
   hArray = hb_param( 2, HB_IT_ARRAY );
   wArray = hb_param( 3, HB_IT_ARRAY );

   COL.mask=LVCF_FMT | LVCF_WIDTH | LVCF_TEXT |LVCF_SUBITEM;
   COL.fmt=LVCFMT_LEFT;

   for (s = 0 ; s<=l9 ; s=s+1 )
      {
      //...........
      //caption  = hb_itemGetCPtr ( hArray->item.asArray.value->pItems + s );
      //vi = hb_itemGetNI   ( wArray->item.asArray.value->pItems + s );

caption  = hb_itemGetCPtr ( hb_arrayGetItemPtr(hArray,s));
vi = hb_itemGetNI   ( hb_arrayGetItemPtr(wArray, s ));

      COL.cx=vi;
      COL.pszText=caption;
      COL.iSubItem=s;
      ( void ) ListView_InsertColumn(hc,s,&COL);

      }

}
whtcomm.c288
HB_FUNCVWN_ADDLISTVIEWITEMS(void)
HB_FUNC( VWN_ADDLISTVIEWITEMS )
{
// PHB_ITEM hArray;
   char *caption = NULL;
   LV_ITEM LI;
   HWND h;
   int l;
   int s;
   int c;

   h = (HWND) HB_PARWH( 1 );
   l = hb_parinfa( 2, 0 ) - 1 ;
   c = ListView_GetItemCount (h);
// hArray = hb_param( 2, HB_IT_ARRAY );
//   caption  = hb_itemGetCPtr ( hArray->item.asArray.value->pItems );

   LI.mask=LVIF_TEXT ;
   LI.state=0;
   LI.stateMask=0;
        LI.iImage=0;
        LI.iSubItem=0;
   LI.iItem=c;
   LI.pszText=caption;
   ( void ) ListView_InsertItem(h,&LI);

   for (s = 1 ; s<=l ; s=s+1 )
   {
//      caption  = hb_itemGetCPtr ( hArray->item.asArray.value->pItems + s );
      ListView_SetItemText(h,c,s,caption);
   }
}
whtcomm.c326
HB_FUNCVWN_LISTVIEW_SETCURSEL(void)
HB_FUNC( VWN_LISTVIEW_SETCURSEL )
{
   ListView_SetItemState((HWND) HB_PARWH (1), (WPARAM) hb_parnint(2)-1 ,LVIS_FOCUSED | LVIS_SELECTED , LVIS_FOCUSED | LVIS_SELECTED );
}
whtcomm.c358
HB_FUNCVWN_C_SETFOCUS(void)
HB_FUNC( VWN_C_SETFOCUS )
{
   HB_RETWH( SetFocus( (HWND) HB_PARWH( 1 ) ) );
}
whtcomm.c363
HB_FUNCVWN_LISTVIEWDELETESTRING(void)
HB_FUNC( VWN_LISTVIEWDELETESTRING )
{
   SendMessage( (HWND) HB_PARWH( 1 ),LVM_DELETEITEM , (WPARAM) hb_parnint(2)-1, 0);
}
whtcomm.c368
HB_FUNCVWN_LISTVIEWRESET(void)
HB_FUNC( VWN_LISTVIEWRESET )
{
   SendMessage( (HWND) HB_PARWH( 1 ), LVM_DELETEALLITEMS , 0, 0 );
}
whtcomm.c373
HB_FUNCVWN_LISTVIEW_GETFIRSTITEM(void)
HB_FUNC( VWN_LISTVIEW_GETFIRSTITEM )
{
   hb_retni( ListView_GetNextItem( (HWND) HB_PARWH( 1 ), -1, LVNI_ALL | LVNI_SELECTED ) + 1 );
}
whtcomm.c378
whtcret.c
TypeFunctionSourceLine
HB_FUNCVWN_GETCARETBLINKTIME(void)
HB_FUNC( VWN_GETCARETBLINKTIME )
{
   hb_retni( GetCaretBlinkTime() );
}
whtcret.c33
HB_FUNCVWN_SETCARETBLINKTIME(void)
HB_FUNC( VWN_SETCARETBLINKTIME )
{
   hb_retl( SetCaretBlinkTime( (UINT) hb_parni(1) ) );
}
whtcret.c40
HB_FUNCVWN_GETCARETX(void)
HB_FUNC( VWN_GETCARETX )
{
   POINT ptPoint ;
   GetCaretPos( (LPPOINT) &ptPoint );
   hb_retnl( ptPoint.x );
}
whtcret.c47
HB_FUNCVWN_GETCARETY(void)
HB_FUNC( VWN_GETCARETY )
{
   POINT ptPoint ;
   GetCaretPos( (LPPOINT) &ptPoint );
   hb_retnl( ptPoint.y );
}
whtcret.c56
HB_FUNCVWN_GETCARETPOS(void)
HB_FUNC( VWN_GETCARETPOS )
{
   POINT Point ;
   PHB_ITEM aPt;

   if ( GetCaretPos( (LPPOINT) &Point ) )
   {
      aPt = Point2Array(&Point);
      hb_itemReturn( aPt );
      hb_itemRelease( aPt );
   }

}
whtcret.c66
HB_FUNCVWN_SETCARETPOS(void)
HB_FUNC( VWN_SETCARETPOS )
{

   hb_retl( SetCaretPos( hb_parni(1), hb_parni(2) ) );
}
whtcret.c83
HB_FUNCVWN_SHOWCARET(void)
HB_FUNC( VWN_SHOWCARET )
{
   hb_retl( ShowCaret( (HWND) HB_PARWH(1) ) );
}
whtcret.c91
HB_FUNCVWN_HIDECARET(void)
HB_FUNC( VWN_HIDECARET )
{
   hb_retl( HideCaret( (HWND) HB_PARWH(1) ) );
}
whtcret.c99
HB_FUNCVWN_CREATECARET(void)
HB_FUNC( VWN_CREATECARET )
{
   hb_retl( CreateCaret( (HWND) HB_PARWH(1)  ,
                         (HBITMAP) HB_PARWH(2),
                         (int) hb_parni(3) ,
                         (int) hb_parni(4) ) );
}
whtcret.c106
HB_FUNCVWN_DESTROYCARET(void)
HB_FUNC( VWN_DESTROYCARET )
{
  hb_retl( DestroyCaret() );
}
whtcret.c116
whtdate.c
TypeFunctionSourceLine
HB_FUNCVWN_DATETIME_CREATE(void)
HB_FUNC( VWN_DATETIME_CREATE )
{

   HB_RETWH( CreateWindowEx( ISNIL( 1 ) ? 0 : hb_parnl( 1 ) ,
                                    "SysDateTimePick32"   ,   // CLASSNAME
                                    0                     ,   // Window Name   // ????????
                                    (DWORD) hb_parnl( 2 ) ,   // nStyle
                                    hb_parni( 3 )         ,   // x
                                    hb_parni( 4 )         ,   // y
                                    hb_parni( 5 )         ,   // nWidth
                                    hb_parni( 6 )         ,   // nHeight
                                    (HWND) HB_PARWH( 7 )  ,   // hParent
                                    (HMENU) HB_PARWH( 8 ) ,   // hMenu
                                    GetModuleHandle(NULL) ,   // hInstance
                                    ISNIL( 9 ) ? NULL : (void *) HB_PARWH( 9 ) ) );   // lpParam
}
whtdate.c29
HB_FUNCVWN_DATETIME_GETMONTHCAL(void)
HB_FUNC( VWN_DATETIME_GETMONTHCAL )
{
   /* NOTE: '(HWND)' is needed as a workaround for MinGW (4.32),
            where this is missing from the supplied headers. */
   HB_RETWH( (HWND) DateTime_GetMonthCal(
                                            (HWND) HB_PARWH( 1 )  // Handle to a DTP control
                                          ) );
}
whtdate.c57
HB_FUNCVWN_DATETIME_GETMONTHCALCOLOR(void)
HB_FUNC( VWN_DATETIME_GETMONTHCALCOLOR )
{

   hb_retnl( ( long ) DateTime_GetMonthCalColor(
                                            (HWND) HB_PARWH( 1 ),  // Handle to a DTP control
                                                   hb_parni( 2 )   // Value of type int specifying which month calendar color to retrieve.

                                             ) );
}
whtdate.c76
HB_FUNCVWN_DATETIME_GETMONTHCALFONT(void)
HB_FUNC( VWN_DATETIME_GETMONTHCALFONT )
{
   // QUESTION: Doc seems to say this returns a HFONT, but it's not on 64-bit.
   hb_retnl( ( long ) DateTime_GetMonthCalFont(
                                            (HWND) HB_PARWH( 1 )   // Handle to a DTP control
                                             ) );
}
whtdate.c96
HB_FUNCVWN_DATETIME_GETRANGE(void)
HB_FUNC( VWN_DATETIME_GETRANGE )
{
   LPSYSTEMTIME lpSysTimeArray = (SYSTEMTIME *) hb_xgrab( 2 * sizeof(SYSTEMTIME));
   PHB_ITEM aMinMaxDate, aMinDate, aMaxDate;
   DWORD dwRet;

   dwRet = DateTime_GetRange( (HWND) HB_PARWH( 1 ), (SYSTEMTIME *)lpSysTimeArray );

   if( ISBYREF( 2 ) )
      hb_stornl( dwRet, 2 );

   aMinMaxDate = hb_itemArrayNew( 2 );

   aMinDate = hb_itemArrayNew( 8 );
   hb_arraySetNL( aMinDate, 1, lpSysTimeArray[0].wYear );
   hb_arraySetNL( aMinDate, 2, lpSysTimeArray[0].wMonth );
   hb_arraySetNL( aMinDate, 3, lpSysTimeArray[0].wDayOfWeek );
   hb_arraySetNL( aMinDate, 4, lpSysTimeArray[0].wDay );
   hb_arraySetNL( aMinDate, 5, lpSysTimeArray[0].wHour );
   hb_arraySetNL( aMinDate, 6, lpSysTimeArray[0].wMinute );
   hb_arraySetNL( aMinDate, 7, lpSysTimeArray[0].wSecond );
   hb_arraySetNL( aMinDate, 8, lpSysTimeArray[0].wMilliseconds );

   hb_arraySet( aMinMaxDate, 1, aMinDate );


   aMaxDate = hb_itemArrayNew( 8 );
   hb_arraySetNL( aMaxDate, 1, lpSysTimeArray[1].wYear );
   hb_arraySetNL( aMaxDate, 2, lpSysTimeArray[1].wMonth );
   hb_arraySetNL( aMaxDate, 3, lpSysTimeArray[1].wDayOfWeek );
   hb_arraySetNL( aMaxDate, 4, lpSysTimeArray[1].wDay );
   hb_arraySetNL( aMaxDate, 5, lpSysTimeArray[1].wHour );
   hb_arraySetNL( aMaxDate, 6, lpSysTimeArray[1].wMinute );
   hb_arraySetNL( aMaxDate, 7, lpSysTimeArray[1].wSecond );
   hb_arraySetNL( aMaxDate, 8, lpSysTimeArray[1].wMilliseconds );

   hb_arraySet( aMinMaxDate, 2, aMaxDate );

   hb_itemReturnRelease( aMinMaxDate );
   hb_itemRelease( aMinDate );
   hb_itemRelease( aMaxDate );

   hb_xfree(lpSysTimeArray);
}
whtdate.c116
HB_FUNCVWN_DATETIME_GETSYSTEMTIME(void)
HB_FUNC( VWN_DATETIME_GETSYSTEMTIME )
{
   SYSTEMTIME SysTime;
   long nRet;

   nRet = DateTime_GetSystemtime(
                      (HWND) HB_PARWH( 1 ),   // Handle to a DTP control
                      &SysTime              // Pointer to a SYSTEMTIME structure. If DTM_GETSYSTEMTIME returns
                                              // GDT_VALID, this structure will contain the system time.
                                              // Otherwise, it will not contain valid information.
                                              // This parameter must be a valid pointer; it cannot be NULL.
                                );

   if (nRet == GDT_VALID)  // Time is valid
   {
      PHB_ITEM aSysTime = hb_itemArrayNew( 8 );

      hb_arraySetNL( aSysTime, 1, SysTime.wYear );
      hb_arraySetNL( aSysTime, 2, SysTime.wMonth );
      hb_arraySetNL( aSysTime, 3, SysTime.wDayOfWeek );
      hb_arraySetNL( aSysTime, 4, SysTime.wDay );
      hb_arraySetNL( aSysTime, 5, SysTime.wHour );
      hb_arraySetNL( aSysTime, 6, SysTime.wMinute );
      hb_arraySetNL( aSysTime, 7, SysTime.wSecond );
      hb_arraySetNL( aSysTime, 8, SysTime.wMilliseconds );

      hb_itemReturnRelease( aSysTime );
   }
}
whtdate.c174
HB_FUNCVWN_DATETIME_SETFORMAT(void)
HB_FUNC( VWN_DATETIME_SETFORMAT )
{
   hb_retl( DateTime_SetFormat(
                      (HWND) HB_PARWH( 1 ),   // Handle to a DTP control
                   (LPCTSTR) hb_parcx( 2 )     // Pointer to a zero-terminated format string that defines
                                              // the desired display. Setting this parameter to NULL will
                                              // reset the control to the default format string for the current style.
                          )  );
}
whtdate.c217
HB_FUNCVWN_DATETIME_SETMONTHCALCOLOR(void)
HB_FUNC( VWN_DATETIME_SETMONTHCALCOLOR )
{
   hb_retnl( ( long ) DateTime_SetMonthCalColor(
                      (HWND) HB_PARWH( 1 ),   // Handle to a DTP control
                             hb_parni( 2 ),   // Value of type int specifying which month calendar color to set.
                  (COLORREF) hb_parnl( 3 )    // COLORREF value that represents the color that will be set for the specified area of the month calendar.
                                    )  );
}
whtdate.c240
HB_FUNCVWN_DATETIME_SETMONTHCALFONT(void)
HB_FUNC( VWN_DATETIME_SETMONTHCALFONT )
{

   DateTime_SetMonthCalFont(
                      (HWND) HB_PARWH( 1 ),   // Handle to a DTP control
                     (HFONT) HB_PARWH( 2 ),   // Handle to the font that will be set.
                      (BOOL) hb_parl( 3 )     // Specifies whether the control should be redrawn
                                              // immediately upon setting the font. Setting this
                                              // parameter to TRUE causes the control to redraw itself.
                           );

}
whtdate.c261
HB_FUNCVWN_DATETIME_SETSYSTEMTIME(void)
HB_FUNC( VWN_DATETIME_SETSYSTEMTIME )
{
   SYSTEMTIME SysTime, *lpSysTime ;

   if ( ISARRAY( 3 ) ) // array
   {
      SysTime.wYear         = (WORD)  hb_parni( 3, 1 );
      SysTime.wMonth        = (WORD)  hb_parni( 3, 2 );
      SysTime.wDayOfWeek    = (WORD)  hb_parni( 3, 3 );
      SysTime.wDay          = (WORD)  hb_parni( 3, 4 );
      SysTime.wHour         = (WORD)  hb_parni( 3, 5 );
      SysTime.wMinute       = (WORD)  hb_parni( 3, 6 );
      SysTime.wSecond       = (WORD)  hb_parni( 3, 7 );
      SysTime.wMilliseconds = (WORD)  hb_parni( 3, 8 );
      lpSysTime = &SysTime;
   }
   else
   {
     if ( ISCHAR(2) )  // xHarbour structure
     {
        lpSysTime =( SYSTEMTIME *) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING)->item.asString.value;
     }
     else
     {
      hb_retl(0);
      return;
     }
   }

   hb_retl( DateTime_SetSystemtime(
                      (HWND) HB_PARWH( 1 ) ,   // Handle to a DTP control
                      (DWORD) hb_parnl( 2 ),   // Value that specifies the action that should be performed.
                      lpSysTime                // Pointer to SYSTEMTIME structures
                               ) );
}
whtdate.c288
whtdc.c
TypeFunctionSourceLine
HB_FUNCVWN_GETDC(void)
HB_FUNC( VWN_GETDC )
{
   HB_RETWH( GetDC( (HWND) HB_PARWH(1) ) );
}
whtdc.c32
HB_FUNCVWN_RESTOREDC(void)
HB_FUNC( VWN_RESTOREDC )
{
   hb_retl( RestoreDC( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtdc.c41
HB_FUNCVWN_SAVEDC(void)
HB_FUNC( VWN_SAVEDC )
{
   hb_retni( SaveDC( (HDC) HB_PARWH( 1 ) ) );
}
whtdc.c50
HB_FUNCVWN_GETDCEX(void)
HB_FUNC( VWN_GETDCEX )
{
   HB_RETWH( GetDCEx( (HWND) HB_PARWH( 1 ) ,
                             (HRGN) HB_PARWH( 2 ) ,
                             (DWORD) hb_parnl( 3 )
                           ) );
}
whtdc.c58
HB_FUNCVWN_RELEASEDC(void)
HB_FUNC( VWN_RELEASEDC )
{
   hb_retni( ReleaseDC( (HWND) HB_PARWH(1), (HDC) HB_PARWH(2) ) );
}
whtdc.c68
HB_FUNCVWN_DELETEDC(void)
HB_FUNC( VWN_DELETEDC )
{
   hb_retl( DeleteDC( (HDC) HB_PARWH( 1 ) ) );
}
whtdc.c76
HB_FUNCVWN_CANCELDC(void)
HB_FUNC( VWN_CANCELDC )
{
   hb_retl( CancelDC( (HDC) HB_PARWH( 1 ) ) );
}
whtdc.c84
HB_FUNCVWN_CREATECOMPATIBLEDC(void)
HB_FUNC( VWN_CREATECOMPATIBLEDC )
{
   HB_RETWH( CreateCompatibleDC( (HDC) HB_PARWH( 1 ) ) );
}
whtdc.c92
HB_FUNCVWN_WINDOWFROMDC(void)
HB_FUNC( VWN_WINDOWFROMDC )
{
   HB_RETWH( WindowFromDC( (HDC) HB_PARWH( 1 ) ) );
}
whtdc.c100
HB_FUNCVWN_GETWINDOWDC(void)
HB_FUNC( VWN_GETWINDOWDC )
{
   HB_RETWH( GetWindowDC( (HWND) HB_PARWH( 1 ) ) );
}
whtdc.c110
HB_FUNCVWN_CREATEDC(void)
HB_FUNC( VWN_CREATEDC )
{
   DEVMODE *lpInitData = NULL;

   if ( ! ISNIL( 4 ) )
        lpInitData = (DEVMODE *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING)->item.asString.value ;

   HB_RETWH( CreateDC((LPCTSTR) hb_parcx( 1 )  ,       // pointer to string specifying driver name
                              (LPCTSTR) hb_parcx( 2 )  ,       // pointer to string specifying device name
                              NULL                    ,       // do not use; set to NULL
                              ISNIL( 4 ) ? NULL : lpInitData // pointer to optional printer data
                             )
           );
}
whtdc.c121
HB_FUNCVWN_RESETDC(void)
HB_FUNC( VWN_RESETDC )
{

   DEVMODE *lpInitData = NULL;

   if ( ! ISNIL( 2 ) )
        lpInitData = (DEVMODE *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING)->item.asString.value ;

   HB_RETWH( ResetDCA( (HDC) HB_PARWH( 1 ),
                               ISNIL( 2 )? NULL : lpInitData ) );

}
whtdc.c141
HB_FUNCVWN_GETDCORGEX(void)
HB_FUNC( VWN_GETDCORGEX )
{
   POINT Point ;
   PHB_ITEM aPt;

   if ( GetDCOrgEx( (HDC) HB_PARWH( 1 ), &Point ) )
   {
     aPt = Point2Array(&Point);
     hb_itemReturn( aPt );
     hb_itemRelease( aPt );
   }

}
whtdc.c162
HB_FUNCVWN_SCROLLDC(void)
HB_FUNC( VWN_SCROLLDC )
{
   RECT   lprcScroll ;
   RECT   lprcClip   ;
   RECT lprcUpdate ;
   PHB_ITEM pArray=hb_param(7,HB_IT_ARRAY);

   if( Array2Rect(hb_param( 4, HB_IT_ARRAY ) , &lprcScroll )  && Array2Rect(hb_param( 5, HB_IT_ARRAY ) , &lprcClip ) )
   {
      if( ScrollDC( (HDC) HB_PARWH( 1 ) ,
                      hb_parni( 2 )       ,
                      hb_parni( 3 )       ,
                      &lprcScroll         ,
                      &lprcClip           ,
                      (HRGN) HB_PARWH( 6 ),
                      &lprcUpdate
                    ) )
        {
         Rect2ArrayEx( &lprcUpdate,pArray);
         hb_retl(TRUE);
        }
   else
      hb_retl(FALSE);
   }
   else
      hb_retl(FALSE);
}
whtdc.c188
whtdir.c
TypeFunctionSourceLine
HB_FUNCVWN_GETLOGICALDRIVES(void)
HB_FUNC( VWN_GETLOGICALDRIVES )
{
   hb_retnl( (LONG) GetLogicalDrives(  ) );
}
whtdir.c22
HB_FUNCVWN_GETDRIVETYPE(void)
HB_FUNC( VWN_GETDRIVETYPE )
{
   hb_retni( GetDriveType( (LPCSTR) hb_parcx( 1 ) ) );
}
whtdir.c32
HB_FUNCVWN_GETSYSTEMDIRECTORY(void)
HB_FUNC( VWN_GETSYSTEMDIRECTORY )
{

   char szBuffer[ MAX_PATH + 1 ] = {0} ;
   GetSystemDirectory( szBuffer,MAX_PATH);
   hb_retc(szBuffer);

}
whtdir.c44
HB_FUNCVWN_GETTEMPPATH(void)
HB_FUNC( VWN_GETTEMPPATH )
{
   char szBuffer[ MAX_PATH + 1 ] = {0} ;
   GetTempPath(MAX_PATH, szBuffer);
   hb_retc(szBuffer);

}
whtdir.c60
HB_FUNCVWN_GETTEMPFILENAME(void)
HB_FUNC( VWN_GETTEMPFILENAME )
{
   char cPath[ MAX_PATH ] = {0};

   GetTempFileName( (LPCSTR) hb_parcx( 1 ),
                            (LPCSTR) hb_parcx( 2 ),
                            (UINT) ( ISNIL(3) ? 0 : hb_parni( 3 ) ) ,
                            (LPSTR) cPath
                           );
   hb_retc( cPath);
}
whtdir.c77
HB_FUNCVWN_GETWINDOWSDIRECTORY(void)
HB_FUNC( VWN_GETWINDOWSDIRECTORY )
{
   char szBuffer[ MAX_PATH + 1 ] = {0} ;
   GetWindowsDirectory( szBuffer,MAX_PATH);
   hb_retc(szBuffer);
}
whtdir.c93
HB_FUNCVWN_SETCURRENTDIRECTORY(void)
HB_FUNC( VWN_SETCURRENTDIRECTORY )
{

   hb_retl( SetCurrentDirectory( (LPCSTR) hb_parcx( 1 ) ) );
}
whtdir.c122
HB_FUNCVWN_GETCURRENTDIRECTORY(void)
HB_FUNC( VWN_GETCURRENTDIRECTORY )
{
   char cPath[ MAX_PATH + 1 ] = {0};
   GetCurrentDirectory( MAX_PATH , (LPSTR) cPath );
   hb_retc( cPath );
}
whtdir.c132
HB_FUNCVWN_SETFILEATTRIBUTES(void)
HB_FUNC( VWN_SETFILEATTRIBUTES )
{
   hb_retl( SetFileAttributes( (LPCSTR) hb_parcx( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtdir.c143
HB_FUNCVWN_GETFILEATTRIBUTES(void)
HB_FUNC( VWN_GETFILEATTRIBUTES )
{
   hb_retnl( (LONG) GetFileAttributes( (LPCSTR) hb_parcx( 1 ) ) );
}
whtdir.c152
HB_FUNCVWN_DELETEFILE(void)
HB_FUNC( VWN_DELETEFILE )
{
   hb_retl( DeleteFile( (LPCSTR) hb_parcx( 1 ) ) );
}
whtdir.c161
HB_FUNCVWN_SETVOLUMELABEL(void)
HB_FUNC( VWN_SETVOLUMELABEL )
{
   hb_retl( SetVolumeLabel( (LPCSTR) hb_parcx( 1 ), (LPCSTR) hb_parcx( 2 ) ) );
}
whtdir.c170
HB_FUNCVWN_CREATEDIRECTORY(void)
HB_FUNC( VWN_CREATEDIRECTORY )
{
   SECURITY_ATTRIBUTES *sa = NULL;

   if (ISCHAR(2))
       sa = (SECURITY_ATTRIBUTES *) hb_parc( 2 ); //hb_param(2, HB_IT_STRING)->item.asString.value;

   hb_retl( CreateDirectoryA( (LPCSTR) hb_parcx( 1 ), sa ) );
}
whtdir.c180
HB_FUNCVWN_REMOVEDIRECTORY(void)
HB_FUNC( VWN_REMOVEDIRECTORY )
{
   hb_retl( RemoveDirectory( (LPCSTR) hb_parcx( 1 ) ) );
}
whtdir.c214
HB_FUNCVWN_GETFULLPATHNAME(void)
HB_FUNC( VWN_GETFULLPATHNAME )
{
   char *szBuffRet = NULL ;
   char buffer[ MAX_PATH + 1 ] = {0};
   char *szIn =hb_parcx( 1 );
   //DWORD dwSize  = hb_parnl( 2 );
   DWORD dwReq;
   dwReq = GetFullPathName( (LPCSTR) szIn,
                            MAX_PATH ,
                            (LPSTR) buffer ,
                            &szBuffRet
                          )  ;
  hb_retnl( dwReq );
  hb_storc( szBuffRet , 4 );
  hb_storc( buffer ,3 );
}
whtdir.c228
HB_FUNCVWN_GETVOLUMEPATHNAME(void)
HB_FUNC( VWN_GETVOLUMEPATHNAME )
{
   typedef BOOL ( WINAPI * P_GVPN )( LPCTSTR, LPTSTR, DWORD );
   BOOL bResult = FALSE;
   char buffer[MAX_PATH+1] = {0};
   P_GVPN pGVPN ;
   pGVPN = ( P_GVPN ) GetProcAddress( GetModuleHandle( "kernel32.dll" ), "GetVolumePathNameA" );
   if( pGVPN )
   {
      bResult = pGVPN( (LPCSTR) hb_parcx( 1 ), buffer, MAX_PATH );
   }
   hb_retl( bResult );
   if ( ISBYREF( 2 ) )
   {
      hb_storc( buffer ,2 );
   }
}
whtdir.c256
HB_FUNCVWN_GETSHORTPATHNAME(void)
HB_FUNC( VWN_GETSHORTPATHNAME )
{
   char buffer[ MAX_PATH + 1 ] = {0};
   int iRet;

   iRet = GetShortPathName(hb_parcx(1),buffer,MAX_PATH);
   hb_storc(buffer , 2 );
   hb_stornl(iRet , 3 );

}
whtdir.c280
HB_FUNCVWN_GETLONGPATHNAME(void)
HB_FUNC( VWN_GETLONGPATHNAME )
{
   hb_retnl( (LONG) GetLongPathName( (LPCSTR) hb_parcx( 1 ),
                                      (LPSTR) hb_parcx( 2 ) ,
                                      (DWORD) hb_parnl( 3 )
                                      ) );
}
whtdir.c294
HB_FUNCVWN_GETVOLUMEINFORMATION(void)
HB_FUNC( VWN_GETVOLUMEINFORMATION )
{
  char *VolumeNameBuffer     = (char *) hb_xgrab( MAX_PATH );
  DWORD VolumeSerialNumber                              ;
  DWORD MaximumComponentLength                          ;
  DWORD FileSystemFlags                                 ;
  char *FileSystemNameBuffer = (char *) hb_xgrab( MAX_PATH )  ;
  BOOL bRet;

  bRet = GetVolumeInformation( ISNIL(1) ? NULL : (LPCTSTR) hb_parcx(1) ,
                                  (LPTSTR) VolumeNameBuffer              ,
                                  MAX_PATH                               ,
                                  &VolumeSerialNumber                    ,
                                  &MaximumComponentLength                ,
                                  &FileSystemFlags                       ,
                                  (LPTSTR)FileSystemNameBuffer           ,
                                  MAX_PATH );
  if ( bRet  )
  {
     if ( ISBYREF( 2 ) )  hb_storc ((char *) VolumeNameBuffer, 2 );
     if ( ISBYREF( 3 ) )  hb_stornl( (LONG)  VolumeSerialNumber, 3 );
     if ( ISBYREF( 4 ) )  hb_stornl( (LONG)  MaximumComponentLength, 4 );
     if ( ISBYREF( 5 ) )  hb_stornl( (LONG)  FileSystemFlags, 5 );
     if ( ISBYREF( 6 ) )  hb_storc ((char *) FileSystemNameBuffer, 6 );
  }

  hb_retl(bRet);
  hb_xfree( VolumeNameBuffer );
  hb_xfree( FileSystemNameBuffer );
}
whtdir.c323
whtdlg.c
TypeFunctionSourceLine
HB_FUNCVWN_ENDDIALOG(void)
HB_FUNC( VWN_ENDDIALOG )
{
  EndDialog( (HWND) HB_PARWH(1) , hb_parni(2) );
}
whtdlg.c35
HB_FUNCVWN_GETDLGITEM(void)
HB_FUNC( VWN_GETDLGITEM )
{
   HWND hWnd = GetDlgItem(
                 (HWND) HB_PARWH( 1 ), // handle of dialog box
                 hb_parni( 2 )           // identifier of control
               );
   HB_RETWH( hWnd );
}
whtdlg.c42
HB_FUNCVWN_GETNEXTDLGGROUPITEM(void)
HB_FUNC( VWN_GETNEXTDLGGROUPITEM )
{
   HB_RETWH( GetNextDlgGroupItem( (HWND) HB_PARWH( 1 ),
                                         (HWND) HB_PARWH( 2 ),
                                         hb_parl( 3 )
                                       ) );
}
whtdlg.c56
HB_FUNCVWN_GETNEXTDLGTABITEM(void)
HB_FUNC( VWN_GETNEXTDLGTABITEM )
{
   HB_RETWH( GetNextDlgTabItem( (HWND) HB_PARWH( 1 ),
                                       (HWND) HB_PARWH( 2 ),
                                       hb_parl( 3 )
                                     ) );
}
whtdlg.c68
HB_FUNCVWN_GETDLGCTRLID(void)
HB_FUNC( VWN_GETDLGCTRLID )
{
   hb_retni( GetDlgCtrlID( (HWND) HB_PARWH( 1 ) ) );
}
whtdlg.c80
HB_FUNCVWN_GETDIALOGBASEUNITS(void)
HB_FUNC( VWN_GETDIALOGBASEUNITS )
{
   hb_retnl( (LONG) GetDialogBaseUnits(  ) );
}
whtdlg.c89
HB_FUNCVWN_SETDLGITEMINT(void)
HB_FUNC( VWN_SETDLGITEMINT )
{
   hb_retl( SetDlgItemInt( (HWND) HB_PARWH( 1 ),
                           hb_parni( 2 )       ,
                           (UINT) hb_parni( 3 ),
                           hb_parl( 4 )
                         ) );
}
whtdlg.c99
HB_FUNCVWN_SETDLGITEMTEXT(void)
HB_FUNC( VWN_SETDLGITEMTEXT )
{
    SetDlgItemText(
       (HWND) HB_PARWH( 1 ),  // handle of dialog box
       hb_parni( 2 ),           // identifier of control
       (LPCTSTR) hb_parcx( 3 )    // text to set
    );
}
whtdlg.c111
HB_FUNCVWN_GETDLGITEMTEXT(void)
HB_FUNC( VWN_GETDLGITEMTEXT )  // GETDLGITMTEXT
{
   USHORT iLen = ( USHORT ) SendMessage( GetDlgItem( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ), WM_GETTEXTLENGTH, 0, 0 )+1 ;
   char *cText = (char*) hb_xgrab( iLen );

   GetDlgItemText(
                  (HWND) HB_PARWH( 1 ),   // handle of dialog box
                  hb_parni( 2 ),             // identifier of control
                  (LPTSTR) cText,         // address of buffer for text
                  iLen                    // maximum size of string
                 );

   hb_retc( cText );
   hb_xfree( cText );
}
whtdlg.c124
HB_FUNCVWN_GETLBITEMTEXT(void)
HB_FUNC( VWN_GETLBITEMTEXT )  // GETDLGITMTEXT
{
   USHORT iLen = ISNIL(3) ? 255 : ( USHORT ) hb_parni( 3 );
   char * cText = ( char * ) hb_xgrab( iLen + 1 );

   SendMessage(
                  (HWND) HB_PARWH( 1 ),    // handle of dialog box
                  LB_GETTEXT,
                  (WPARAM) hb_parnint( 2 ), // item number
                  (LPARAM) (LPCSTR) cText           // address of buffer for text
              );

   hb_retc( cText );
   hb_xfree( cText );
}
whtdlg.c145
HB_FUNCVWN_CHECKDLGBUTTON(void)
HB_FUNC( VWN_CHECKDLGBUTTON )
{
    hb_retl( CheckDlgButton(
                             (HWND) HB_PARWH( 1 ), // handle of dialog box
                             hb_parni( 2 ),          // identifier of control
                             ISNUM(3) ? ( UINT ) hb_parni(3) : (UINT) hb_parl(3) ) );
}
whtdlg.c164
HB_FUNCVWN_CHECKRADIOBUTTON(void)
HB_FUNC( VWN_CHECKRADIOBUTTON )
{
    hb_retl( CheckRadioButton(
                              (HWND) HB_PARWH( 1 ),   // handle of dialog box
                              hb_parni( 2 ),         // identifier of first radio button in group
                              hb_parni( 3 ),         // identifier of last radio button in group
                              hb_parni( 4 )          // identifier of radio button to select
                             ) );
}
whtdlg.c174
HB_FUNCVWN_ISDLGBUTTONCHECKED(void)
HB_FUNC( VWN_ISDLGBUTTONCHECKED )
{
  hb_retni( IsDlgButtonChecked(
                               (HWND) HB_PARWH( 1 ),       // handle of dialog box
                               hb_parni( 2 )               // button identifier
                               ) );


}
whtdlg.c186
HB_FUNCVWN_DLGDIRLIST(void)
HB_FUNC( VWN_DLGDIRLIST )
{

   char *cText = (char*) hb_xgrab( MAX_PATH+1 );
  // cText = hb_parcx(2);

   hb_retni( DlgDirList( (HWND) HB_PARWH( 1 ),
                         (LPSTR) cText       ,
                         hb_parni( 3 )       ,
                         hb_parni( 4 )       ,
                         (UINT) hb_parni( 5 )
                       ) );

   hb_storc(cText,2);
   hb_xfree(cText);

}
whtdlg.c201
HB_FUNCVWN_DLGDIRSELECTEX(void)
HB_FUNC( VWN_DLGDIRSELECTEX )
{

   USHORT iLen = ISNIL(3) ? MAX_PATH : ( USHORT ) hb_parni( 3 );
   char *cText = (char*) hb_xgrab( iLen+1 );

   hb_retl( DlgDirSelectEx( (HWND) HB_PARWH( 1 ),
                            (LPSTR) cText       ,
                            iLen                ,
                            hb_parni( 4 )
                          ) );

   hb_storc(cText, 2 );
   hb_xfree(cText);
}
whtdlg.c224
HB_FUNCVWN_DLGDIRLISTCOMBOBOX(void)
HB_FUNC( VWN_DLGDIRLISTCOMBOBOX )
{
   char *cText = (char*) hb_xgrab( MAX_PATH+1 );
   //cText = hb_parcx(2);

   hb_retni( DlgDirListComboBox( (HWND) HB_PARWH( 1 ),
                                 (LPSTR) cText       ,
                                 hb_parni( 3 )       ,
                                 hb_parni( 4 )       ,
                                 (UINT) hb_parni( 5 )
                               ) );
   hb_storc(cText, 2 );
   hb_xfree(cText);

}
whtdlg.c244
HB_FUNCVWN_DLGDIRSELECTCOMBOBOXEX(void)
HB_FUNC( VWN_DLGDIRSELECTCOMBOBOXEX )
{

   USHORT iLen = ISNIL(3) ? MAX_PATH : ( USHORT ) hb_parni( 3 );
   char *cText = (char*) hb_xgrab( iLen+1 );

   hb_retl( DlgDirSelectComboBoxEx( (HWND) HB_PARWH( 1 ),
                                    (LPSTR) cText       ,
                                    iLen                ,
                                    hb_parni( 4 )
                                  ) );

   hb_storc(cText, 2 );
   hb_xfree(cText);

}
whtdlg.c264
HB_FUNCVWN_MAPDIALOGRECT(void)
HB_FUNC( VWN_MAPDIALOGRECT )
{
   RECT lpRect ;
   PHB_ITEM pArray;
   if (ISARRAY(2) )
      {
      pArray=hb_param( 2, HB_IT_ARRAY );
      lpRect.left   = hb_arrayGetNL( pArray , 1 );
      lpRect.top    = hb_arrayGetNL( pArray , 2 );
      lpRect.right  = hb_arrayGetNL( pArray , 3 );
      lpRect.bottom = hb_arrayGetNL( pArray , 4 );

      hb_retl( MapDialogRect( (HWND) HB_PARWH( 1 ), &lpRect ) );
      hb_stornl( lpRect.left   , 2 , 1 );
      hb_stornl( lpRect.top    , 2 , 2 );
      hb_stornl( lpRect.right  , 2 , 3 );
      hb_stornl( lpRect.bottom , 2 , 4 );
   }
   else
      hb_retl(FALSE);


}



//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI GetComboBoxInfo( IN HWND hwndCombo, OUT PCOMBOBOXINFO pcbi );

/*

HB_FUNC( VWN_GETCOMBOBOXINFO )
{
   PCOMBOBOXINFO pcbi      ;

   hb_retl( GetComboBoxInfo( (HWND) HB_PARWH( 1 ), pcbi ) );
}

*/

//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI GetAltTabInfoA( IN HWND hwnd, IN int iItem, OUT PALTTABINFO pati, OUT LPSTR pszItemText, IN UINT cchItemText );

whtdlg.c290
HB_FUNCVWN_GETLISTBOXINFO(void)
HB_FUNC( VWN_GETLISTBOXINFO )
{
HINSTANCE h    = LoadLibraryEx( "user32.dll", NULL, 0);
DWORD dwGLIRet = 0 ;
HWND  hWnd     = (HWND) HB_PARWH( 1 );

if( h ){
    typedef DWORD (WINAPI *xdwGetListBoxInfo)( HWND hWnd );
    xdwGetListBoxInfo pfnGLI = (xdwGetListBoxInfo)
    GetProcAddress( h, "GetListBoxInfo");
    if( pfnGLI ){
        dwGLIRet = (DWORD) pfnGLI( hWnd );
    }
    FreeLibrary( h );
}

   hb_retl( (ULONG) dwGLIRet );
}
whtdlg.c361
whtdraw.c
TypeFunctionSourceLine
HB_FUNCVWN_MOVETO(void)
HB_FUNC( VWN_MOVETO )
{

   hb_retl( MoveToEx(
                    (HDC) HB_PARWH(1),   // device context handle
                    hb_parni(2)      ,   // x-coordinate of line's ending point
                    hb_parni(3)      ,   // y-coordinate of line's ending point
                    NULL
                 ) );
}
whtdraw.c27
HB_FUNCVWN_MOVETOEX(void)
HB_FUNC( VWN_MOVETOEX )
{

   POINT Point ;
   PHB_ITEM aPt;


   if ( MoveToEx(
                    (HDC) HB_PARWH(1),   // device context handle
                    hb_parni(2)      ,   // x-coordinate of line's ending point
                    hb_parni(3)      ,   // y-coordinate of line's ending point
                    &Point
                  ) )

     {

     aPt = Point2Array(&Point);
     hb_itemReturn( aPt );
     hb_itemRelease( aPt );

     }

}
whtdraw.c44
HB_FUNCVWN_GETCURRENTPOSITIONEX(void)
HB_FUNC( VWN_GETCURRENTPOSITIONEX )
{
   POINT pt ;
   PHB_ITEM aPt;

   if ( GetCurrentPositionEx( (HDC) HB_PARWH( 1 ), &pt ) )
   {
       aPt = Point2Array( &pt);
       hb_itemReturn( aPt );
       hb_itemRelease( aPt );

   }
}
whtdraw.c75
HB_FUNCVWN_GETPIXELFORMAT(void)
HB_FUNC( VWN_GETPIXELFORMAT )
{
   hb_retni( GetPixelFormat( (HDC) HB_PARWH( 1 ) ) );
}
whtdraw.c93
HB_FUNCVWN_SETPIXELFORMAT(void)
HB_FUNC( VWN_SETPIXELFORMAT )
{
   PIXELFORMATDESCRIPTOR *pfd = (PIXELFORMATDESCRIPTOR * ) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value;

   hb_retl( SetPixelFormat( (HDC) HB_PARWH( 1 )   ,
                            hb_parni( 2 )         ,
                            pfd
                            ) );
}
whtdraw.c104
HB_FUNCVWN_DESCRIBEPIXELFORMAT(void)
HB_FUNC( VWN_DESCRIBEPIXELFORMAT )
{
   PIXELFORMATDESCRIPTOR pfd ;
   UINT nBytes = sizeof(pfd);

   hb_retni( DescribePixelFormat( (HDC) HB_PARWH( 1 )    ,
                                  hb_parni( 2 )          ,
                                  nBytes                 ,
                                  &pfd
                                  ) );
    if ( ISBYREF(3) )
       hb_storclen( (char*) &pfd, sizeof(PIXELFORMATDESCRIPTOR), 3 );
    //hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) pfd , sizeof( PIXELFORMATDESCRIPTOR ) );

}
whtdraw.c123
HB_FUNCVWN_SETPIXEL(void)
HB_FUNC( VWN_SETPIXEL )
{

   hb_retnl( (ULONG) SetPixel( (HDC) HB_PARWH( 1 ),
                               hb_parni( 2 )      ,
                               hb_parni( 3 )      ,
                               (COLORREF) hb_parnl( 4 )
                             ) );
}
whtdraw.c144
HB_FUNCVWN_GETPIXEL(void)
HB_FUNC( VWN_GETPIXEL )
{
   hb_retnl( (ULONG) GetPixel( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtdraw.c159
HB_FUNCVWN_SETPIXELV(void)
HB_FUNC( VWN_SETPIXELV )
{

   hb_retl( SetPixelV( (HDC) HB_PARWH( 1 ),
                       hb_parni( 2 )      ,
                       hb_parni( 3 )      ,
                       (COLORREF) hb_parnl( 4 )
                       ) );
}
whtdraw.c168
HB_FUNCVWN_LINETO(void)
HB_FUNC( VWN_LINETO )
{
   hb_retl( LineTo( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtdraw.c189
HB_FUNCVWN_GETARCDIRECTION(void)
HB_FUNC( VWN_GETARCDIRECTION )
{
   hb_retni( GetArcDirection( (HDC) HB_PARWH( 1 ) ) );
}
whtdraw.c226
HB_FUNCVWN_SETARCDIRECTION(void)
HB_FUNC( VWN_SETARCDIRECTION )
{
   hb_retni( SetArcDirection( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtdraw.c238
HB_FUNCVWN_ARC(void)
HB_FUNC( VWN_ARC )
{
   hb_retl( Arc( (HDC) HB_PARWH( 1 ),
                 hb_parni( 2 )      ,
                 hb_parni( 3 )      ,
                 hb_parni( 4 )      ,
                 hb_parni( 5 )      ,
                 hb_parni( 6 )      ,
                 hb_parni( 7 )      ,
                 hb_parni( 8 )      ,
                 hb_parni( 9 )
                 ) );
}
whtdraw.c249
HB_FUNCVWN_POLYLINE(void)
HB_FUNC( VWN_POLYLINE )
{

   POINT * Point ;
   POINT pt ;
   DWORD iCount ;
   UINT i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) )
   {
       iCount = (DWORD) hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c294
HB_FUNCVWN_POLYLINETO(void)
HB_FUNC( VWN_POLYLINETO )
{
   POINT * Point ;
   POINT pt ;
   DWORD iCount ;
   UINT i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) )
   {
       iCount = (DWORD) hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c343
HB_FUNCVWN_POLYPOLYLINE(void)
HB_FUNC( VWN_POLYPOLYLINE )
{
   POINT * Point ;
   DWORD * PolyPoints ;
   DWORD iPolyCount ;
   DWORD iCount ;
   POINT pt ;
   UINT i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) && ISARRAY( 3 ) )
   {
       iPolyCount = hb_parinfa(3,0);
       PolyPoints = (DWORD *) hb_xgrab( iPolyCount * sizeof( DWORD ) );

       for ( i=0 ; i < iPolyCount ; i++ )
       {
          *(PolyPoints+i) = hb_parnl( 3,i+1);
       }

       iCount = hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c392
HB_FUNCVWN_POLYBEZIER(void)
HB_FUNC( VWN_POLYBEZIER )
{

   POINT * Point ;
   POINT pt ;
   DWORD iCount ;
   UINT i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) )
   {
       iCount = (DWORD) hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c521
HB_FUNCVWN_POLYBEZIERTO(void)
HB_FUNC( VWN_POLYBEZIERTO )
{

   POINT * Point ;
   POINT pt ;
   DWORD iCount ;
   UINT i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) )
   {
       iCount = (DWORD) hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c571
HB_FUNCVWN_RECTANGLE(void)
HB_FUNC( VWN_RECTANGLE )
{
   hb_retl( Rectangle( (HDC) HB_PARWH( 1 ),
                       hb_parni( 2 )      ,
                       hb_parni( 3 )      ,
                       hb_parni( 4 )      ,
                       hb_parni( 5 )
                       ) );
}
whtdraw.c628
HB_FUNCVWN_ROUNDRECT(void)
HB_FUNC( VWN_ROUNDRECT )
{
   hb_retl( RoundRect( (HDC) HB_PARWH( 1 ),
                       hb_parni( 2 )      ,
                       hb_parni( 3 )      ,
                       hb_parni( 4 )      ,
                       hb_parni( 5 )      ,
                       hb_parni( 6 )      ,
                       hb_parni( 7 )
                       ) );
}
whtdraw.c643
HB_FUNCVWN_CHORD(void)
HB_FUNC( VWN_CHORD )
{
   hb_retl( Chord( (HDC) HB_PARWH( 1 ),
                   hb_parni( 2 )      ,
                   hb_parni( 3 )      ,
                   hb_parni( 4 )      ,
                   hb_parni( 5 )      ,
                   hb_parni( 6 )      ,
                   hb_parni( 7 )      ,
                   hb_parni( 8 )      ,
                   hb_parni( 9 )
                   ) );
}
whtdraw.c662
HB_FUNCVWN_PIE(void)
HB_FUNC( VWN_PIE )
{
   hb_retl( Pie( (HDC) HB_PARWH( 1 ),
                 hb_parni( 2 )      ,
                 hb_parni( 3 )      ,
                 hb_parni( 4 )      ,
                 hb_parni( 5 )      ,
                 hb_parni( 6 )      ,
                 hb_parni( 7 )      ,
                 hb_parni( 8 )      ,
                 hb_parni( 9 )
                 ) );
}
whtdraw.c681
HB_FUNCVWN_ELLIPSE(void)
HB_FUNC( VWN_ELLIPSE )
{
   hb_retl( Ellipse( (HDC) HB_PARWH( 1 ),
                     hb_parni( 2 )      ,
                     hb_parni( 3 )      ,
                     hb_parni( 4 )      ,
                     hb_parni( 5 )
                     ) );
}
whtdraw.c700
HB_FUNCVWN_POLYGON(void)
HB_FUNC( VWN_POLYGON )
{
   POINT * Point ;
   POINT pt ;
   int iCount ;
   int i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) )
   {
       iCount = (int) hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c720
HB_FUNCVWN_POLYPOLYGON(void)
HB_FUNC( VWN_POLYPOLYGON )
{
   POINT * Point ;
   INT * PolyPoints ;
   int iPolyCount ;
   int iCount ;
   POINT pt ;
   int i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 2 ) && ISARRAY( 3 ) )
   {
       iPolyCount = hb_parinfa(3,0);
       PolyPoints = ( INT *) hb_xgrab( iPolyCount * sizeof( INT ) );

       for ( i=0 ; i < iPolyCount ; i++ )
       {
          *(PolyPoints+i) = hb_parni( 3,i+1);
       }

       iCount = hb_parinfa( 2, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtdraw.c769
HB_FUNCVWN_FILLRECT(void)
HB_FUNC( VWN_FILLRECT )
{
  RECT rc ;

  if ( ISARRAY(2) && Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ))
     hb_retni( FillRect((HDC) HB_PARWH( 1 ), &rc, (HBRUSH) HB_PARWH( 3 ) ) );
  else
     hb_retni(0);

}
whtdraw.c831
HB_FUNCVWN_FRAMERECT(void)
HB_FUNC( VWN_FRAMERECT )
{
   RECT rc ;

   if ( ISARRAY(2) && Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ))
      hb_retni( FrameRect((HDC) HB_PARWH( 1 ), &rc, (HBRUSH) HB_PARWH( 3 ) ) );
   else
      hb_retni(0);
}
whtdraw.c851
HB_FUNCVWN_INVERTRECT(void)
HB_FUNC( VWN_INVERTRECT )
{
   RECT rc ;

   if ( ISARRAY(2) && Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ))
      hb_retni( InvertRect((HDC) HB_PARWH( 1 ), &rc ) );
   else
      hb_retni(0);
}
whtdraw.c868
HB_FUNCVWN_SETPOLYFILLMODE(void)
HB_FUNC( VWN_SETPOLYFILLMODE )
{
   hb_retni( SetPolyFillMode( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtdraw.c888
HB_FUNCVWN_EXTFLOODFILL(void)
HB_FUNC( VWN_EXTFLOODFILL )
{

   hb_retl( ExtFloodFill( (HDC) HB_PARWH( 1 ) ,
                          hb_parni( 2 )       ,
                          hb_parni( 3 )       ,
                          (COLORREF) hb_parnl( 4 ) ,
                          (UINT) hb_parni( 5 )
                          ) );
}
whtdraw.c898
HB_FUNCVWN_FILLPATH(void)
HB_FUNC( VWN_FILLPATH )
{
   hb_retl( FillPath( (HDC) HB_PARWH( 1 ) ) );
}
whtdraw.c914
HB_FUNCVWN_FLATTENPATH(void)
HB_FUNC( VWN_FLATTENPATH )
{
   hb_retl( FlattenPath( (HDC) HB_PARWH( 1 ) ) );
}
whtdraw.c923
HB_FUNCVWN_FLOODFILL(void)
HB_FUNC( VWN_FLOODFILL )
{

   hb_retl( FloodFill( (HDC) HB_PARWH( 1 ),
                       hb_parni( 2 )      ,
                       hb_parni( 3 )      ,
                       (COLORREF) hb_parnl( 4 )
                       ) );
}
whtdraw.c931
HB_FUNCVWN_GETPOLYFILLMODE(void)
HB_FUNC( VWN_GETPOLYFILLMODE )
{
   hb_retni( GetPolyFillMode( (HDC) HB_PARWH( 1 ) ) );
}
whtdraw.c946
whtfont.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATEFONT(void)
HB_FUNC( VWN_CREATEFONT )
{

   if ( ISARRAY(1))
   {
      HB_RETWH( CreateFont( hb_parni( 1, 1 )         ,  // nHeight
                                    hb_parni( 1, 2 )         ,  // nWidth
                                    hb_parni( 1, 3 )         ,  // nEscapement
                                    hb_parni( 1, 4 )         ,  // nOrientation
                                    hb_parni( 1, 5 )         ,  // fnWeight
                                    (DWORD) hb_parnl( 1, 6 ) ,  // fdwItalic
                                    (DWORD) hb_parnl( 1, 7 ) ,  // fdwUnderline
                                    (DWORD) hb_parnl( 1, 8 ) ,  // fdwStrikeOut
                                    (DWORD) hb_parnl( 1, 9 ) ,  // fdwCharSet
                                    (DWORD) hb_parnl( 1, 10 ),  // fdwOutputPrecision
                                    (DWORD) hb_parnl( 1, 11 ),  // fdwClipPrecision
                                    (DWORD) hb_parnl( 1, 12 ),  // fdwQuality
                                    (DWORD) hb_parnl( 1, 13 ),  // fdwPitchAndFamily
                                    (LPCSTR) hb_parcx( 1, 14 )   // lpszFace
                                   ) );

   }
   else
   {
      HB_RETWH( CreateFont( ISNIL(1) ? 0 : hb_parni( 1 )         ,  // nHeight
                                    ISNIL(2) ? 0 : hb_parni( 2 )         ,  // nWidth
                                    ISNIL(3) ? 0 : hb_parni( 3 )         ,  // nEscapement
                                    ISNIL(4) ? 0 : hb_parni( 4 )         ,  // nOrientation
                                    ISNIL(5) ? 0 : hb_parni( 5 )         ,  // fnWeight
                                    (DWORD) hb_parnl( 6 ) ,  // fdwItalic
                                    (DWORD) hb_parnl( 7 ) ,  // fdwUnderline
                                    (DWORD) hb_parnl( 8 ) ,  // fdwStrikeOut
                                    (DWORD) hb_parnl( 9 ) ,  // fdwCharSet
                                    (DWORD) hb_parnl( 10 ),  // fdwOutputPrecision
                                    (DWORD) hb_parnl( 11 ),  // fdwClipPrecision
                                    (DWORD) hb_parnl( 12 ),  // fdwQuality
                                    (DWORD) hb_parnl( 13 ),  // fdwPitchAndFamily
                                    (LPCSTR) hb_parcx( 14 )   // lpszFace
                                   ) );

   }

}
whtfont.c37
HB_FUNCVWN_ADDFONTRESOURCE(void)
HB_FUNC( VWN_ADDFONTRESOURCE )
{
   hb_retni( AddFontResource( (LPCSTR) hb_parcx( 1 ) ) );
}
whtfont.c84
HB_FUNCVWN_CREATEFONTINDIRECT(void)
HB_FUNC( VWN_CREATEFONTINDIRECT )
{
   LOGFONT *lf = (LOGFONT * ) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;

   HB_RETWH( CreateFontIndirect( lf ) );
}
whtfont.c92
HB_FUNCVWN_CREATESCALABLEFONTRESOURCE(void)
HB_FUNC( VWN_CREATESCALABLEFONTRESOURCE )
{
   hb_retl( CreateScalableFontResource( (DWORD) hb_parnl( 1 ),
                                         (LPCSTR) hb_parcx( 2 ),
                                         (LPCSTR) hb_parcx( 3 ),
                                         (LPCSTR) hb_parcx( 4 )
                                         ) );
}
whtfont.c121
HB_FUNCVWN_ENUMFONTFAMILIES(void)
HB_FUNC( VWN_ENUMFONTFAMILIES )
{
   LPARAM        lParam        ;

   if ( ISBLOCK( 3 ) )
   {
     lParam = (LPARAM) (PHB_ITEM ) hb_param( 3, HB_IT_BLOCK );


     hb_retni( EnumFontFamilies( (HDC) HB_PARWH( 1 )  ,
                                (LPCSTR) hb_parcx( 2 ),
                                (FONTENUMPROC) GenericCallblockProc  ,
                                lParam
                                ) );
   }
   else
     OutputDebugString("EnumFontFamilies(): No codeblock");


}
whtfont.c137
HB_FUNCVWN_ENUMFONTFAMILIESEX(void)
HB_FUNC( VWN_ENUMFONTFAMILIESEX )
{
   LOGFONT *LogFont = (LOGFONT * ) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;
   LPARAM  lParam  ;

   if ( ISBLOCK( 3 ) )
   {
     lParam = (LPARAM) (PHB_ITEM ) hb_param( 3, HB_IT_BLOCK );



   hb_retni( EnumFontFamiliesEx( (HDC) HB_PARWH( 1 )  ,
                                  LogFont            ,
                                  (FONTENUMPROC) GenericCallblockProc  ,
                                  lParam               ,
                                  0
                                  ) );

  }
   else
     OutputDebugString("EnumFontFamiliesEx(): No codeblock");

}
whtfont.c166
HB_FUNCVWN_ENUMFONTS(void)
HB_FUNC( VWN_ENUMFONTS )
{
   LPARAM lParam ;

   if ( ISBLOCK( 3 ) )
   {
     lParam = (LPARAM) (PHB_ITEM ) hb_param( 3, HB_IT_BLOCK );

     hb_retni( EnumFonts( (HDC) HB_PARWH( 1 )  ,
                         (LPCSTR) hb_parcx( 2 ),
                         (FONTENUMPROC) GenericCallblockProc  ,
                         lParam
                         ) );
   }
   else
     OutputDebugString("EnumFonts(): No codeblock");

}
whtfont.c200
INT CALLBACKGenericCallblockProc( LONG param1, LONG param2, int wParam, LPARAM lParam )
int CALLBACK GenericCallblockProc( LONG param1, LONG param2, int wParam, LPARAM lParam )
{
   PHB_ITEM pItem ;
   long int res   ;
   static PHB_DYNS s_pEval = NULL;

   if( s_pEval == NULL )
   {
      s_pEval = hb_dynsymFind( "__EVAL" );
   }

   pItem = (PHB_ITEM ) lParam ;

   if ( pItem )
   {
      hb_vmPush(s_pEval);//s_pEval->pSymbol;
      hb_vmPush(pItem);

      hb_vmPushLong( (LONG ) param1 );
      hb_vmPushLong( (LONG ) param2 );
      hb_vmPushLong( (LONG ) wParam );
      hb_vmPushLong( (LONG ) lParam );

      hb_vmSend( 4 );
      res = hb_itemGetNL( (PHB_ITEM) hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
   {
      return( 0 );
   }
}
whtfont.c256
HB_FUNCVWN_GETFONTDATA(void)
HB_FUNC( VWN_GETFONTDATA )
{
   char * cBuffer = NULL;
   DWORD dwRet ;
   if ( ! ISNIL( 5 ) && ( hb_parnl( 5 ) > 0 ) )
      cBuffer = (char *) hb_xgrab( hb_parnl(5));

   dwRet = GetFontData( (HDC) HB_PARWH( 1 )  ,
                                 (DWORD) hb_parnl( 2 ),
                                 (DWORD) hb_parnl( 3 ),
                                 ( ISNIL( 5 ) || ( hb_parnl( 5 ) <= 0 ) ) ? NULL :cBuffer  ,
                                 (DWORD) ISNIL( 5 ) ? 0 : hb_parnl( 5 )
                      );

   hb_retnl( (LONG) dwRet );

   if ( ! ISNIL( 5 ) && ( hb_parnl( 5 ) > 0 ) )
   {
      hb_storclen(cBuffer, dwRet, 4 );
      hb_xfree( cBuffer );
   }

}
whtfont.c299
HB_FUNCVWN_GETFONTLANGUAGEINFO(void)
HB_FUNC( VWN_GETFONTLANGUAGEINFO )
{
   hb_retnl( (LONG) GetFontLanguageInfo( (HDC) HB_PARWH( 1 ) ) );
}

//-----------------------------------------------------------------------------
// WINGDIAPI DWORD WINAPI GetFontUnicodeRanges( IN HDC, OUT LPGLYPHSET);

// no prototype ?

/*

HB_FUNC( VWN_GETFONTUNICODERANGES )
{
   LPGLYPHSET lpglyphSet ;

   // Your code goes here

   hb_retnl( (LONG) GetFontUnicodeRanges( (HDC) HB_PARWH( 1 ), lpglyphSet ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI HANDLE WINAPI AddFontMemResourceEx( IN PVOID, IN DWORD, IN PVOID , IN DWORD*);

// no info

/*

HB_FUNC( VWN_ADDFONTMEMRESOURCEEX )
{
   PVOID pVoid1 ;
   PVOID pVoid2 ;

   // Your code goes here

   hb_retnl( (LONG) AddFontMemResourceEx( pVoid1               ,
                                          (DWORD) hb_parnl( 2 ),
                                          pVoid2               ,
                                          (DWORD) hb_parnl( 4 )
                                          ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI int WINAPI AddFontResourceExA( IN LPCSTR, IN DWORD, IN PVOID);

// no info

whtfont.c328
HB_FUNCVWN_REMOVEFONTRESOURCE(void)
HB_FUNC( VWN_REMOVEFONTRESOURCE )
{
   hb_retl( RemoveFontResource( (LPCSTR) hb_parcx( 1 ) ) );
}
whtfont.c413
whtgdi.c
TypeFunctionSourceLine
HB_FUNCVWN_RGB(void)
HB_FUNC( VWN_RGB )
{
   hb_retnl((ULONG)(COLORREF)(((BYTE)(hb_parni(1))|
                              ((WORD)((BYTE)(hb_parni(2)))<<8))|
                              (((DWORD)(BYTE)(hb_parni(3)))<<16)));
}
whtgdi.c46
HB_FUNCVWN_GETGVALUE(void)
HB_FUNC( VWN_GETGVALUE )
{
  hb_retni( (INT) GetGValue( (DWORD) hb_parnl( 1 ) ) );
}
whtgdi.c56
HB_FUNCVWN_GETBVALUE(void)
HB_FUNC( VWN_GETBVALUE )
{
  hb_retni( (INT) GetBValue( (DWORD) hb_parnl( 1 ) ) );
}
whtgdi.c64
HB_FUNCVWN_GETRVALUE(void)
HB_FUNC( VWN_GETRVALUE )
{
  hb_retni( (INT) GetRValue( (DWORD) hb_parnl( 1 ) ) );
}
whtgdi.c72
HB_FUNCVWN_SETTEXTCOLOR(void)
HB_FUNC( VWN_SETTEXTCOLOR )
{

  hb_retnl( (ULONG) SetTextColor( (HDC) HB_PARWH( 1 ), (COLORREF) hb_parnl(2) ) );

}
whtgdi.c81
HB_FUNCVWN_GETTEXTCOLOR(void)
HB_FUNC( VWN_GETTEXTCOLOR )
{
   hb_retnl((ULONG) GetTextColor( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c93
HB_FUNCVWN_GETBKCOLOR(void)
HB_FUNC( VWN_GETBKCOLOR )
{
   hb_retnl( (ULONG) GetBkColor( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c104
HB_FUNCVWN_SETBKCOLOR(void)
HB_FUNC( VWN_SETBKCOLOR )
{

   hb_retnl( (ULONG) SetBkColor( (HDC) HB_PARWH( 1 ), (COLORREF) hb_parnl(2) ) );
}
whtgdi.c114
HB_FUNCVWN_UPDATECOLORS(void)
HB_FUNC( VWN_UPDATECOLORS )
{
   hb_retl( UpdateColors( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c124
HB_FUNCVWN_GETSTOCKOBJECT(void)
HB_FUNC( VWN_GETSTOCKOBJECT )
{
   HB_RETWH( GetStockObject( hb_parni( 1 ) ) );
}
whtgdi.c140
HB_FUNCVWN_SELECTOBJECT(void)
HB_FUNC( VWN_SELECTOBJECT )
{
   HB_RETWH( SelectObject( (HDC) HB_PARWH( 1 ), (HGDIOBJ) HB_PARWH( 2 ) ) );
}
whtgdi.c151
HB_FUNCVWN_DELETEOBJECT(void)
HB_FUNC( VWN_DELETEOBJECT )
{
   hb_retl( DeleteObject( (HGDIOBJ) HB_PARWH( 1 ) ) );
}
whtgdi.c162
HB_FUNCVWN_UNREALIZEOBJECT(void)
HB_FUNC( VWN_UNREALIZEOBJECT )
{
   hb_retl( UnrealizeObject( (HGDIOBJ) HB_PARWH( 1 ) ) );
}
whtgdi.c172
HB_FUNCVWN_GETOBJECTTYPE(void)
HB_FUNC( VWN_GETOBJECTTYPE )
{
   hb_retnl( ( long ) GetObjectType( (HGDIOBJ) HB_PARWH( 1 ) ) );
}
whtgdi.c184
HB_FUNCVWN_GETCURRENTOBJECT(void)
HB_FUNC( VWN_GETCURRENTOBJECT )
{
   HB_RETWH( GetCurrentObject( (HDC) HB_PARWH( 1 ), (UINT) hb_parni( 2 ) ) );
}
whtgdi.c195
HB_FUNCVWN_GETOBJECT(void)
HB_FUNC( VWN_GETOBJECT )
{

   int nBytes = GetObject( (HGDIOBJ) HB_PARWH( 1 ), 0, NULL );
   LPVOID  lpObj = (VOID *) hb_xgrab(nBytes);

   nBytes = GetObject( (HGDIOBJ) HB_PARWH( 1 ), nBytes, lpObj )  ;

   hb_retclen( (char *) lpObj,nBytes);
   hb_xfree(lpObj);

}
whtgdi.c207
HB_FUNCVWN_GETMAPMODE(void)
HB_FUNC( VWN_GETMAPMODE )
{
   hb_retni( GetMapMode( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c250
HB_FUNCVWN_SETMAPMODE(void)
HB_FUNC( VWN_SETMAPMODE )
{
   hb_retni( SetMapMode( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtgdi.c261
HB_FUNCVWN_SETMAPPERFLAGS(void)
HB_FUNC( VWN_SETMAPPERFLAGS )
{
   hb_retnl( (LONG) SetMapperFlags( (HDC) HB_PARWH( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtgdi.c270
HB_FUNCVWN_BEGINPAINT(void)
HB_FUNC( VWN_BEGINPAINT )
{
   PAINTSTRUCT pps ;
   HB_RETWH( BeginPaint( (HWND) HB_PARWH( 1 ), &pps ) );
   hb_storclen( (char *) &pps, sizeof(PAINTSTRUCT), 2 );
}
whtgdi.c288
HB_FUNCVWN_ENDPAINT(void)
HB_FUNC( VWN_ENDPAINT )
{
   hb_retl( EndPaint( (HWND) HB_PARWH( 1 ), (PAINTSTRUCT*) hb_parcx( 2 ) ) );
}
whtgdi.c301
HB_FUNCVWN_GETGRAPHICSMODE(void)
HB_FUNC( VWN_GETGRAPHICSMODE )
{
   hb_retni( GetGraphicsMode( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c311
HB_FUNCVWN_GDICOMMENT(void)
HB_FUNC( VWN_GDICOMMENT )
{

   hb_retl( GdiComment( (HDC) HB_PARWH( 1 ), (UINT) hb_parni( 2 ), ( const BYTE * ) hb_parcx( 3 ) ) );

}
whtgdi.c322
HB_FUNCVWN_GDISETBATCHLIMIT(void)
HB_FUNC( VWN_GDISETBATCHLIMIT )
{
   hb_retnl( (LONG) GdiSetBatchLimit( (DWORD) hb_parnl( 1 ) ) );
}
whtgdi.c335
HB_FUNCVWN_SELECTCLIPPATH(void)
HB_FUNC( VWN_SELECTCLIPPATH )
{
   hb_retl( SelectClipPath( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtgdi.c352
HB_FUNCVWN_WIDENPATH(void)
HB_FUNC( VWN_WIDENPATH )
{
   hb_retl( WidenPath( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c365
HB_FUNCVWN_STROKEANDFILLPATH(void)
HB_FUNC( VWN_STROKEANDFILLPATH )
{
   hb_retl( StrokeAndFillPath( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c376
HB_FUNCVWN_STROKEPATH(void)
HB_FUNC( VWN_STROKEPATH )
{
   hb_retl( StrokePath( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c385
HB_FUNCVWN_ENDPATH(void)
HB_FUNC( VWN_ENDPATH )
{
   hb_retl( EndPath( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c396
HB_FUNCVWN_ABORTPATH(void)
HB_FUNC( VWN_ABORTPATH )
{
   hb_retl( AbortPath( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c407
HB_FUNCVWN_LPTODP(void)
HB_FUNC( VWN_LPTODP )
{
   POINT * Point ;
   POINT pt;
   INT iCount ;
   INT i ;
   PHB_ITEM aParam;
   PHB_ITEM aSub;


   if (ISARRAY( 2 ) )
   {
       iCount = hb_parinfa( 2, 0 );
       Point = ( POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtgdi.c440
HB_FUNCVWN_DPTOLP(void)
HB_FUNC( VWN_DPTOLP )
{
   POINT * Point ;
   POINT pt;
   INT iCount ;
   INT i ;
   PHB_ITEM aParam;
   PHB_ITEM aSub;


   if (ISARRAY( 2 ) )
   {
       iCount = hb_parinfa( 2, 0 );
       Point = ( POINT * ) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(2,HB_IT_ARRAY);

       for ( i = 0 ; i
whtgdi.c498
HB_FUNCVWN_GETDEVICECAPS(void)
HB_FUNC( VWN_GETDEVICECAPS )
{
   hb_retni( GetDeviceCaps( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtgdi.c552
HB_FUNCVWN_PAINTDESKTOP(void)
HB_FUNC( VWN_PAINTDESKTOP )
{
   hb_retl( PaintDesktop( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c562
HB_FUNCVWN_GETGUIRESOURCES(void)
HB_FUNC( VWN_GETGUIRESOURCES )
{
   hb_retnl( (LONG) GetGuiResources( (HANDLE) HB_PARWH( 1 ),
                                     (DWORD) hb_parnl( 2 )
                                   ) );
}
whtgdi.c576
HB_FUNCVWN_PTVISIBLE(void)
HB_FUNC( VWN_PTVISIBLE )
{
   hb_retl( PtVisible( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtgdi.c589
HB_FUNCVWN_SETGRAPHICSMODE(void)
HB_FUNC( VWN_SETGRAPHICSMODE )
{
   hb_retni( SetGraphicsMode( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtgdi.c599
HB_FUNCVWN_SWAPBUFFERS(void)
HB_FUNC( VWN_SWAPBUFFERS )
{
   hb_retl( SwapBuffers( (HDC) HB_PARWH( 1 ) ) );
}
whtgdi.c619
HB_FUNCVWN_GETCLIPBOX(void)
HB_FUNC( VWN_GETCLIPBOX )
{
   RECT Rect ;
   PHB_ITEM aRect ;

   hb_retni( GetClipBox( (HDC) HB_PARWH( 1 ), &Rect ) );

      aRect = Rect2Array( &Rect );
      hb_itemReturn( aRect );
      hb_itemRelease( aRect );


}
whtgdi.c631
HB_FUNCVWN_GETRASTERIZERCAPS(void)
HB_FUNC( VWN_GETRASTERIZERCAPS )
{
   LPRASTERIZER_STATUS lprs = (LPRASTERIZER_STATUS) hb_parc(1); //hb_param( 1,HB_IT_STRING )->item.asString.value;

   if( GetRasterizerCaps( lprs, (UINT) hb_parni( 2 ) ) )
       hb_retclen( (char*) lprs, sizeof(RASTERIZER_STATUS) );
   //hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) lprs, sizeof(RASTERIZER_STATUS ) );

}
whtgdi.c667
HB_FUNCVWN_GETASPECTRATIOFILTEREX(void)
HB_FUNC( VWN_GETASPECTRATIOFILTEREX )
{
   SIZE lpSize ;
   PHB_ITEM pArray=hb_param(2,HB_IT_ARRAY);
   // Your code goes here

   if( GetAspectRatioFilterEx( (HDC) HB_PARWH( 1 ), &lpSize ) )
      {
      Size2ArrayEx(&lpSize,pArray);
      hb_retl(TRUE);
      }
   else
      hb_retl(FALSE);


}
whtgdi.c685
HB_FUNCVWN_GETUPDATERECT(void)
HB_FUNC( VWN_GETUPDATERECT )
{
   RECT Rect ;
   PHB_ITEM aRect ;

   if ( GetUpdateRect( (HWND) HB_PARWH( 1 ), &Rect, hb_parl( 2 ) ) )
   {
      aRect = Rect2Array( &Rect );
      hb_itemReturn( aRect );
      hb_itemRelease( aRect );
   }

}


//-----------------------------------------------------------------------------
// WINUSERAPI DWORD WINAPI DragObject( IN HWND, IN HWND, IN UINT, IN ULONG_PTR, IN HCURSOR);

whtgdi.c734
HB_FUNCVWN_DRAGDETECT(void)
HB_FUNC( VWN_DRAGDETECT )
{
   POINT PoInt ;
   PHB_ITEM pArray;
   if (ISARRAY(2))
   {
      pArray = hb_param(2, HB_IT_ARRAY);
      Array2Point(pArray,&PoInt);
      hb_retl( DragDetect( (HWND) HB_PARWH( 1 ), PoInt ) );
   }
   else
      hb_retl(FALSE);
}
whtgdi.c779
HB_FUNCVWN_GETDRAWITEMSTRUCT(void)
HB_FUNC( VWN_GETDRAWITEMSTRUCT )
{

  DRAWITEMSTRUCT * dis = ( DRAWITEMSTRUCT * ) HB_PARWH( 1 );

  PHB_ITEM arrDis = hb_itemArrayNew( 12 );

  hb_arraySetNL( arrDis,  1, dis->CtlType );
  hb_arraySetNL( arrDis,  2, dis->CtlID );
  hb_arraySetNL( arrDis,  3, dis->itemID );
  hb_arraySetNL( arrDis,  4, dis->itemAction );
  hb_arraySetNL( arrDis,  5, dis->itemState );
  HB_ARRAYSETWH( arrDis,  6, dis->hwndItem );
  HB_ARRAYSETWH( arrDis,  7, dis->hDC );
  hb_arraySetNL( arrDis,  8, dis->rcItem.left );
  hb_arraySetNL( arrDis,  9, dis->rcItem.top );
  hb_arraySetNL( arrDis, 10, dis->rcItem.right );
  hb_arraySetNL( arrDis, 11, dis->rcItem.bottom );
  hb_arraySetNInt( arrDis, 12, ( HB_PTRDIFF ) dis->itemData );

  hb_itemReturnRelease( arrDis );
}
whtgdi.c797
HB_FUNCVWN_DRAWFRAMECONTROL(void)
HB_FUNC( VWN_DRAWFRAMECONTROL )
{
   RECT lpRect ;
   PHB_ITEM pArray=hb_param(2,HB_IT_ARRAY);

   // Your code goes here
   if (Array2Rect(pArray,&lpRect))
   {
      if( DrawFrameControl( (HDC) HB_PARWH( 1 ) ,
                              &lpRect              ,
                              (UINT) hb_parni( 3 ),
                              (UINT) hb_parni( 4 )
                            ) )
   {
         Rect2ArrayEx(&lpRect,pArray);
         hb_retl(TRUE);
   }
      else
         hb_retl(FALSE);
}
else
   hb_retl(FALSE);
}
whtgdi.c826
HB_FUNCVWN_DRAWANIMATEDRECTS(void)
HB_FUNC( VWN_DRAWANIMATEDRECTS )
{
   RECT lprcFrom ;
   RECT lprcTo   ;

   // Your code goes here
   if ( Array2Rect(hb_param(3,HB_IT_ARRAY),&lprcFrom ) && Array2Rect(hb_param(4,HB_IT_ARRAY) ,&lprcFrom ))
   {
      if(DrawAnimatedRects( (HWND) HB_PARWH( 1 ),
                               hb_parni( 2 )       ,
                               &lprcFrom           ,
                               &lprcTo
                             ) )
         hb_retl(TRUE);
      else
         hb_retl(FALSE);
   }
   else
      hb_retl(FALSE);

}
whtgdi.c858
HB_FUNCVWN_GETWINDOWORGEX(void)
HB_FUNC( VWN_GETWINDOWORGEX )
{
   POINT lpPoInt ;
   PHB_ITEM pArray=hb_param(2,HB_IT_ARRAY);


   if( GetWindowOrgEx( (HDC) HB_PARWH( 1 ), &lpPoInt ) )
      {
         Point2ArrayEx(&lpPoInt,pArray);
         hb_retl(TRUE);
      }
   else
      hb_retl(FALSE);
}



//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetWorldTransform( IN HDC, OUT LPXFORM);

/*

HB_FUNC( VWN_GETWORLDTRANSFORM )
{
   LPXFORM lpxForm ;

   // Your code goes here

   hb_retl( GetWorldTransform( (HDC) HB_PARWH( 1 ), lpxForm ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI ModifyWorldTransform( IN HDC, IN CONST XFORM *, IN DWORD);

/*

HB_FUNC( VWN_MODIFYWORLDTRANSFORM )
{
   CONST XFORM ;

   // Your code goes here

   hb_retl( ModifyWorldTransform( (HDC) HB_PARWH( 1 )  ,
                                  &XFORM               ,
                                  (DWORD) hb_parnl( 3 )
                                  ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI OffsetViewportOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);

whtgdi.c888
HB_FUNCVWN_SCALEWINDOWEXTEX(void)
HB_FUNC( VWN_SCALEWINDOWEXTEX )
{
   SIZE lpSize ;
   PHB_ITEM pArray=hb_param(6,HB_IT_ARRAY);


   if( ScaleWindowExtEx( (HDC) HB_PARWH( 1 ),
                              hb_parni( 2 )      ,
                              hb_parni( 3 )      ,
                              hb_parni( 4 )      ,
                              hb_parni( 5 )      ,
                              &lpSize
                              ) )
   {
      Size2ArrayEx(&lpSize,pArray);
      hb_retl(TRUE);
   }
   else
   hb_retl(FALSE);
}



//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI SetBoundsRect(IN HDC, IN CONST RECT *, IN UINT);

/*

HB_FUNC( VWN_SETBOUNDSRECT )
{
   CONST RECT ;

   // Your code goes here

   hb_retni( SetBoundsRect( (HDC) HB_PARWH( 1 ), &RECT, (UINT) hb_parni( 3 ) ) );
}

*/



//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI SetWorldTransform( IN HDC, IN CONST XFORM *);

whtgdi.c986
whthead.c
TypeFunctionSourceLine
HB_FUNCVWN_HEADER_CREATE(void)
HB_FUNC( VWN_HEADER_CREATE )
{

   HB_RETWH( CreateWindow(  "SysHeader32"         ,
                                   ""                    ,
                                   (DWORD) hb_parnl( 1 ) ,
                                   hb_parni( 2 )         ,
                                   hb_parni( 3 )         ,
                                   hb_parni( 4 )         ,
                                   hb_parni( 5 )         ,
                                   (HWND) HB_PARWH( 6 )  ,
                                   (HMENU) HB_PARWH( 7 ) ,
                                   GetModuleHandle(NULL) ,
                                   NULL ) );
}
whthead.c71
HB_FUNCVWN_HEADER_GETITEMCOUNT(void)
HB_FUNC( VWN_HEADER_GETITEMCOUNT )
{
   hb_retni( Header_GetItemCount( (HWND) HB_PARWH(1) ) );
}
whthead.c91
HB_FUNCVWN_HEADER_INSERTITEM(void)
HB_FUNC( VWN_HEADER_INSERTITEM )
{
   HDITEM *hdi = ( HDITEM *) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value ;
   hb_retni( Header_InsertItem( (HWND) HB_PARWH(1), hb_parni(2), hdi ) );
}
whthead.c100
HB_FUNCVWN_HEADER_DELETEITEM(void)
HB_FUNC( VWN_HEADER_DELETEITEM  )
{
   hb_retl( Header_DeleteItem( (HWND) HB_PARWH(1), hb_parni(2) ) );
}
whthead.c110
HB_FUNCVWN_HEADER_GETITEM(void)
HB_FUNC( VWN_HEADER_GETITEM )
{
   HDITEM hdi ;
   BOOL lRet = Header_GetItem( (HWND) HB_PARWH(1), hb_parni(2), &hdi );
   if ( lRet )
       hb_retclen( (char*) &hdi, sizeof(HDITEM) );
      //hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) hdi, sizeof( HDITEM ) );

}
whthead.c122
HB_FUNCVWN_HEADER_SETITEM(void)
HB_FUNC( VWN_HEADER_SETITEM )
{
   HDITEM *hdi = ( HDITEM * ) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value ;
   hb_retl( Header_SetItem( (HWND) HB_PARWH(1), hb_parni(2), hdi ) );
}
whthead.c136
HB_FUNCVWN_HEADER_CREATEDRAGIMAGE(void)
HB_FUNC( VWN_HEADER_CREATEDRAGIMAGE )
{

   HB_RETWH( Header_CreateDragImage( (HWND) HB_PARWH(1), hb_parni(2) ) );

}
whthead.c146
HB_FUNCVWN_HEADER_GETORDERARRAY(void)
HB_FUNC( VWN_HEADER_GETORDERARRAY )
{

  UINT iCount = Header_GetItemCount((HWND)HB_PARWH(1) );
  PHB_ITEM aInt ;
  INT *lpi = (INT*) hb_xgrab( iCount*sizeof(INT));
  BOOL lRet = Header_GetOrderArray((HWND) HB_PARWH(1), iCount, lpi )  ;
  UINT i;

  if ( lRet )
  {
      aInt  = hb_itemArrayNew(iCount );
      for ( i = 0; i
whthead.c160
HB_FUNCVWN_HEADER_SETORDERARRAY(void)
HB_FUNC( VWN_HEADER_SETORDERARRAY )
{
   UINT iCount ;
   INT *lpi    ;
   UINT i      ;

   if( hb_parinfo( 2 ) == HB_IT_ARRAY  )
      {

          iCount = hb_parinfa( 2, 0 );
          lpi = (INT*) hb_xgrab( iCount*sizeof(INT) );
          for ( i= 0 ; i
whthead.c194
HB_FUNCVWN_HEADER_GETITEMRECT(void)
HB_FUNC( VWN_HEADER_GETITEMRECT )
{
   RECT rc ;
   PHB_ITEM aRc ;

   if ( Header_GetItemRect((HWND) HB_PARWH(1), (WPARAM) hb_parnint(2), &rc ) )
   {
      aRc = Rect2Array( &rc );
      hb_itemReturn( aRc );
      hb_itemRelease( aRc );

   }

}
whthead.c225
HB_FUNCVWN_HEADER_GETIMAGELIST(void)
HB_FUNC( VWN_HEADER_GETIMAGELIST )
{

    HB_RETWH(Header_GetImageList((HWND) HB_PARWH(1) ) );

}
whthead.c245
HB_FUNCVWN_HEADER_SETIMAGELIST(void)
HB_FUNC( VWN_HEADER_SETIMAGELIST )
{

   HB_RETWH( Header_SetImageList((HWND) HB_PARWH(1), (LPARAM) hb_parnint(2) ) );

}
whthead.c256
HB_FUNCVWN_HEADER_ORDERTOINDEX(void)
HB_FUNC( VWN_HEADER_ORDERTOINDEX )
{

   hb_retni( Header_OrderToIndex((HWND) HB_PARWH(1), hb_parni(2) ) );

}
whthead.c267
HB_FUNCVWN_HEADER_SETHOTDIVIDER(void)
HB_FUNC( VWN_HEADER_SETHOTDIVIDER )
{

   hb_retni( Header_SetHotDivider((HWND) HB_PARWH(1), hb_parl(2), (LPARAM) hb_parnint(3)));

}
whthead.c282
HB_FUNCVWN_HEADER_SETBITMAPMARGIN(void)
HB_FUNC( VWN_HEADER_SETBITMAPMARGIN )
{

   hb_retni( Header_SetBitmapMargin( (HWND) HB_PARWH(1), hb_parni(2) ) );

}
whthead.c293
HB_FUNCVWN_HEADER_GETBITMAPMARGIN(void)
HB_FUNC( VWN_HEADER_GETBITMAPMARGIN )
{

   hb_retni( Header_GetBitmapMargin( (HWND) HB_PARWH(1) ) );

}
whthead.c304
HB_FUNCVWN_HEADER_SETUNICODEFORMAT(void)
HB_FUNC( VWN_HEADER_SETUNICODEFORMAT )
{

   hb_retl( Header_SetUnicodeFormat( (HWND) HB_PARWH(1), hb_parl( 2 ) ) );

}
whthead.c315
HB_FUNCVWN_HEADER_GETUNICODEFORMAT(void)
HB_FUNC( VWN_HEADER_GETUNICODEFORMAT )
{

   hb_retl( Header_GetUnicodeFormat((HWND) HB_PARWH(1) ) );

}
whthead.c326
HB_FUNCVWN_HEADER_SETFILTERCHANGETIMEOUT(void)
HB_FUNC( VWN_HEADER_SETFILTERCHANGETIMEOUT )
{

   hb_retni( Header_SetFilterChangeTimeout((HWND) HB_PARWH(1), hb_parni( 2 ) ) );

}
whthead.c337
HB_FUNCVWN_HEADER_EDITFILTER(void)
HB_FUNC( VWN_HEADER_EDITFILTER )
{

   hb_retni( Header_EditFilter( (HWND) HB_PARWH(1), hb_parni( 2 ), hb_parl( 3 ) ) );

}
whthead.c348
HB_FUNCVWN_HEADER_CLEARALLFILTERS(void)
HB_FUNC( VWN_HEADER_CLEARALLFILTERS )
{

   hb_retni( Header_ClearAllFilters( (HWND) HB_PARWH(1) ) );

}
whthead.c359
HB_FUNCVWN_HEADER_CLEARFILTER(void)
HB_FUNC( VWN_HEADER_CLEARFILTER )
{

   hb_retni( Header_ClearFilter( (HWND) HB_PARWH(1), hb_parni( 2 ) ) );

}
whthead.c373
HB_FUNCVWN_HEADER_LAYOUT(void)
HB_FUNC( VWN_HEADER_LAYOUT )
{
   HD_LAYOUT *hdLayout = ( HD_LAYOUT *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;
   hb_retl( Header_Layout( (HWND) HB_PARWH(1), hdLayout ) );
}
whthead.c384
whticon.c
TypeFunctionSourceLine
HB_FUNCVWN_LOADICON(void)
HB_FUNC( VWN_LOADICON )
{
   HB_RETWH( LoadIcon(  ( ISNIL(1) ? NULL : (HINSTANCE) HB_PARWH( 1 ) ) ,
             (hb_parinfo(2)==HB_IT_STRING ? hb_parcx(2) : MAKEINTRESOURCE( (WORD) hb_parni(2))) ) );
}
whticon.c30
HB_FUNCVWN_CREATEICON(void)
HB_FUNC( VWN_CREATEICON )
{

   HB_RETWH( CreateIcon(  ISNIL( 1 ) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH( 1 ),
                                hb_parni( 2 )            ,
                                hb_parni( 3 )            ,
                                (BYTE) hb_parni( 4 )     ,
                                (BYTE) hb_parni( 5 )     ,
                                (BYTE *) hb_parcx( 5 )    ,
                                (BYTE *) hb_parcx( 6 )
                              ) );
}
whticon.c42
HB_FUNCVWN_DESTROYICON(void)
HB_FUNC( VWN_DESTROYICON )
{
   hb_retl( DestroyIcon( (HICON) HB_PARWH( 1 ) ) );
}
whticon.c60
HB_FUNCVWN_LOOKUPICONIDFROMDIRECTORY(void)
HB_FUNC( VWN_LOOKUPICONIDFROMDIRECTORY )
{

   hb_retni( LookupIconIdFromDirectory( (PBYTE) hb_parcx( 1 ), hb_parl( 2 ) ) );
}
whticon.c69
HB_FUNCVWN_LOOKUPICONIDFROMDIRECTORYEX(void)
HB_FUNC( VWN_LOOKUPICONIDFROMDIRECTORYEX )
{

   hb_retni( LookupIconIdFromDirectoryEx( (PBYTE) hb_parcx( 1 ) ,
                                          hb_parl( 2 )         ,
                                          hb_parni( 3 )        ,
                                          hb_parni( 4 )        ,
                                          (UINT) hb_parni( 5 )
                                        ) );
}
whticon.c80
HB_FUNCVWN_CREATEICONFROMRESOURCE(void)
HB_FUNC( VWN_CREATEICONFROMRESOURCE )
{

   HB_RETWH( CreateIconFromResource( (PBYTE) hb_parcx( 1 ) ,
                                            (DWORD) hb_parnl( 2 ),
                                            hb_parl( 3 )         ,
                                            (DWORD) hb_parnl( 4 )
                                          ) );
}
whticon.c95
HB_FUNCVWN_CREATEICONFROMRESOURCEEX(void)
HB_FUNC( VWN_CREATEICONFROMRESOURCEEX )
{

   HB_RETWH( CreateIconFromResourceEx( (PBYTE) hb_parcx( 1 )  ,
                                              (DWORD) hb_parnl( 2 ) ,
                                              hb_parl( 3 )          ,
                                              (DWORD) hb_parnl( 4 ) ,
                                              hb_parni( 5 )         ,
                                              hb_parni( 6 )         ,
                                              (UINT) hb_parni( 7 )
                                            ) );
}
whticon.c109
HB_FUNCVWN_LOADIMAGE(void)
HB_FUNC( VWN_LOADIMAGE )
{
   HB_RETWH( LoadImage( ISNIL( 1 ) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH( 1 ),
                               (LPCSTR) hb_parcx( 2 )    ,
                               (UINT) hb_parni( 3 )     ,
                               hb_parni( 4 )            ,
                               hb_parni( 5 )            ,
                               (UINT) hb_parni( 6 )
                             ) );
}
whticon.c127
HB_FUNCVWN_COPYIMAGE(void)
HB_FUNC( VWN_COPYIMAGE )
{
   HB_RETWH( CopyImage( (HANDLE) HB_PARWH( 1 ),
                               (UINT) hb_parni( 2 )  ,
                               hb_parni( 3 )         ,
                               hb_parni( 4 )         ,
                               (UINT) hb_parni( 5 )
                             ) );
}
whticon.c142
HB_FUNCVWN_DRAWICON(void)
HB_FUNC( VWN_DRAWICON )
{
   hb_retl( DrawIcon( (HDC) HB_PARWH( 1 )  ,
                      hb_parni( 2 )        ,
                      hb_parni( 3 )        ,
                      (HICON) HB_PARWH( 4 )
                    ) );
}
whticon.c156
HB_FUNCVWN_DRAWICONEX(void)
HB_FUNC( VWN_DRAWICONEX )
{
   hb_retl( DrawIconEx( (HDC) HB_PARWH( 1 )   ,
                        hb_parni( 2 )         ,
                        hb_parni( 3 )         ,
                        (HICON) HB_PARWH( 4 ) ,
                        hb_parni( 5 )         ,
                        hb_parni( 6 )         ,
                        (UINT) hb_parni( 7 )  ,
                        (HBRUSH) HB_PARWH( 8 ),
                        (UINT) hb_parni( 9 )
                      ) );
}
whticon.c170
HB_FUNCVWN_CREATEICONINDIRECT(void)
HB_FUNC( VWN_CREATEICONINDIRECT )
{
   ICONINFO *ii =  (ICONINFO * ) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;

   HB_RETWH( CreateIconIndirect( ii ) );
}
whticon.c188
HB_FUNCVWN_COPYICON(void)
HB_FUNC( VWN_COPYICON )
{
   HB_RETWH( CopyIcon( (HICON) HB_PARWH( 1 ) ) );
}
whticon.c201
HB_FUNCVWN_GETICONINFO(void)
HB_FUNC( VWN_GETICONINFO )
{
   ICONINFO ii;

   hb_retl( GetIconInfo( (HICON) HB_PARWH( 1 ), &ii ) );

   // verify !!
   // assign into structure

   hb_storclen( (char *) &ii, sizeof( ICONINFO ), 2 );

}
whticon.c209
HB_FUNCVWN_DUPLICATEICON(void)
HB_FUNC( VWN_DUPLICATEICON )
{
   HB_RETWH( DuplicateIcon(  ISNIL( 1 ) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH( 1 ),
                                   (HICON) HB_PARWH( 2 )
                                 ) );
}
whticon.c227
HB_FUNCVWN_EXTRACTASSOCIATEDICON(void)
HB_FUNC( VWN_EXTRACTASSOCIATEDICON )
{
   WORD lpiIcon  ;
   HICON  hiRet ;

   lpiIcon = (WORD) hb_parni( 2 );

   hiRet = ExtractAssociatedIcon( ( ISNIL( 1 ) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH( 1 ) ) ,
                                             (LPSTR) hb_parcx( 2 )     ,
                                             &lpiIcon
                                );

   if ( hiRet )
      hb_storni( lpiIcon, 2 );

   HB_RETWH( hiRet );

}
whticon.c237
HB_FUNCVWN_EXTRACTICON(void)
HB_FUNC( VWN_EXTRACTICON )
{
   HB_RETWH( ExtractIcon( ISNIL( 1 ) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH( 1 ),
                                 (LPCSTR) hb_parcx( 2 )    ,
                                 (UINT) hb_parni( 3 )
                               ) );
}
whticon.c261
whtilst.c
TypeFunctionSourceLine
HB_FUNCVWN_IMAGELIST_CREATE(void)
HB_FUNC( VWN_IMAGELIST_CREATE )
{
   HIMAGELIST ilist;
   ilist = ImageList_Create( hb_parni(1), hb_parni(2), hb_parnl(3), hb_parni(4), hb_parni(5));
   HB_RETWH( ilist );
}
whtilst.c24
HB_FUNCVWN_IMAGELIST_REPLACEICON(void)
HB_FUNC( VWN_IMAGELIST_REPLACEICON )
{
   hb_retni( ImageList_ReplaceIcon( (HIMAGELIST) HB_PARWH(1),
                          (int) hb_parni(2)                 ,
                          (HICON) HB_PARWH(3) ) )           ;
}
whtilst.c34
HB_FUNCVWN_IMAGELIST_ADDICON(void)
HB_FUNC( VWN_IMAGELIST_ADDICON )
{
   hb_retni( ImageList_AddIcon( (HIMAGELIST) HB_PARWH(1), (HICON) HB_PARWH(2) ) );
}
whtilst.c44
HB_FUNCVWN_IMAGELIST_DESTROY(void)
HB_FUNC( VWN_IMAGELIST_DESTROY )
{
   hb_retl( ImageList_Destroy( (HIMAGELIST) HB_PARWH(1) ) );
}
whtilst.c52
HB_FUNCVWN_IMAGELIST_GETIMAGECOUNT(void)
HB_FUNC( VWN_IMAGELIST_GETIMAGECOUNT )
{

   hb_retni( ImageList_GetImageCount((HIMAGELIST) HB_PARWH(1) ) );

}
whtilst.c60
HB_FUNCVWN_IMAGELIST_SETIMAGECOUNT(void)
HB_FUNC( VWN_IMAGELIST_SETIMAGECOUNT )
{
   hb_retl(  ImageList_SetImageCount((HIMAGELIST) HB_PARWH( 1 ),
                                     (UINT) hb_parni( 2 ) ) )  ;
}
whtilst.c70
HB_FUNCVWN_IMAGELIST_ADD(void)
HB_FUNC( VWN_IMAGELIST_ADD )
{
   hb_retni( ImageList_Add((HIMAGELIST) HB_PARWH( 1 ),
                           (HBITMAP) HB_PARWH( 2 )   ,
                           (HBITMAP) HB_PARWH( 3 )));
}
whtilst.c79
HB_FUNCVWN_IMAGELIST_SETBKCOLOR(void)
HB_FUNC( VWN_IMAGELIST_SETBKCOLOR )
{
   hb_retnl( (LONG) ImageList_SetBkColor((HIMAGELIST) HB_PARWH( 1 ),
                                         (COLORREF) hb_parnl( 2 )));
}
whtilst.c89
HB_FUNCVWN_IMAGELIST_GETBKCOLOR(void)
HB_FUNC( VWN_IMAGELIST_GETBKCOLOR )
{
   hb_retnl( (LONG) ImageList_GetBkColor((HIMAGELIST) HB_PARWH( 1 )));
}
whtilst.c98
HB_FUNCVWN_IMAGELIST_SETOVERLAYIMAGE(void)
HB_FUNC( VWN_IMAGELIST_SETOVERLAYIMAGE )
{
   hb_retl(  ImageList_SetOverlayImage((HIMAGELIST) HB_PARWH( 1 ) ,
                                        hb_parni(2), hb_parni(3)));
}
whtilst.c106
HB_FUNCVWN_IMAGELIST_DRAW(void)
HB_FUNC( VWN_IMAGELIST_DRAW )
{
   hb_retl( ImageList_Draw((HIMAGELIST) HB_PARWH( 1 ), hb_parni(2)    ,
                           (HDC) HB_PARWH(3), hb_parni(4), hb_parni(5),
                           (UINT) hb_parni(6)))                       ;

}
whtilst.c116
HB_FUNCVWN_IMAGELIST_REPLACE(void)
HB_FUNC( VWN_IMAGELIST_REPLACE )
{
   hb_retl(  ImageList_Replace((HIMAGELIST) HB_PARWH( 1 ),
                                hb_parni( 2 )            ,
                                (HBITMAP) HB_PARWH(3)    ,
                                (HBITMAP) HB_PARWH(4)))  ;
}
whtilst.c127
HB_FUNCVWN_IMAGELIST_ADDMASKED(void)
HB_FUNC( VWN_IMAGELIST_ADDMASKED )
{
   hb_retni( ImageList_AddMasked((HIMAGELIST) HB_PARWH( 1 ) ,
                                  (HBITMAP) HB_PARWH( 2 )   ,
                                  (COLORREF) hb_parnl( 3 )));

}
whtilst.c138
HB_FUNCVWN_IMAGELIST_DRAWEX(void)
HB_FUNC( VWN_IMAGELIST_DRAWEX )
{
   hb_retl(  ImageList_DrawEx((HIMAGELIST) HB_PARWH( 1 ), hb_parni( 2 )     ,
                              (HDC) HB_PARWH( 3 ), hb_parni(4), hb_parni(5) ,
                              hb_parni(6), hb_parni(7),(COLORREF)hb_parnl(8),
                              (COLORREF) hb_parnl(9), (UINT) hb_parni(10)));
}
whtilst.c150
HB_FUNCVWN_IMAGELIST_DRAWINDIRECT(void)
HB_FUNC( VWN_IMAGELIST_DRAWINDIRECT )
{
  IMAGELISTDRAWPARAMS *pimldp  = ( IMAGELISTDRAWPARAMS *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value ;

   hb_retl(  ImageList_DrawIndirect( pimldp ) );
}
whtilst.c163
HB_FUNCVWN_IMAGELIST_REMOVE(void)
HB_FUNC( VWN_IMAGELIST_REMOVE )
{
   hb_retl( ImageList_Remove((HIMAGELIST) HB_PARWH( 1 ), hb_parni( 2 )));
}
whtilst.c173
HB_FUNCVWN_IMAGELIST_GETICON(void)
HB_FUNC( VWN_IMAGELIST_GETICON )
{
   HB_RETWH( ImageList_GetIcon((HIMAGELIST) HB_PARWH( 1 ),
                                       hb_parni( 2 )            ,
                                       (UINT) hb_parni(3)))     ;
}
whtilst.c181
HB_FUNCVWN_IMAGELIST_LOADIMAGE(void)
HB_FUNC( VWN_IMAGELIST_LOADIMAGE )
{
   HB_RETWH( ImageList_LoadImageA( (HINSTANCE) HB_PARWH(1),
                                          ISCHAR(2)?(LPCSTR) hb_parcx(2) : MAKEINTRESOURCE(hb_parni(2))   ,
                                           hb_parni(3)           ,
                                           hb_parni(4)           ,
                                           (COLORREF) hb_parnl(5),
                                           (UINT) hb_parni(6)    ,
                                           (UINT) hb_parni(7)))  ;
}
whtilst.c192
HB_FUNCVWN_IMAGELIST_COPY(void)
HB_FUNC( VWN_IMAGELIST_COPY  )
{
   hb_retl( ImageList_Copy((HIMAGELIST) HB_PARWH( 1 ),
                           hb_parni( 2 )             ,
                           (HIMAGELIST) HB_PARWH( 3 ),
                           hb_parni( 4 )             ,
                           (UINT) hb_parni(5)))      ;
}
whtilst.c206
HB_FUNCVWN_IMAGELIST_BEGINDRAG(void)
HB_FUNC( VWN_IMAGELIST_BEGINDRAG )
{
   hb_retl( ImageList_BeginDrag((HIMAGELIST) HB_PARWH( 1 ),
                                 hb_parni( 2 )            ,
                                 hb_parni( 3 )            ,
                                 hb_parni( 4 )))          ;

}

//-----------------------------------------------------------------------------
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WATCOMC__)
void WINAPI ImageList_EndDrag(void);
#else
WINCOMMCTRLAPI void WINAPI ImageList_EndDrag(void);
whtilst.c218
HB_FUNCVWN_IMAGELIST_ENDDRAG(void)
HB_FUNC( VWN_IMAGELIST_ENDDRAG )
{
   ImageList_EndDrag();
}
whtilst.c234
HB_FUNCVWN_IMAGELIST_DRAGENTER(void)
HB_FUNC( VWN_IMAGELIST_DRAGENTER  )
{
   hb_retl( ImageList_DragEnter( (HWND) HB_PARWH(1), hb_parni(2), hb_parni(3)));
}
whtilst.c242
HB_FUNCVWN_IMAGELIST_DRAGLEAVE(void)
HB_FUNC( VWN_IMAGELIST_DRAGLEAVE )
{
   hb_retl( ImageList_DragLeave( (HWND) HB_PARWH(1)));
}
whtilst.c250
HB_FUNCVWN_IMAGELIST_MOVE(void)
HB_FUNC( VWN_IMAGELIST_MOVE )
{
   hb_retl( ImageList_DragMove( hb_parni(1), hb_parni(2)));

}
whtilst.c258
HB_FUNCVWN_IMAGELIST_SETDRAGCURSORIMAGE(void)
HB_FUNC( VWN_IMAGELIST_SETDRAGCURSORIMAGE  )
{
   hb_retl( ImageList_SetDragCursorImage((HIMAGELIST) HB_PARWH( 1 ),
                                         hb_parni( 2 )             ,
                                         hb_parni( 3 )             ,
                                         hb_parni( 4 )))           ;
}
whtilst.c267
HB_FUNCVWN_IMAGELIST_DRAGSHOWNOLOCK(void)
HB_FUNC( VWN_IMAGELIST_DRAGSHOWNOLOCK )
{
   hb_retl( ImageList_DragShowNolock( hb_parl( 1 )));
}
whtilst.c278
HB_FUNCVWN_IMAGELIST_GETDRAGIMAGE(void)
HB_FUNC( VWN_IMAGELIST_GETDRAGIMAGE )
{
   POINT pt        ;
   POINT ptHotspot ;
   PHB_ITEM aPt1 = hb_param(1,HB_IT_ARRAY);
   PHB_ITEM aPt2 = hb_param(2,HB_IT_ARRAY);

   if ( Array2Point(aPt1,&pt) )
       if( Array2Point(aPt2,&ptHotspot) )
           HB_RETWH( ImageList_GetDragImage( &pt, &ptHotspot));
}
whtilst.c287
HB_FUNCVWN_IMAGELIST_GETICONSIZE(void)
HB_FUNC( VWN_IMAGELIST_GETICONSIZE )
{
   int cx ;
   int cy ;

   if ( ImageList_GetIconSize((HIMAGELIST) HB_PARWH( 1 ), &cx, &cy) )
   {
      hb_storni( cx, 2 );
      hb_storni( cy, 3 );
      hb_retl( 1 );
   }
   else
     hb_retl(0);
}
whtilst.c303
HB_FUNCVWN_IMAGELIST_SETICONSIZE(void)
HB_FUNC( VWN_IMAGELIST_SETICONSIZE )
{
   hb_retl(  ImageList_SetIconSize((HIMAGELIST) HB_PARWH( 1 )      ,
                                   hb_parni( 2 ), hb_parni( 3 ) ) );

}
whtilst.c321
HB_FUNCVWN_IMAGELIST_GETIMAGEINFO(void)
HB_FUNC( VWN_IMAGELIST_GETIMAGEINFO )
{
   IMAGEINFO ii ;

   if (  ImageList_GetImageInfo((HIMAGELIST) HB_PARWH( 1 ), hb_parni( 2 ), &ii ) )
      hb_retclen( (char*) &ii, sizeof(IMAGEINFO));

}
whtilst.c333
HB_FUNCVWN_IMAGELIST_MERGE(void)
HB_FUNC( VWN_IMAGELIST_MERGE )
{
   HB_RETWH( ImageList_Merge((HIMAGELIST) HB_PARWH( 1 ),
                                    hb_parni( 2 )             ,
                                    (HIMAGELIST) HB_PARWH( 3 ),
                                    hb_parni( 4 )             ,
                                    hb_parni( 5 )             ,
                                    hb_parni( 6 )))           ;

}
whtilst.c346
HB_FUNCVWN_IMAGELIST_DUPLICATE(void)
HB_FUNC( VWN_IMAGELIST_DUPLICATE )
{
   HB_RETWH( ImageList_Duplicate((HIMAGELIST) HB_PARWH( 1 )));
}
whtilst.c360
whtinet.c
TypeFunctionSourceLine
HB_FUNCVWN_INTERNETDIAL(void)
HB_FUNC( VWN_INTERNETDIAL )
{
   HWND    hWnd   = ISNIL( 1 ) ? 0    : ( HWND ) HB_PARWH( 1 );
   LPTSTR  lpszId = ISNIL( 2 ) ? NULL : hb_parcx( 2 );
   DWORD   nFlags = INTERNET_AUTODIAL_FORCE_ONLINE ;
   DWORD   nRet   = 0;

   hb_retnl( InternetDial( hWnd, lpszId, nFlags, &nRet, 0 ) );

}
whtinet.c45
HB_FUNCVWN_INTERNETGETCONNECTEDSTATE(void)
HB_FUNC( VWN_INTERNETGETCONNECTEDSTATE )
{
   hb_retl( InternetGetConnectedState( NULL, 0 ) );
}
whtinet.c69
HB_FUNCVWN_INTERNETOPEN(void)
HB_FUNC( VWN_INTERNETOPEN )
{
   LPCTSTR lpszAgent       = ISNIL( 1 ) ? NULL : hb_parcx( 1 );
   DWORD   dwAccessType    = ISNIL( 2 ) ? INTERNET_OPEN_TYPE_DIRECT : hb_parnl( 2 );
   LPCTSTR lpszProxyName   = ISNIL( 3 ) ? NULL : hb_parcx( 3 );
   LPCTSTR lpszProxyBypass = ISNIL( 4 ) ? NULL : hb_parcx( 4 );
   DWORD   dwFlags         = ISNIL( 5 ) ? 0    : hb_parnl( 5 );

   HB_RETWH( InternetOpen( lpszAgent, dwAccessType, lpszProxyName, lpszProxyBypass, dwFlags ) );
}
whtinet.c84
HB_FUNCVWN_INTERNETCONNECT(void)
HB_FUNC( VWN_INTERNETCONNECT )
{
   HINTERNET     hInternet      = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR       lpszServerName = hb_parcx( 2 );
   INTERNET_PORT nServerPort    = ISNIL( 3 ) ? INTERNET_DEFAULT_HTTP_PORT : ( INTERNET_PORT ) hb_parni( 3 );
   LPCTSTR       lpszUserName   = ISNIL( 4 ) ? NULL : hb_parcx( 4 );
   LPCTSTR       lpszPassword   = ISNIL( 5 ) ? NULL : hb_parcx( 5 );
   DWORD         dwService      = ISNIL( 6 ) ? INTERNET_SERVICE_HTTP : hb_parnl( 6 );
   DWORD         dwFlags        = ISNIL( 7 ) ? 0    : hb_parnl( 7 );
   DWORD_PTR     dwContext      = ISNIL( 8 ) ? 0    : hb_parnl( 8 );

   HB_RETWH( InternetConnect( hInternet,    lpszServerName,
                    nServerPort, lpszUserName, lpszPassword,
                    dwService, dwFlags,      dwContext ) );
}
whtinet.c126
HB_FUNCVWN_FTPOPENFILE(void)
HB_FUNC( VWN_FTPOPENFILE )
{
   HINTERNET hFtp         = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszFileName = hb_parcx( 2 );
   DWORD     dwAccess     = ISNIL( 3 ) ? GENERIC_READ : ( DWORD ) hb_parni( 3  );
   DWORD     dwFlags      = ISNIL( 4 ) ? FTP_TRANSFER_TYPE_BINARY : hb_parni( 4 );
   DWORD_PTR dwContext    = ISNIL( 5 ) ? 0            : hb_parnl( 5 );

   hb_retl( FtpOpenFile( hFtp, lpszFileName, dwAccess, dwFlags, dwContext ) != NULL );
}
whtinet.c160
HB_FUNCVWN_INTERNETWRITEFILE(void)
HB_FUNC( VWN_INTERNETWRITEFILE )
{
   HINTERNET hFile                    = ( HINTERNET ) HB_PARWH( 1 );
   LPCVOID   lpBuffer                 = hb_parcx( 2 );
   DWORD     dwNumberOfBytesToWrite   = ( DWORD ) hb_parnl( 3 );
   DWORD     dwNumberOfBytesWritten   = ( DWORD ) 0 ;

   hb_retl( InternetWriteFile( hFile, lpBuffer, dwNumberOfBytesToWrite,
                                                &dwNumberOfBytesWritten ) );

   if ISBYREF( 4 )
      hb_stornl( ( ULONG ) dwNumberOfBytesWritten, 4 );
}
whtinet.c186
HB_FUNCVWN_INTERNETREADFILE(void)
HB_FUNC( VWN_INTERNETREADFILE )
{
   HINTERNET hFile                    = ( HINTERNET ) HB_PARWH( 1 );
   LPVOID    lpBuffer                 = hb_parcx( 2 );
   DWORD     dwNumberOfBytesToRead    = ( DWORD ) hb_parnl( 3 );
   DWORD     dwNumberOfBytesRead      = ( DWORD ) 0;
   BOOL      bRet;

   bRet = InternetReadFile( hFile, &lpBuffer,
                            dwNumberOfBytesToRead, &dwNumberOfBytesRead );

   hb_retl( bRet );

   if( bRet )
   {
      if ISBYREF( 4 )
      {
         hb_stornl( ( ULONG ) dwNumberOfBytesRead, 4 );
      }
      hb_storclen( ( char * ) lpBuffer, ( ULONG ) dwNumberOfBytesRead, 2 );
   }
}
whtinet.c214
HB_FUNCVWN_FTPCOMMAND(void)
HB_FUNC( VWN_FTPCOMMAND )
{
   HINTERNET hInternet       = ( HINTERNET ) HB_PARWH( 1 );
   BOOL      fExpectResponse = ISNIL( 2 ) ? 0 : hb_parl( 2 );
   DWORD     dwFlags         = ISNIL( 3 ) ? FTP_TRANSFER_TYPE_BINARY : hb_parnl( 3 );
   LPCTSTR   lpszCommand     = hb_parcx( 4 );
   DWORD_PTR dwContext       = ISNIL( 5 ) ? 0 : hb_parnl( 5 );
   HINTERNET phFtpCommand ;

   BOOL      bRet ;

   bRet = FtpCommand( hInternet, fExpectResponse, dwFlags, lpszCommand,
                      dwContext, &phFtpCommand );

   hb_retl( bRet );

   if ( bRet )
   {
      if ( ISBYREF( 6 ) )
         HB_STORWH( phFtpCommand, 6 );
   }
}
whtinet.c251
HB_FUNCVWN_FTPFINDFIRSTFILE(void)
HB_FUNC( VWN_FTPFINDFIRSTFILE )
{
   HINTERNET hInternet              = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszSearchFile         = ISNIL( 2 ) ? TEXT ("*.*") : hb_parcx( 2 );
   WIN32_FIND_DATA FindFileData ;
   DWORD     dwFlags                = ISNIL( 4 ) ? INTERNET_FLAG_NEED_FILE : hb_parnl( 4 );
   DWORD_PTR dwContext              = ISNIL( 5 ) ? 0 : hb_parnl( 5 );
   HINTERNET hResult ;

   hResult = FtpFindFirstFile( hInternet, lpszSearchFile,
                                     &FindFileData, dwFlags, dwContext );

   if ( hResult )
      if ( ISBYREF( 3 ) )
         hb_storclen( (char *) &FindFileData , sizeof( WIN32_FIND_DATA ), 3 );

   HB_RETWH( hResult );
}
whtinet.c287
HB_FUNCVWN_INTERNETFINDNEXTFILE(void)
HB_FUNC( VWN_INTERNETFINDNEXTFILE )
{
   HINTERNET       hFind       = ( HINTERNET ) HB_PARWH( 1 );
   WIN32_FIND_DATA FindFileData ;

   if ( InternetFindNextFile( hFind, &FindFileData ) )
      {
         hb_retl( TRUE );
         if ( ISBYREF( 2 ) )
            hb_storclen( ( char * ) &FindFileData, sizeof( WIN32_FIND_DATA ), 2 );
      }
   else
      hb_retl( FALSE );
}
whtinet.c376
HB_FUNCVWN_FTPGETFILE(void)
HB_FUNC( VWN_FTPGETFILE )
{
   HINTERNET hInternet            = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszRemoteFile       = hb_parcx( 2 );
   LPCTSTR   lpszLocalFile        = hb_parcx( 3 );
   BOOL      fFailIfExist         = ISNIL( 4 ) ? FALSE : hb_parl( 4 );
   DWORD     dwFlagsAndAttributes = ISNIL( 5 ) ? FILE_ATTRIBUTE_NORMAL : hb_parnl( 5 );
   DWORD     dwFlags              = ISNIL( 6 ) ? FTP_TRANSFER_TYPE_BINARY | INTERNET_FLAG_RELOAD : ( DWORD ) hb_parnl( 6 );
   DWORD_PTR dwContext            = ISNIL( 7 ) ? 0 : hb_parnl( 7 );

   hb_retl( FtpGetFile( hInternet, lpszRemoteFile, lpszLocalFile,
                        fFailIfExist, dwFlagsAndAttributes,
                        dwFlags, dwContext ) );
}
whtinet.c399
HB_FUNCVWN_FTPPUTFILE(void)
HB_FUNC( VWN_FTPPUTFILE )
{
   HINTERNET hInternet            = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszLocalFile        = hb_parcx( 2 );
   LPCTSTR   lpszRemoteFile       = hb_parcx( 3 );
   DWORD     dwFlags              = ISNIL( 4 ) ? FTP_TRANSFER_TYPE_BINARY | INTERNET_FLAG_RELOAD : ( DWORD ) hb_parnl( 4 );
   DWORD_PTR dwContext            = ISNIL( 5 ) ? 0 : hb_parnl( 5 );

   hb_retl( FtpPutFile( hInternet, lpszLocalFile, lpszRemoteFile, dwFlags, dwContext ) );
}
whtinet.c431
HB_FUNCVWN_FTPCREATEDIRECTORY(void)
HB_FUNC( VWN_FTPCREATEDIRECTORY )
{
   HINTERNET hInternet     = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszDirectory = hb_parcx( 2 );

   hb_retl( FtpCreateDirectoryA( hInternet, lpszDirectory ) );

}
whtinet.c457
HB_FUNCVWN_FTPREMOVEDIRECTORY(void)
HB_FUNC( VWN_FTPREMOVEDIRECTORY )
{
   HINTERNET hInternet     = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszDirectory = hb_parcx( 2 );

   hb_retl( FtpRemoveDirectoryA( hInternet, lpszDirectory ) );

}
whtinet.c478
HB_FUNCVWN_FTPDELETEFILE(void)
HB_FUNC( VWN_FTPDELETEFILE )
{
   HINTERNET hInternet    = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszFileName = hb_parcx( 2 );

   hb_retl( FtpDeleteFile( hInternet, lpszFileName ) );

}
whtinet.c499
HB_FUNCVWN_FTPRENAMEFILE(void)
HB_FUNC( VWN_FTPRENAMEFILE )
{
   HINTERNET hInternet    = ( HINTERNET ) HB_PARWH( 1 );
   LPCTSTR   lpszExisting = hb_parcx( 2 );
   LPCTSTR   lpszNew      = hb_parcx( 3 );

   hb_retl( FtpRenameFileA( hInternet, lpszExisting, lpszNew ) );

}
whtinet.c520
HB_FUNCVWN_FTPGETCURRENTDIRECTORY(void)
HB_FUNC( VWN_FTPGETCURRENTDIRECTORY )
{
   HINTERNET hInternet           = ( HINTERNET ) HB_PARWH( 1 );
   LPTSTR   lpszCurrentDirectory = ( LPTSTR ) hb_xgrab( MAX_PATH );
   DWORD    dwCurrentDirectory   = MAX_PATH;
   BOOL     bRet;

   bRet = FtpGetCurrentDirectory( hInternet, lpszCurrentDirectory, &dwCurrentDirectory );
   hb_retl( bRet );

   if ( bRet )
   {
      if ( ISBYREF( 2 ) )
         hb_storclen( ( char * ) lpszCurrentDirectory, ( ULONG ) dwCurrentDirectory, 2 );
   }

   hb_xfree( lpszCurrentDirectory );
}
whtinet.c543
HB_FUNCVWN_FTPSETCURRENTDIRECTORY(void)
HB_FUNC( VWN_FTPSETCURRENTDIRECTORY )
{
   HINTERNET hInternet     = ( HINTERNET ) HB_PARWH( 1 );
   LPTSTR    lpszDirectory = hb_parcx( 2 );

   hb_retl( FtpSetCurrentDirectoryA( hInternet, lpszDirectory ) );
}
whtinet.c575
HB_FUNCVWN_INTERNETCLOSEHANDLE(void)
HB_FUNC( VWN_INTERNETCLOSEHANDLE )
{
   HINTERNET hInternet = ( HINTERNET ) HB_PARWH( 1 );

   hb_retl( InternetCloseHandle( hInternet ) );
}
whtinet.c595
HB_FUNCVWN_INTERNETATTEMPTCONNECT(void)
HB_FUNC( VWN_INTERNETATTEMPTCONNECT )
{
   DWORD dwReserved = 0 ;

   hb_retnl( ( ULONG ) InternetAttemptConnect( dwReserved ) );
}
whtinet.c613
whtini.c
TypeFunctionSourceLine
HB_FUNCVWN_GETPROFILESTRING(void)
HB_FUNC( VWN_GETPROFILESTRING )
{
   DWORD nSize = 1024 ;
   LPTSTR bBuffer = (LPTSTR) hb_xgrab( nSize );
   DWORD dwLen ;
   char * lpSection = ISNIL( 1 ) ? NULL : hb_parcx( 1 );
   char * lpEntry   = ISNIL( 2 ) ? NULL : hb_parcx( 2 );
   char * lpDefault = hb_parc ( 3 );

   for( ;; )
   {
      dwLen = GetProfileString( lpSection , lpEntry ,lpDefault , bBuffer, nSize );
      if ( ( ( ( lpSection == NULL ) || ( lpEntry == NULL ) ) && ( nSize - dwLen == 2 ) ) || ( ( lpSection && lpEntry ) && ( nSize - dwLen == 1 ) ) )
      {
        hb_xfree( bBuffer );
        nSize *= 2 ;
        bBuffer = (LPTSTR) hb_xgrab( nSize );
      }
      else
        break ;
   }

   if( dwLen )
     hb_retclen( ( char * ) bBuffer, dwLen );
   else
      hb_retc( lpDefault );

   hb_xfree( bBuffer );

}
whtini.c65
HB_FUNCVWN_GETPRIVATEPROFILESTRING(void)
HB_FUNC( VWN_GETPRIVATEPROFILESTRING )
{
   DWORD nSize = 1024 ;
   LPTSTR bBuffer = (LPTSTR) hb_xgrab( nSize );
   DWORD dwLen ;
   char * lpSection  = ISNIL( 1 ) ? NULL : hb_parcx( 1 );
   char * lpEntry    = ISNIL( 2 ) ? NULL : hb_parcx( 2 );
   char * lpDefault  = hb_parcx( 3 );
   char * lpFileName = hb_parcx( 4 );

   for( ;; )
   {
      dwLen = GetPrivateProfileString( lpSection , lpEntry ,lpDefault , bBuffer, nSize , lpFileName);
      if ( ( ( ( lpSection == NULL ) || ( lpEntry == NULL ) ) && ( nSize - dwLen == 2 ) ) || ( ( lpSection && lpEntry ) && ( nSize - dwLen == 1 ) ) )
      {
        hb_xfree( bBuffer );
        nSize *= 2 ;
        bBuffer = (LPTSTR) hb_xgrab( nSize );
      }
      else
        break ;

   }

   if( dwLen )
     hb_retclen( ( char * ) bBuffer, dwLen );
   else
      hb_retc( lpDefault );

   hb_xfree( bBuffer );

}
whtini.c97
HB_FUNCVWN_WRITEPROFILESTRING(void)
HB_FUNC( VWN_WRITEPROFILESTRING )
{
   char * lpSection = hb_parcx( 1 );
   char * lpEntry = ISCHAR(2) ? hb_parcx( 2 ) : NULL ;
   char * lpData = ISCHAR(3) ? hb_parcx( 3 ) : NULL ;

   if ( WriteProfileString( lpSection , lpEntry , lpData) )
      hb_retl( TRUE );
   else
      hb_retl(FALSE);
}
whtini.c131
HB_FUNCVWN_WRITEPRIVATEPROFILESTRING(void)
HB_FUNC( VWN_WRITEPRIVATEPROFILESTRING )
{
   char * lpSection = hb_parcx( 1 );
   char * lpEntry = ISCHAR(2) ? hb_parcx( 2 ) : NULL ;
   char * lpData = ISCHAR(3) ? hb_parcx( 3 ) : NULL ;
   char * lpFileName= hb_parcx( 4 );

   if ( WritePrivateProfileString( lpSection , lpEntry , lpData , lpFileName ) )
      hb_retl( TRUE );
   else
      hb_retl(FALSE);
}
whtini.c144
HB_FUNCVWN_GETPRIVATEPROFILEINT(void)
HB_FUNC( VWN_GETPRIVATEPROFILEINT )
{
   hb_retni( GetPrivateProfileIntA( (LPCSTR) hb_parcx( 1 ),
                                    (LPCSTR) hb_parcx( 2 ),
                                    hb_parni( 3 )        ,
                                    (LPCSTR) hb_parcx( 4 )
                                    ) );
}
whtini.c163
HB_FUNCVWN_GETPROFILEINT(void)
HB_FUNC( VWN_GETPROFILEINT )
{
   hb_retni( GetProfileIntA( (LPCSTR) hb_parcx( 1 ),
                             (LPCSTR) hb_parcx( 2 ),
                             hb_parni( 3 )
                             ) );
}
whtini.c177
HB_FUNCVWN_WRITEPROFILESECTION(void)
HB_FUNC( VWN_WRITEPROFILESECTION )
{
   hb_retl( WriteProfileSectionA( (LPCSTR) hb_parcx( 1 ), (LPCSTR) hb_parcx( 2 ) ) );
}
whtini.c202
HB_FUNCVWN_WRITEPRIVATEPROFILESECTION(void)
HB_FUNC( VWN_WRITEPRIVATEPROFILESECTION )
{
   hb_retl( WritePrivateProfileSectionA( (LPCSTR) hb_parcx( 1 ),
                                         (LPCSTR) hb_parcx( 2 ),
                                         (LPCSTR) hb_parcx( 3 )
                                         ) );
}

/*
//-----------------------------------------------------------------------------
// WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA( OUT LPSTR lpszReturnBuffer, IN DWORD nSize, IN LPCSTR lpFileName );


HB_FUNC( VWN_GETPRIVATEPROFILESECTIONNAMES )
{
   hb_retnl( (LONG) GetPrivateProfileSectionNames( (LPSTR) hb_parcx( 1 ) ,
                                                    (DWORD) hb_parnl( 2 ),
                                                    (LPCSTR) hb_parcx( 3 )
                                                    ) );
}
*/
//-----------------------------------------------------------------------------
// WINBASEAPI BOOL WINAPI GetPrivateProfileStruct( IN LPCSTR lpszSection, IN LPCSTR lpszKey, OUT LPVOID lpStruct, IN UINT uSizeStruct, IN LPCSTR szFile );

whtini.c226
whtkbrd.c
TypeFunctionSourceLine
HB_FUNCVWN_OEMKEYSCAN(void)
HB_FUNC( VWN_OEMKEYSCAN )
{
   hb_retnl( OemKeyScan( (WORD) hb_parni(1) ) );
}
whtkbrd.c36
HB_FUNCVWN_VKKEYSCAN(void)
HB_FUNC( VWN_VKKEYSCAN )
{
   char *Buffer ;
   Buffer =hb_parcx( 1 );

   hb_retni( VkKeyScan( *Buffer ) );
}
whtkbrd.c45
HB_FUNCVWN_VKKEYSCANEX(void)
HB_FUNC( VWN_VKKEYSCANEX )
{
   char *Buffer ;
   Buffer = hb_parcx( 1 );

   hb_retni( VkKeyScanEx( *Buffer, (HKL) HB_PARWH( 2 ) ) );
}
whtkbrd.c57
HB_FUNCVWN_GETKBCODEPAGE(void)
HB_FUNC( VWN_GETKBCODEPAGE )
{
   hb_retni( GetKBCodePage(  ) );
}
whtkbrd.c69
HB_FUNCVWN_GETKEYSTATE(void)
HB_FUNC( VWN_GETKEYSTATE )
{
   hb_retni( GetKeyState( hb_parni( 1 ) ) );
}
whtkbrd.c78
HB_FUNCVWN_GETASYNCKEYSTATE(void)
HB_FUNC( VWN_GETASYNCKEYSTATE )
{
  hb_retni( GetAsyncKeyState( hb_parni( 1 ) ) );
}
whtkbrd.c87
HB_FUNCVWN_GETKEYBOARDSTATE(void)
HB_FUNC( VWN_GETKEYBOARDSTATE )
{
   BYTE lpKeyState[256] ;

   if ( GetKeyboardState( lpKeyState ))
     hb_retclen( ( char *) lpKeyState, 256 );
}
whtkbrd.c98
HB_FUNCVWN_SETKEYBOARDSTATE(void)
HB_FUNC( VWN_SETKEYBOARDSTATE )
{
   hb_retl( SetKeyboardState( (LPBYTE) hb_parcx(1) ) );
}
whtkbrd.c114
HB_FUNCVWN_GETKEYNAMETEXT(void)
HB_FUNC( VWN_GETKEYNAMETEXT )
{

   char cText[MAX_PATH] ;
   int iRet = GetKeyNameText( hb_parnl( 1 ), cText, MAX_PATH );
   if ( iRet )
     hb_retclen( cText, iRet );

}
whtkbrd.c126
HB_FUNCVWN_GETKEYBOARDTYPE(void)
HB_FUNC( VWN_GETKEYBOARDTYPE )
{
   hb_retni( GetKeyboardType( hb_parni( 1 ) ) );
}
whtkbrd.c141
HB_FUNCVWN_MAPVIRTUALKEY(void)
HB_FUNC( VWN_MAPVIRTUALKEY )
{
   hb_retni( MapVirtualKey( (UINT) hb_parni( 1 ), (UINT) hb_parni( 2 ) ) );
}
whtkbrd.c151
HB_FUNCVWN_MAPVIRTUALKEYEX(void)
HB_FUNC( VWN_MAPVIRTUALKEYEX )
{
   hb_retni( MapVirtualKeyEx( (UINT) hb_parni( 1 ),
                              (UINT) hb_parni( 2 ),
                              (HKL) HB_PARWH( 3 )
                            ) );
}
whtkbrd.c160
HB_FUNCVWN_GETINPUTSTATE(void)
HB_FUNC( VWN_GETINPUTSTATE )
{
   hb_retl( GetInputState(  ) );
}
whtkbrd.c171
HB_FUNCVWN_GETQUEUESTATUS(void)
HB_FUNC( VWN_GETQUEUESTATUS )
{
   hb_retnl( (LONG) GetQueueStatus( (UINT) hb_parni( 1 ) ) );
}
whtkbrd.c180
HB_FUNCVWN_LOADACCELERATORS(void)
HB_FUNC( VWN_LOADACCELERATORS )
{
   HB_RETWH( LoadAccelerators( (HINSTANCE) HB_PARWH( 1 ),
                                      (LPCSTR) hb_parcx( 2 )
                                    ) );
}
whtkbrd.c190
HB_FUNCVWN_CREATEACCELERATORTABLE(void)
HB_FUNC( VWN_CREATEACCELERATORTABLE )
{

   ACCEL * aAccel ;
   INT iCount ;
   INT i ;
   PHB_ITEM aSub ;
   PHB_ITEM aParam ;

   if ( hb_parinfo( 1 ) == HB_IT_ARRAY  )
   {
       iCount = hb_parinfa( 1, 0 );
       aAccel = (ACCEL *) hb_xgrab( iCount*sizeof(ACCEL) );
       aParam = hb_param( 1, HB_IT_ARRAY );
       for ( i= 0 ; i
whtkbrd.c207
HB_FUNCVWN_DESTROYACCELERATORTABLE(void)
HB_FUNC( VWN_DESTROYACCELERATORTABLE )
{
   hb_retl( DestroyAcceleratorTable( (HACCEL) HB_PARWH( 1 ) ) );
}
whtkbrd.c239
HB_FUNCVWN_COPYACCELERATORTABLE(void)
HB_FUNC( VWN_COPYACCELERATORTABLE )
{
   LPACCEL lpAccelDst = NULL;
   int iCount = 0;
   int iRet ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;
   int i ;

   if ( ISARRAY(2) && ((iCount=hb_parinfa(2,0)) > 0 ) )
      lpAccelDst = (LPACCEL) hb_xgrab( iCount * sizeof(ACCEL) );

   iRet = CopyAcceleratorTable( (HACCEL) HB_PARWH( 1 ) ,
                                   (iCount==0 ? NULL : lpAccelDst ) ,
                                   iCount
                              );

   if ( ( iCount > 0 ) && (iRet > 0 ) )
   {
      // read accelerator table elements into a subarrays
      // and store them into the original array elements

      aParam = hb_param( 2, HB_IT_ARRAY );
      aSub = hb_itemArrayNew( 3 );
      for ( i = 0 ; i < iCount ; i++ )
      {
         hb_arraySetNI( aSub, 1, lpAccelDst->fVirt );
         hb_arraySetNI( aSub, 2, lpAccelDst->key   );
         hb_arraySetNI( aSub, 3, lpAccelDst->cmd   );
         hb_arraySet( aParam, i + 1, hb_arrayClone( aSub ) );
      }
      hb_itemRelease( aSub );
   }

   if( iCount > 0 )
      hb_xfree( lpAccelDst );
   hb_retni( iRet );
}
whtkbrd.c253
HB_FUNCVWN_TRANSLATEACCELERATOR(void)
HB_FUNC( VWN_TRANSLATEACCELERATOR )
{
   LPMSG  lpMsg = ( MSG * ) hb_parc( 3 ); //hb_param(3, HB_IT_STRING)->item.asString.value;
   hb_retni( TranslateAccelerator( (HWND) HB_PARWH( 1 )  ,
                                   (HACCEL) HB_PARWH( 2 ),
                                   lpMsg
                                 ) );
}
whtkbrd.c297
whtlv.c
TypeFunctionSourceLine
HB_FUNCVWN_LISTVIEW_DELETEALLITEMS(void)
HB_FUNC( VWN_LISTVIEW_DELETEALLITEMS )
{
   ( void ) ListView_DeleteAllItems( (HWND) HB_PARWH(1) );
}
whtlv.c21
HB_FUNCVWN_LISTVIEW_DELETECOLUMN(void)
HB_FUNC( VWN_LISTVIEW_DELETECOLUMN )
{
   ( void ) ListView_DeleteColumn( (HWND) HB_PARWH(1), (INT) hb_parni(2) );
}
whtlv.c26
HB_FUNCVWN_LISTVIEW_ENSUREVISIBLE(void)
HB_FUNC( VWN_LISTVIEW_ENSUREVISIBLE )
{
   hb_retl(ListView_EnsureVisible( (HWND) HB_PARWH(1), hb_parni(2), hb_parl(3) ));
}
whtlv.c31
HB_FUNCVWN_LISTVIEW_INSERTCOLUMN(void)
HB_FUNC( VWN_LISTVIEW_INSERTCOLUMN )
{
   LV_COLUMN *lvColumn = ( LV_COLUMN *) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value ;
   ( void ) ListView_InsertColumn( (HWND)HB_PARWH(1), hb_parni(2), lvColumn );
}
whtlv.c36
HB_FUNCVWN_LISTVIEW_SETITEMCOUNT(void)
HB_FUNC( VWN_LISTVIEW_SETITEMCOUNT )
{
   ListView_SetItemCount( (HWND) HB_PARWH(1), hb_parnl(2) );
}
whtlv.c42
HB_FUNCVWN_LISTVIEW_GETNEXTITEM(void)
HB_FUNC( VWN_LISTVIEW_GETNEXTITEM )
{
   hb_retni( ListView_GetNextItem( (HWND) HB_PARWH(1), hb_parni(2), hb_parnl(3) ));
}
whtlv.c47
HB_FUNCVWN_LISTVIEWNOTIFY(void)
HB_FUNC( VWN_LISTVIEWNOTIFY )
{
   static PHB_DYNS pSymTest = 0 ;

   LPARAM lParam = (LPARAM) hb_parnint(2);
   LPNMHDR lpnmh = (LPNMHDR) lParam;
   LPCSTR cRet;
   PHB_ITEM pArray;
   PHB_ITEM DArray;
   LPSTR cAlias;
   switch(lpnmh->code)
   {
   case LVN_GETDISPINFO:
      {
      LV_DISPINFO *lpdi = (LV_DISPINFO *)lParam;
      // TCHAR szString[MAX_PATH];
      if(lpdi->item.iSubItem)
         {
         if(lpdi->item.mask & LVIF_TEXT)
            {
            if ( !pSymTest )
               pSymTest = hb_dynsymFind( "_WINLVGETDBINFO" );
            if ( pSymTest )
               {
               pArray = hb_param( 3, HB_IT_ARRAY );
               DArray = hb_param( 4, HB_IT_ARRAY );
               cAlias = hb_parcx(5);
               hb_vmPush( pSymTest ); //pSymTest->pSymbol );
               hb_vmPushNil();
               hb_vmPushLong( (LONG) lpdi->item.iItem );
               hb_vmPushLong( (LONG) lpdi->item.iSubItem );
               hb_vmPush( pArray );
               hb_vmPush( DArray );
               hb_vmPushString( cAlias,strlen(cAlias) );
               hb_vmPushInteger( hb_parni(6) );
               hb_vmDo( 6 );
               cRet=hb_itemGetC( hb_param( -1, HB_IT_ANY ) );
               lstrcpy(lpdi->item.pszText, cRet);
               }
            }
         }
      else
         {
         if(lpdi->item.mask & LVIF_TEXT)
            {
            if ( !pSymTest )
               pSymTest = hb_dynsymFind( "_WINLVGETDBINFO" );
            if ( pSymTest )
               {
               pArray = hb_param( 3, HB_IT_ARRAY );
               DArray = hb_param( 4, HB_IT_ARRAY );
               cAlias = hb_parcx(5);
               hb_vmPush( pSymTest ); //pSymTest->pSymbol );
               hb_vmPushNil();
               hb_vmPushLong( (LONG) lpdi->item.iItem );
               hb_vmPushLong( (LONG) lpdi->item.iSubItem );
               hb_vmPush( pArray );
               hb_vmPush( DArray );
               hb_vmPushString( cAlias,strlen(cAlias) );
               hb_vmPushInteger( hb_parni(6) );
               hb_vmDo( 6 );
               cRet=hb_itemGetC( hb_param( -1, HB_IT_ANY ) );
               lstrcpy(lpdi->item.pszText, cRet);
               }
            }
         if(lpdi->item.mask & LVIF_IMAGE)
            {
            lpdi->item.iImage = lpdi->item.iItem;
            }
         }
      }
      hb_retni(0);
   }
hb_retni(0);
}
whtlv.c52
whtmain.c
TypeFunctionSourceLine
HB_FUNCVWN_HINSTANCE(void)
HB_FUNC( VWN_HINSTANCE )
{
   HANDLE hInstance;

   hb_winmainArgGet( &hInstance, NULL, NULL );

   HB_RETWH( hInstance );
}
whtmain.c61
HB_FUNCVWN_HPREVINSTANCE(void)
HB_FUNC( VWN_HPREVINSTANCE )
{
   HANDLE hPrevInstance;

   hb_winmainArgGet( NULL, &hPrevInstance, NULL );

   HB_RETWH( hPrevInstance );
}
whtmain.c71
HB_FUNCVWN_NCMDSHOW(void)
HB_FUNC( VWN_NCMDSHOW )
{
   int iCmdShow;

   hb_winmainArgGet( NULL, NULL, &iCmdShow );

   hb_retni( iCmdShow );
}
whtmain.c80
whtmapi.c
TypeFunctionSourceLine
HB_FUNCVWN_MAPISENDMAIL(void)
HB_FUNC( VWN_MAPISENDMAIL )
{
   MapiRecipDesc orig;
   MapiRecipDesc rcpt;
   MapiFileDesc  file;
   MapiMessage   mssg;

   orig.ulReserved         = 0            ;  // Reserved
   orig.ulRecipClass       = MAPI_ORIG    ;  // Reciepient Class MAPI_TO MAPI_CC MAPI_BCC
   orig.lpszName           = hb_parcx( 4 );  // Originator's Name
   orig.lpszAddress        = hb_parcx( 5 );  // Originators Address
   orig.ulEIDSize          = 0            ;  // Count in bytes of size of pEntryID
   orig.lpEntryID          = NULL         ;  // System-specific Originator reference

   rcpt.ulReserved         = 0            ;  // Reserved
   rcpt.ulRecipClass       = MAPI_TO      ;  // Reciepient Class MAPI_TO MAPI_CC MAPI_BCC
   rcpt.lpszName           = hb_parcx( 6 );  // Reciepient's Name, e.g., vouchcac@hotmail.com
   rcpt.lpszAddress        = hb_parcx( 7 );  // Reciepient's Address
   rcpt.ulEIDSize          = 0            ;  // Count in bytes of size of pEntryID
   rcpt.lpEntryID          = 0            ;  // System-specific Recipient reference

   file.ulReserved         = 0            ;  // Reserved for future usage
   file.flFlags            = 0            ;  // Flags ?
   file.nPosition          = ( ULONG ) -1  ;  // Character of text to be replaced by attachment
   file.lpszPathName       = hb_parcx( 8 );  // Full Path Name with Extension of the attached file
   file.lpszFileName       = NULL         ;  // Original File Name ( optional )
   file.lpFileType         = NULL         ;  // Attachment file type ( can be lpMapiFileTagExt )

   mssg.ulReserved         = 0            ;  // Reserved
   mssg.lpszSubject        = hb_parcx( 2 );  // Message Subject
   mssg.lpszNoteText       = hb_parcx( 3 );  // Message Text
   mssg.lpszMessageType    = NULL         ;  // Message Class
   mssg.lpszDateReceived   = NULL         ;  // in yyyy/mm/dd hh:mm format
   mssg.lpszConversationID = NULL         ;  // Conversation thread ID
   mssg.flFlags            = 0            ;  // unread, return receipt
   mssg.lpOriginator       = &orig        ;  // Originator's descriptor
   mssg.nRecipCount        = 1            ;  // Number of receipients
   mssg.lpRecips           = &rcpt        ;  // Recipient descriptors
   mssg.nFileCount         = 1            ;  // Number of file attachments
   mssg.lpFiles            = &file        ;  // Attachment descriptors

   // to send the mail direcly and without intervenstion
   hb_retnl( (ULONG) MAPISendMail( 0, 0, &mssg, 0, 0 ) );

   // to open default mail client's dialog box
   // hb_retnl( (ULONG) MAPISendMail( 0, 0, &mssg, 8, 0 ) );
}
whtmapi.c23
whtmem.c
TypeFunctionSourceLine
HB_FUNCVWN_GLOBALALLOC(void)
HB_FUNC( VWN_GLOBALALLOC )
{
   HB_RETWH( GlobalAlloc( (UINT) hb_parni( 1 ),(SIZE_T) hb_parnl(2) ) );
}
whtmem.c25
HB_FUNCVWN_GLOBALREALLOC(void)
HB_FUNC( VWN_GLOBALREALLOC )
{

   HB_RETWH( GlobalReAlloc( (HGLOBAL) HB_PARWH( 1 ),
                                   (SIZE_T) hb_parnl( 2 )   ,
                                   (UINT) hb_parni( 3 )
                                   ) );
}
whtmem.c34
HB_FUNCVWN_GLOBALSIZE(void)
HB_FUNC( VWN_GLOBALSIZE )
{
   hb_retnl( (LONG) GlobalSize( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c46
HB_FUNCVWN_GLOBALFLAGS(void)
HB_FUNC( VWN_GLOBALFLAGS )
{
   hb_retni( (UINT) GlobalFlags( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c54
HB_FUNCVWN_GLOBALLOCK(void)
HB_FUNC( VWN_GLOBALLOCK )
{
   HB_RETWH( GlobalLock( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c63
HB_FUNCVWN_GLOBALHANDLE(void)
HB_FUNC( VWN_GLOBALHANDLE )
{
   HB_RETWH( GlobalHandle( (LPCVOID) HB_PARWH(1) ) );
}
whtmem.c71
HB_FUNCVWN_GLOBALUNLOCK(void)
HB_FUNC( VWN_GLOBALUNLOCK )
{
   hb_retl( GlobalUnlock( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c81
HB_FUNCVWN_GLOBALFREE(void)
HB_FUNC( VWN_GLOBALFREE )
{
   HB_RETWH( GlobalFree( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c91
HB_FUNCVWN_GLOBALCOMPACT(void)
HB_FUNC( VWN_GLOBALCOMPACT )
{
// (SIZE_T) GlobalCompact( (DWORD) hb_parnl( 1 ) ) );
}
whtmem.c102
HB_FUNCVWN_GLOBALFIX(void)
HB_FUNC( VWN_GLOBALFIX )
{
   GlobalFix( (HGLOBAL) HB_PARWH( 1 ) );
}
whtmem.c112
HB_FUNCVWN_GLOBALUNFIX(void)
HB_FUNC( VWN_GLOBALUNFIX )
{
   GlobalUnfix( (HGLOBAL) HB_PARWH( 1 ) );
}
whtmem.c122
HB_FUNCVWN_GLOBALWIRE(void)
HB_FUNC( VWN_GLOBALWIRE )
{
   HB_RETWH( GlobalWire( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtmem.c132
HB_FUNCVWN_GLOBALUNWIRE(void)
HB_FUNC( VWN_GLOBALUNWIRE )
{
   hb_retl( GlobalUnWire( (HGLOBAL) HB_PARWH( 1 ) ) );
}

//-----------------------------------------------------------------------------
// WINBASEAPI VOID WINAPI GlobalMemoryStatus( IN OUT LPMEMORYSTATUS lpBuffer );


// T.B.D.


whtmem.c142
HB_FUNCVWN_LOCALALLOC(void)
HB_FUNC( VWN_LOCALALLOC )
{
   HB_RETWH( LocalAlloc( (UINT) hb_parni( 1 ), (SIZE_T) hb_parni( 2 ) ) );
}
whtmem.c190
HB_FUNCVWN_LOCALREALLOC(void)
HB_FUNC( VWN_LOCALREALLOC )
{

   HB_RETWH( LocalReAlloc( (HLOCAL) HB_PARWH( 1 ),
                                  (SIZE_T) hb_parni( 2 )         ,
                                  (UINT) hb_parni( 3 )
                                  ) );
}
whtmem.c199
HB_FUNCVWN_LOCALLOCK(void)
HB_FUNC( VWN_LOCALLOCK )
{
   HB_RETWH( LocalLock( (HLOCAL) HB_PARWH( 1 ) ) );
}
whtmem.c213
HB_FUNCVWN_LOCALHANDLE(void)
HB_FUNC( VWN_LOCALHANDLE )
{
   HB_RETWH( LocalHandle( (LPCVOID) HB_PARWH(1) ) );
}
whtmem.c222
HB_FUNCVWN_LOCALUNLOCK(void)
HB_FUNC( VWN_LOCALUNLOCK )
{
   hb_retl( LocalUnlock( (HLOCAL) HB_PARWH( 1 ) ) );
}
whtmem.c232
HB_FUNCVWN_LOCALSIZE(void)
HB_FUNC( VWN_LOCALSIZE )
{
   hb_retni( LocalSize( (HLOCAL) HB_PARWH( 1 ) ) );
}
whtmem.c241
HB_FUNCVWN_LOCALFLAGS(void)
HB_FUNC( VWN_LOCALFLAGS )
{
   hb_retni( LocalFlags( (HLOCAL) HB_PARWH( 1 ) ) );
}
whtmem.c250
HB_FUNCVWN_LOCALFREE(void)
HB_FUNC( VWN_LOCALFREE )
{
   HB_RETWH( LocalFree( (HLOCAL) HB_PARWH( 1 ) ) );
}
whtmem.c259
HB_FUNCVWN_LOCALSHRINK(void)
HB_FUNC( VWN_LOCALSHRINK )
{
   hb_retni( LocalShrink( (HLOCAL) HB_PARWH( 1 ), (UINT) hb_parni( 2 ) ) );
}
whtmem.c268
HB_FUNCVWN_LOCALCOMPACT(void)
HB_FUNC( VWN_LOCALCOMPACT )
{
   hb_retni( LocalCompact( (UINT) hb_parni( 1 ) ) );
}
whtmem.c277
whtmenu.c
TypeFunctionSourceLine
HB_FUNCVWN_APPENDMENU(void)
HB_FUNC( VWN_APPENDMENU )
{
  hb_retl( AppendMenu( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3), hb_parcx(4)) );
}
whtmenu.c25
HB_FUNCVWN_CHECKMENUITEM(void)
HB_FUNC( VWN_CHECKMENUITEM )
{
  hb_retnl( CheckMenuItem((HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3)) );
}
whtmenu.c33
HB_FUNCVWN_CREATEMENU(void)
HB_FUNC( VWN_CREATEMENU )
{
  HB_RETWH( CreateMenu() );
}
whtmenu.c40
HB_FUNCVWN_CREATEPOPUPMENU(void)
HB_FUNC( VWN_CREATEPOPUPMENU )
{
  HB_RETWH( CreatePopupMenu() );
}
whtmenu.c47
HB_FUNCVWN_DELETEMENU(void)
HB_FUNC( VWN_DELETEMENU )
{
  hb_retl( DeleteMenu( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3) ) );
}

//-----------------------------------------------------------------------------

HB_FUNC( VWN_DESTROYMENU )
whtmenu.c54
HB_FUNCVWN_DESTROYMENU(void)
{
  hb_retl( DestroyMenu( (HMENU) HB_PARWH(1) ) );
}

//-----------------------------------------------------------------------------

HB_FUNC( VWN_GETMENU )
whtmenu.c63
HB_FUNCVWN_GETMENU(void)
{
  HB_RETWH( GetMenu( (HWND) HB_PARWH(1) ) );
}
whtmenu.c71
HB_FUNCVWN_GETMENUITEMID(void)
HB_FUNC( VWN_GETMENUITEMID )
{
   hb_retni( GetMenuItemID(
                            (HMENU) HB_PARWH( 1 ),  // handle to menu
                            (int) hb_parni( 2 )     // position of menu item
                          ) );
}
whtmenu.c77
HB_FUNCVWN_DRAWMENUBAR(void)
HB_FUNC( VWN_DRAWMENUBAR )
{
  hb_retl( DrawMenuBar( (HWND) HB_PARWH(1)));
}
whtmenu.c87
HB_FUNCVWN_ENABLEMENUITEM(void)
HB_FUNC( VWN_ENABLEMENUITEM )
{
  hb_retl( EnableMenuItem( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3) ) );
}
whtmenu.c94
HB_FUNCVWN_GETMENUSTATE(void)
HB_FUNC( VWN_GETMENUSTATE )
{
  hb_retni( GetMenuState( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3)) );
}
whtmenu.c101
HB_FUNCVWN_GETMENUSTRING(void)
HB_FUNC( VWN_GETMENUSTRING )
{
   char cText[MAX_PATH+1] ={0};

   GetMenuString( (HMENU) HB_PARWH(1), hb_parni(2),(LPSTR) cText, MAX_PATH, hb_parni(3) );

   hb_retc( cText );

}
whtmenu.c108
HB_FUNCVWN_HILITEMENUITEM(void)
HB_FUNC( VWN_HILITEMENUITEM )
{
  hb_retl( HiliteMenuItem( (HWND) HB_PARWH(1), (HMENU) HB_PARWH(2), hb_parni(3), hb_parni(4)) );
}
whtmenu.c120
HB_FUNCVWN_INSERTMENU(void)
HB_FUNC( VWN_INSERTMENU )
{
  hb_retl( InsertMenu( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3), hb_parni(4), hb_parcx(5)) );
}
whtmenu.c127
HB_FUNCVWN_SETMENUITEMBITMAPS(void)
HB_FUNC( VWN_SETMENUITEMBITMAPS )
{
  hb_retl( SetMenuItemBitmaps( (HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3), (HBITMAP) HB_PARWH(4), (HBITMAP)  HB_PARWH(5)) );
}
whtmenu.c134
HB_FUNCVWN_GETMENUITEMCOUNT(void)
HB_FUNC( VWN_GETMENUITEMCOUNT )
{
  hb_retni( GetMenuItemCount( (HMENU) HB_PARWH(1) ));
}
whtmenu.c141
HB_FUNCVWN_SETMENU(void)
HB_FUNC( VWN_SETMENU )
{
  hb_retl( SetMenu ((HWND) HB_PARWH(1), (HMENU) HB_PARWH(2) ) );
}
whtmenu.c148
HB_FUNCVWN_GETSUBMENU(void)
HB_FUNC( VWN_GETSUBMENU )
{
  HB_RETWH( GetSubMenu( (HMENU) HB_PARWH(1), hb_parni(2)) );
}
whtmenu.c155
HB_FUNCVWN_TRACKPOPUPMENU(void)
HB_FUNC( VWN_TRACKPOPUPMENU )
{
 RECT rc ;

 if (!ISNIL(7)) {
   rc.left   = hb_parni(7,1);
   rc.top    = hb_parni(7,2);
   rc.right  = hb_parni(7,3);
   rc.bottom = hb_parni(7,4);
 }
 hb_retnl( TrackPopupMenu((HMENU) HB_PARWH(1), hb_parni(2), hb_parni(3), hb_parni(4),
                         hb_parni(5), (HWND) HB_PARWH(6), (ISNIL(7) ? NULL : &rc) ) );
}
whtmenu.c162
HB_FUNCVWN_GETSYSTEMMENU(void)
HB_FUNC( VWN_GETSYSTEMMENU )
{
  HB_RETWH( GetSystemMenu( (HWND) HB_PARWH(1), hb_parl(2) ) );
}
whtmenu.c178
HB_FUNCVWN_LOADMENU(void)
HB_FUNC( VWN_LOADMENU )
{
   HB_RETWH( LoadMenu( (HINSTANCE) HB_PARWH( 1 ), (LPCSTR) hb_parcx( 2 ) ) );
}
whtmenu.c188
HB_FUNCVWN_LOADMENUINDIRECT(void)
HB_FUNC( VWN_LOADMENUINDIRECT )
{
   MENUTEMPLATE *mt =(MENUTEMPLATE * ) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;

   HB_RETWH( LoadMenuIndirect( mt ) );
}
whtmenu.c198
HB_FUNCVWN_CHANGEMENU(void)
HB_FUNC( VWN_CHANGEMENU )
{
   hb_retl( ChangeMenu( (HMENU) HB_PARWH( 1 ),
                        (UINT) hb_parni( 2 ) ,
                        (LPCSTR) hb_parcx( 3 ),
                        (UINT) hb_parni( 4 ) ,
                        (UINT) hb_parni( 5 )
                      ) );
}
whtmenu.c209
HB_FUNCVWN_REMOVEMENU(void)
HB_FUNC( VWN_REMOVEMENU )
{
   hb_retl( RemoveMenu( (HMENU) HB_PARWH( 1 ),
                        (UINT) hb_parni( 2 ) ,
                        (UINT) hb_parni( 3 )
                      ) );
}
whtmenu.c223
HB_FUNCVWN_GETMENUCHECKMARKDIMENSIONS(void)
HB_FUNC( VWN_GETMENUCHECKMARKDIMENSIONS )
{
   hb_retnl( (LONG) GetMenuCheckMarkDimensions(  ) );
}



//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI ModifyMenuA( IN HMENU hMnu, IN UINT uPosition, IN UINT uFlags, IN UINT_PTR uIDNewItem, IN LPCSTR lpNewItem );

/*

HB_FUNC( VWN_MODIFYMENU )
{
   UINT_PTR uIDNewItem ;

   // Your code goes here

   hb_retl( ModifyMenu( (HMENU) HB_PARWH( 1 ),
                        (UINT) hb_parni( 2 ) ,
                        (UINT) hb_parni( 3 ) ,
                        uIDNewItem           ,
                        (LPCSTR) hb_parcx( 5 )
                      ) );
}

*/




//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI GetMenuInfo( IN HMENU, OUT LPMENUINFO);

whtmenu.c236
HB_FUNCVWN_ENDMENU(void)
HB_FUNC( VWN_ENDMENU )
{
   hb_retl( EndMenu() );
}
whtmenu.c300
HB_FUNCVWN_INSERTMENUITEM(void)
HB_FUNC( VWN_INSERTMENUITEM )
{
   LPCMENUITEMINFOA lpcmenuitemInfoa =(LPCMENUITEMINFOA) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value;

   hb_retl( InsertMenuItem( (HMENU) HB_PARWH( 1 ),
                            (UINT) hb_parni( 2 ) ,
                            hb_parl( 3 )         ,
                            lpcmenuitemInfoa
                          ) );
}
whtmenu.c310
HB_FUNCVWN_GETMENUITEMINFO(void)
HB_FUNC( VWN_GETMENUITEMINFO )
{
   LPCMENUITEMINFOA lpcmenuitemInfoa =(LPCMENUITEMINFOA) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value;
   hb_retl( GetMenuItemInfo( (HMENU) HB_PARWH( 1 ),
                             (UINT) hb_parni( 2 ) ,
                             hb_parl( 3 )         ,
                             ( struct tagMENUITEMINFOA * ) lpcmenuitemInfoa
                           ) );
}
whtmenu.c328
HB_FUNCVWN_SETMENUITEMINFO(void)
HB_FUNC( VWN_SETMENUITEMINFO )
{
   LPCMENUITEMINFOA lpcmenuitemInfoa =(LPCMENUITEMINFOA) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value;
   hb_retl( SetMenuItemInfo( (HMENU) HB_PARWH( 1 ),
                             (UINT) hb_parni( 2 ) ,
                             hb_parl( 3 )         ,
                             lpcmenuitemInfoa
                           ) );
}
whtmenu.c345
HB_FUNCVWN_CHECKMENURADIOITEM(void)
HB_FUNC( VWN_CHECKMENURADIOITEM )
{
  hb_retl( CheckMenuRadioItem( (HMENU) HB_PARWH( 1 ), (UINT) hb_parni(2),
                               (UINT) hb_parni(3), (UINT) hb_parni(4), (UINT) hb_parni(5) ) );
}
whtmenu.c386
HB_FUNCVWN_ISMENU(void)
HB_FUNC( VWN_ISMENU )
{
   hb_retl( IsMenu((HMENU) HB_PARWH(1) ) );
}
whtmenu.c392
whtmeta.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATEMETAFILE(void)
HB_FUNC( VWN_CREATEMETAFILE )
{
   HB_RETWH( CreateMetaFile( (LPCSTR) hb_parcx( 1 ) ) );
}
whtmeta.c43
HB_FUNCVWN_COPYMETAFILE(void)
HB_FUNC( VWN_COPYMETAFILE )
{
   HB_RETWH( CopyMetaFile( (HMETAFILE) HB_PARWH( 1 ),
                                   (LPCSTR) hb_parcx( 2 )
                                   ) );
}
whtmeta.c52
HB_FUNCVWN_CLOSEMETAFILE(void)
HB_FUNC( VWN_CLOSEMETAFILE )
{
   HB_RETWH( CloseMetaFile( (HDC) HB_PARWH( 1 ) ) );
}
whtmeta.c63
HB_FUNCVWN_DELETEMETAFILE(void)
HB_FUNC( VWN_DELETEMETAFILE )
{
   hb_retl( DeleteMetaFile( (HMETAFILE) HB_PARWH( 1 ) ) );
}
whtmeta.c73
HB_FUNCVWN_GETMETAFILE(void)
HB_FUNC( VWN_GETMETAFILE )
{
   HB_RETWH( GetMetaFile( (LPCSTR) hb_parcx( 1 ) ) );
}
whtmeta.c83
HB_FUNCVWN_PLAYMETAFILE(void)
HB_FUNC( VWN_PLAYMETAFILE )
{
   hb_retl( PlayMetaFile( (HDC) HB_PARWH( 1 ), (HMETAFILE) HB_PARWH( 2 ) ) );
}


//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI GetMetaFileBitsEx( IN HMETAFILE, IN UINT, OUT LPVOID);

/*

HB_FUNC( VWN_GETMETAFILEBITSEX )
{
   LPVOID    lpVoid    ;

   // Your code goes here

   hb_retni( GetMetaFileBitsEx( (HMETAFILE) HB_PARWH( 1 ),
                                (UINT) hb_parni( 2 )     ,
                                lpVoid
                                ) );
}

*/



//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI EnumMetaFile( IN HDC, IN HMETAFILE, IN MFENUMPROC, IN LPARAM);

whtmeta.c97
HB_FUNCVWN_CREATEENHMETAFILE(void)
HB_FUNC( VWN_CREATEENHMETAFILE )
{
   RECT rc ;

   if ( ISARRAY(3) && Array2Rect( hb_param(3,HB_IT_ARRAY), &rc ))
      HB_RETWH( CreateEnhMetaFile( (HDC) HB_PARWH( 1 )  ,
                                           (LPCSTR) hb_parcx( 2 ),
                                           &rc                  ,
                                           ISNIL(4) ? NULL : (LPCSTR) hb_parcx( 4 )
                                        ) );


}
whtmeta.c172
HB_FUNCVWN_GETENHMETAFILE(void)
HB_FUNC( VWN_GETENHMETAFILE )
{
   HB_RETWH( GetEnhMetaFile( (LPCSTR) hb_parcx( 1 ) ) );
}
whtmeta.c190
HB_FUNCVWN_GETMETARGN(void)
HB_FUNC( VWN_GETMETARGN )
{
   hb_retni( GetMetaRgn( (HDC) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtmeta.c199
HB_FUNCVWN_SETMETARGN(void)
HB_FUNC( VWN_SETMETARGN )
{
   hb_retni( SetMetaRgn( (HDC) HB_PARWH( 1 ) ) );
}
whtmeta.c209
HB_FUNCVWN_CLOSEENHMETAFILE(void)
HB_FUNC( VWN_CLOSEENHMETAFILE )
{
   HB_RETWH( CloseEnhMetaFile( (HDC) HB_PARWH(1) ) );
}
whtmeta.c217
HB_FUNCVWN_DELETEENHMETAFILE(void)
HB_FUNC( VWN_DELETEENHMETAFILE )
{
   hb_retl( DeleteEnhMetaFile( (HENHMETAFILE) HB_PARWH( 1 ) ) );
}
whtmeta.c228
HB_FUNCVWN_PLAYENHMETAFILE(void)
HB_FUNC( VWN_PLAYENHMETAFILE )
{
   RECT  rc ;

   if ( ISARRAY(3) && Array2Rect( hb_param(3,HB_IT_ARRAY), &rc ))
      hb_retl( PlayEnhMetaFile( (HDC) HB_PARWH( 1 )         ,
                                (HENHMETAFILE) HB_PARWH( 2 ),
                                &rc
                             ) );
}
whtmeta.c238
HB_FUNCVWN_COPYENHMETAFILEA(void)
HB_FUNC( VWN_COPYENHMETAFILEA )
{
   HB_RETWH( CopyEnhMetaFileA( (HENHMETAFILE) HB_PARWH( 1 ),
                                      (LPCSTR) hb_parcx( 2 )
                                      ) );
}
whtmeta.c254
HB_FUNCVWN_GETWINMETAFILEBITS(void)
HB_FUNC( VWN_GETWINMETAFILEBITS )
{
   BYTE  *Buffer ;

   UINT nBytes ;

   nBytes = GetWinMetaFileBits( (HENHMETAFILE) HB_PARWH( 1 ),
                                 0 , NULL, hb_parni( 2 ), (HDC) HB_PARWH( 3 ) );

   if ( nBytes )
   {
       Buffer = (BYTE *) hb_xgrab( nBytes);

       if ( GetWinMetaFileBits( (HENHMETAFILE) HB_PARWH( 1 ) ,
                                 nBytes  , Buffer            ,
                                 hb_parni( 2 )               ,
                                 (HDC) HB_PARWH( 3 )
                                 ) )
           hb_retclen( ( char *)Buffer, nBytes );

       hb_xfree(Buffer);

   }
}
whtmeta.c268
HB_FUNCVWN_GETENHMETAFILEDESCRIPTION(void)
HB_FUNC( VWN_GETENHMETAFILEDESCRIPTION )
{
   hb_retni( GetEnhMetaFileDescription( (HENHMETAFILE) HB_PARWH( 1 ),
                                         (UINT) hb_parni( 2 )        ,
                                         (LPSTR) hb_parcx( 3 )
                                         ) );
}


//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI PlayMetaFileRecord( IN HDC, IN LPHANDLETABLE, IN LPMETARECORD, IN UINT);

/*

HB_FUNC( VWN_PLAYMETAFILERECORD )
{
   LPHANDLETABLE lpHandleTable ;
   LPMETARECORD  lpMetaRecord  ;

   // Your code goes here

   hb_retl( PlayMetaFileRecord( (HDC) HB_PARWH( 1 ) ,
                                lpHandleTable       ,
                                lpMetaRecord        ,
                                (UINT) hb_parni( 4 )
                                ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI HENHMETAFILE WINAPI SetEnhMetaFileBits( IN UINT, IN CONST BYTE *);

/*

HB_FUNC( VWN_SETENHMETAFILEBITS )
{
   CONST BYTE ;

   // Your code goes here

   HB_RETWH( SetEnhMetaFileBits( (UINT) hb_parni( 1 ), &BYTE ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI HENHMETAFILE WINAPI SetWinMetaFileBits( IN UINT, IN CONST BYTE *, IN HDC, IN CONST METAFILEPICT *);

/*

HB_FUNC( VWN_SETWINMETAFILEBITS )
{
   CONST BYTE         ;
   CONST METAFILEPICT ;

   // Your code goes here

   HB_RETWH( SetWinMetaFileBits( (UINT) hb_parni( 1 ),
                                        &BYTE               ,
                                        (HDC) HB_PARWH( 3 ) ,
                                        &&METAFILEPICT
                                        ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI EnumEnhMetaFile( IN HDC, IN HENHMETAFILE, IN ENHMFENUMPROC, IN LPVOID, IN CONST RECT *);

/*

HB_FUNC( VWN_ENUMENHMETAFILE )
{
   ENHMFENUMPROC enhmfEnumProc ;
   LPVOID        lpVoid        ;


   RECT  rc ;

   if ( ISARRAY(5) && Array2Rect( hb_param(5,HB_IT_ARRAY), &rc ))

   hb_retl( EnumEnhMetaFile( (HDC) HB_PARWH( 1 )         ,
                             (HENHMETAFILE) HB_PARWH( 2 ),
                             enhmfEnumProc               ,
                             lpVoid                      ,
                             &rc
                             ) );
}

*/







//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI GetEnhMetaFileBits( IN HENHMETAFILE, IN UINT, OUT LPBYTE);

/*

HB_FUNC( VWN_GETENHMETAFILEBITS )
{
   LPBYTE       lpByte       ;

   // Your code goes here

   hb_retni( GetEnhMetaFileBits( (HENHMETAFILE) HB_PARWH( 1 ),
                                 (UINT) hb_parni( 2 )        ,
                                 lpByte
                                 ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI GetEnhMetaFileHeader( IN HENHMETAFILE, IN UINT, OUT LPENHMETAHEADER );

/*

HB_FUNC( VWN_GETENHMETAFILEHEADER )
{
   LPENHMETAHEADER lPenhMetaHeader ;

   // Your code goes here

   hb_retni( GetEnhMetaFileHeader( (HENHMETAFILE) HB_PARWH( 1 ),
                                   (UINT) hb_parni( 2 )        ,
                                   lPenhMetaHeader
                                   ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI UINT WINAPI GetEnhMetaFilePaletteEntries( IN HENHMETAFILE, IN UINT, OUT LPPALETTEENTRY );

whtmeta.c319
whtmisc.c
TypeFunctionSourceLine
HB_FUNCWHT_STR2PTR(void)
HB_FUNC( WHT_STR2PTR )
{
   char *cStr = hb_parcx( 1 );
   HB_RETWI( cStr );
}
whtmisc.c29
HB_FUNCWHT_PEEKW(void)
HB_FUNC( WHT_PEEKW )
{
   hb_retni( ( int ) ( * ( LPWORD ) HB_PARWI( 1 ) ) );
}
whtmisc.c37
HB_FUNCWHT_PEEKL(void)
HB_FUNC( WHT_PEEKL )
{
   hb_retnl( ( long ) ( * (LPDWORD) HB_PARWI( 1 ) ) );
}
whtmisc.c44
HB_FUNCWHT_PEEKB(void)
HB_FUNC( WHT_PEEKB )
{
   hb_retni( ( int ) ( * ( LPBYTE ) HB_PARWI( 1 ) ) );
}
whtmisc.c51
HB_FUNCWHT_POKEW(void)
HB_FUNC( WHT_POKEW )
{
   * ( LPWORD ) HB_PARWI( 1 ) = (WORD) hb_parni( 2 );
}
whtmisc.c58
HB_FUNCWHT_POKEL(void)
HB_FUNC( WHT_POKEL )
{
   * ( LPLONG ) HB_PARWI( 1 ) = (DWORD) hb_parnl( 2 );
}
whtmisc.c65
HB_FUNCWHT_POKEB(void)
HB_FUNC( WHT_POKEB )
{
   * ( LPBYTE ) HB_PARWI( 1 ) = ( BYTE ) hb_parni( 2 );
}
whtmisc.c73
HB_FUNCWHT_PEEK(void)
HB_FUNC( WHT_PEEK )
{
 if ( hb_pcount()==2 )
    hb_retclen( (char *) HB_PARWI( 1 ), hb_parnl( 2 ) );
 else
    hb_retc( (char *) HB_PARWI( 1 ) );
}
whtmisc.c82
HB_FUNCWHT_POKE(void)
HB_FUNC( WHT_POKE )
{
   hb_xmemcpy( (char *) HB_PARWI(1), hb_parcx( 2 ), hb_pcount() == 3 ? ( ULONG ) hb_parnl( 3 ) : ( ULONG ) hb_parclen( 2 ) );
}
whtmisc.c93
HB_FUNCWHT_D2BIN(void)
HB_FUNC( WHT_D2BIN )
{
   BYTE  *Buffer;
   Buffer = (BYTE *) hb_xgrab( sizeof(double) );

   *( (double *) ( Buffer ) ) = ( double ) hb_parnd( 1 );
   hb_retclen( ( char *)Buffer, sizeof(double) );
   hb_xfree(Buffer);
}
whtmisc.c100
HB_FUNCWHT_F2BIN(void)
HB_FUNC( WHT_F2BIN )
{
   BYTE  *Buffer;
   Buffer = (BYTE *) hb_xgrab( sizeof(float) );

   *( ( float *) ( Buffer ) ) = (float) hb_parnd( 1 );

   hb_retclen( ( char *)Buffer,sizeof(float) );
   hb_xfree(Buffer);

}
whtmisc.c112
HB_FUNCWHT_BIN2D(void)
HB_FUNC( WHT_BIN2D )
{
  hb_retnd( *( (double *) hb_parcx( 1 ) ) );
}
whtmisc.c126
HB_FUNCWHT_BIN2F(void)
HB_FUNC( WHT_BIN2F )
{
   hb_retnd( (double) *( (float *) hb_parcx( 1 ) ) );
}
whtmisc.c133
BOOLArray2Rect(PHB_ITEM aRect, RECT *rc )
BOOL Array2Rect(PHB_ITEM aRect, RECT *rc )
{
   if (HB_IS_ARRAY(aRect) && hb_arrayLen(aRect) == 4) {
      rc->left   = hb_arrayGetNL(aRect,1);
      rc->top    = hb_arrayGetNL(aRect,2);
      rc->right  = hb_arrayGetNL(aRect,3);
      rc->bottom = hb_arrayGetNL(aRect,4);
      return TRUE ;
   }
   return FALSE;
}
whtmisc.c147
PHB_ITEMRect2Array( RECT * rc )
PHB_ITEM Rect2Array( RECT * rc  )
{
   PHB_ITEM aRect = hb_itemArrayNew( 4 );

   hb_arraySetNL( aRect, 1, rc->left );
   hb_arraySetNL( aRect, 2, rc->top );
   hb_arraySetNL( aRect, 3, rc->right );
   hb_arraySetNL( aRect, 4, rc->bottom );

   return aRect;
}
whtmisc.c199
BOOLArray2Point(PHB_ITEM aPoint, POINT *pt )
BOOL Array2Point(PHB_ITEM aPoint, POINT *pt )
{
   if (HB_IS_ARRAY(aPoint) && hb_arrayLen(aPoint) == 2) {
      pt->x = hb_arrayGetNL(aPoint,1);
      pt->y = hb_arrayGetNL(aPoint,2);
      return TRUE ;
   }
   return FALSE;
}
whtmisc.c216
PHB_ITEMPoint2Array( POINT * pt )
PHB_ITEM Point2Array( POINT * pt )
{
   PHB_ITEM aPoint = hb_itemArrayNew( 2 );

   hb_arraySetNL( aPoint, 1, pt->x );
   hb_arraySetNL( aPoint, 2, pt->y );

   return aPoint;
}
whtmisc.c258
BOOLArray2Size(PHB_ITEM aSize, SIZE *siz )
BOOL Array2Size(PHB_ITEM aSize, SIZE *siz )
{
   if( HB_IS_ARRAY( aSize ) && hb_arrayLen( aSize ) == 2 )
   {
      siz->cx = hb_arrayGetNL(aSize,1);
      siz->cy = hb_arrayGetNL(aSize,2);
      return TRUE;
   }
   return FALSE;
}
whtmisc.c270
PHB_ITEMSize2Array( SIZE * siz )
PHB_ITEM Size2Array( SIZE * siz )
{
   PHB_ITEM aSize = hb_itemArrayNew( 2 );

   hb_arraySetNL( aSize, 1, siz->cx );
   hb_arraySetNL( aSize, 2, siz->cy );

   return aSize;
}
whtmisc.c310
HB_FUNCVWN_MAKEINRESOURCE(void)
HB_FUNC( VWN_MAKEINRESOURCE )
{
  hb_retc( MAKEINTRESOURCE( (WORD) hb_parni( 1 ) ) );
}
whtmisc.c325
HB_FUNCVWN_MESSAGEBOX(void)
HB_FUNC( VWN_MESSAGEBOX )
{
 // LPCSTR lpCaption =  hb_parcx(3);

  hb_retnl( MessageBox( ISNIL(1) ? NULL : (HWND) HB_PARWH(1) ,
                        (LPCSTR) hb_parcx(2),
                        ISNIL(3) ? NULL : (LPCSTR) hb_parcx(3) ,
                        ISNIL(4) ? 0 : (UINT) hb_parnl(4) ) );
}
whtmisc.c333
HB_FUNCVWN_MESSAGEBEEP(void)
HB_FUNC( VWN_MESSAGEBEEP )
{
  hb_retl( MessageBeep( ISNIL(1) ? ( UINT ) 0xFFFFFFFF : ( UINT ) hb_parnl(1) ) );
}
whtmisc.c345
HB_FUNCVWN_SETBIT(void)
HB_FUNC( VWN_SETBIT )
{
   if( hb_pcount() < 3 || hb_parni( 3 ) )
      hb_retnl( hb_parnl(1) | ( 1 << (hb_parni(2)-1) ) );
   else
      hb_retnl( hb_parnl(1) & ~( 1 << (hb_parni(2)-1) ) );
}
whtmisc.c352
HB_FUNCVWN_CHECKBIT(void)
HB_FUNC( VWN_CHECKBIT )
{
   hb_retl( hb_parnl(1) & ( 1 << (hb_parni(2)-1) ) );
}
whtmisc.c363
HB_FUNCVWN_GETENVIRONMENTSTRINGS(void)
HB_FUNC( VWN_GETENVIRONMENTSTRINGS )
{
   HB_RETWI( GetEnvironmentStrings() );
}
whtmisc.c374
HB_FUNCVWN_FREEENVIRONMENTSTRINGS(void)
HB_FUNC( VWN_FREEENVIRONMENTSTRINGS )
{
   hb_retl( (LONG) FreeEnvironmentStrings( (LPTSTR) HB_PARWI( 1 ) ) );
}
whtmisc.c384
HB_FUNCVWN_SLEEP(void)
HB_FUNC( VWN_SLEEP )
{
   Sleep( (DWORD) hb_parnl( 1 ) );
}
whtmisc.c394
HB_FUNCVWN_SETHANDLECOUNT(void)
HB_FUNC( VWN_SETHANDLECOUNT )
{
   hb_retni( SetHandleCount( (UINT) hb_parni( 1 ) ) );
}
whtmisc.c403
HB_FUNCVWN_GETENVIRONMENTVARIABLE(void)
HB_FUNC( VWN_GETENVIRONMENTVARIABLE )
{
   UINT dwLen = MAX_PATH ;
   char *cText = (char*) hb_xgrab( MAX_PATH+1 );
   DWORD dwRet ;

   dwRet = GetEnvironmentVariableA( (LPCSTR) hb_parcx( 1 ),
                                    (LPSTR) cText ,
                                    (DWORD) dwLen
                                  );
   hb_retclen( cText, dwRet );
   hb_xfree( cText );

}
whtmisc.c412
HB_FUNCVWN_SETENVIRONMENTVARIABLE(void)
HB_FUNC( VWN_SETENVIRONMENTVARIABLE )
{
   hb_retl( SetEnvironmentVariableA( (LPCSTR) hb_parcx( 1 ),
                                     (LPCSTR) hb_parcx( 2 )
                                     ) );
}
whtmisc.c431
HB_FUNCVWN_WINEXEC(void)
HB_FUNC( VWN_WINEXEC )
{
   hb_retni( WinExec( (LPCSTR) hb_parcx( 1 ), (UINT) hb_parni( 2 ) ) );
}
whtmisc.c443
HB_FUNCVWN_CREATEMUTEX(void)
HB_FUNC( VWN_CREATEMUTEX )
{
   SECURITY_ATTRIBUTES *sa = NULL;

   if( ISCHAR(1) )
   {
       sa = (SECURITY_ATTRIBUTES *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;
   }

   HB_RETWH( CreateMutex( ISNIL( 1 ) ? NULL : sa, hb_parnl( 2 ), hb_parcx( 3 ) ) );
}
whtmisc.c454
HB_FUNCVWN_OPENMUTEX(void)
HB_FUNC( VWN_OPENMUTEX )
{
  HB_RETWH( OpenMutex( hb_parnl( 1 ), hb_parl( 2 ), hb_parcx( 3 ) ) );
}
whtmisc.c469
HB_FUNCVWN_RELEASEMUTEX(void)
HB_FUNC( VWN_RELEASEMUTEX )
{
  hb_retl( ReleaseMutex( (HANDLE) HB_PARWH( 1 ) ) );
}
whtmisc.c477
HB_FUNCVWN_REGISTERHOTKEY(void)
HB_FUNC( VWN_REGISTERHOTKEY )
{
   hb_retl( RegisterHotKey( (HWND) HB_PARWH( 1 ),
                            hb_parni( 2 )       ,
                            (UINT) hb_parni( 3 ),
                            (UINT) hb_parni( 4 )
                          ) );
}
whtmisc.c488
HB_FUNCVWN_UNREGISTERHOTKEY(void)
HB_FUNC( VWN_UNREGISTERHOTKEY )
{
   hb_retl( UnregisterHotKey( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtmisc.c501
HB_FUNCVWN_GETCLASSINFO(void)
HB_FUNC( VWN_GETCLASSINFO )
{
   WNDCLASS WndClass  ;

   if ( GetClassInfo( ISNIL(1) ? NULL : (HINSTANCE) HB_PARWH( 1 ),
                      (LPCSTR) hb_parcx( 2 ), &WndClass ) )


     hb_retclen( (char*) &WndClass, sizeof(WNDCLASS) );

   // the line below GPFs !
   // hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) &WndClass, sizeof( WNDCLASS ) );

}
whtmisc.c515
HB_FUNCVWN_GETCLASSINFOEX(void)
HB_FUNC( VWN_GETCLASSINFOEX )
{
   WNDCLASSEX WndClassEx ;

   if ( GetClassInfoEx( ISNIL(1) ? NULL : (HINSTANCE) HB_PARWH( 1 ),
                            (LPCSTR) hb_parcx( 2 ), &WndClassEx ) )

      hb_retclen( (char*) &WndClassEx, sizeof(WNDCLASSEX) );
      //hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) &WndClassEx, sizeof( WNDCLASSEX ) );

}
whtmisc.c540
HB_FUNCVWN_SIN(void)
HB_FUNC( VWN_SIN )
{
   hb_retnd(sin(hb_parnd(1)));
}
whtmisc.c557
HB_FUNCVWN_COS(void)
HB_FUNC( VWN_COS )
{
   hb_retnd(cos(hb_parnd(1)));
}
whtmisc.c564
HB_FUNCVWN_TAN(void)
HB_FUNC( VWN_TAN )
{
   hb_retnd(tan(hb_parnd(1)));
}
whtmisc.c571
HB_FUNCVWN_ASIN(void)
HB_FUNC( VWN_ASIN )
{
   hb_retnd(asin(hb_parnd(1)));
}
whtmisc.c578
HB_FUNCVWN_ACOS(void)
HB_FUNC( VWN_ACOS )
{
   hb_retnd(acos(hb_parnd(1)));
}
whtmisc.c585
HB_FUNCVWN_ATAN(void)
HB_FUNC( VWN_ATAN )
{
   hb_retnd(atan(hb_parnd(1)));
}
whtmisc.c592
VOIDRect2ArrayEx( RECT * rc, PHB_ITEM aRect )
void  Rect2ArrayEx( RECT * rc, PHB_ITEM aRect )
{
   hb_arraySetNL( aRect, 1, rc->left );
   hb_arraySetNL( aRect, 2, rc->top );
   hb_arraySetNL( aRect, 3, rc->right );
   hb_arraySetNL( aRect, 4, rc->bottom );
}
whtmisc.c599
VOIDPoint2ArrayEx( POINT *pt, PHB_ITEM aPoint )
void Point2ArrayEx( POINT *pt, PHB_ITEM aPoint )
{
   hb_arraySetNL( aPoint, 1, pt->x );
   hb_arraySetNL( aPoint, 2, pt->y );
}
whtmisc.c610
VOIDSize2ArrayEx( SIZE * siz, PHB_ITEM aSize )
void Size2ArrayEx( SIZE * siz, PHB_ITEM aSize )
{
   hb_arraySetNL( aSize, 1, siz->cx );
   hb_arraySetNL( aSize, 2, siz->cy );
}
whtmisc.c618
whtmmcap.c
TypeFunctionSourceLine
HB_FUNCVWN_CAPCREATECAPTUREWINDOW(void)
HB_FUNC( VWN_CAPCREATECAPTUREWINDOW )
{
   HB_RETWH( capCreateCaptureWindow( (LPCSTR) hb_parc(1),
                                          (DWORD) hb_parnl(2),
                                          hb_parni(3), hb_parni(4),
                                          hb_parni(5), hb_parni(6),
                                          (HWND) HB_PARWH(7),
                                          hb_parni(8) ) );
}

/* ------------------------------------------------------------------------ */

/* LRESULT CALLBACK capErrorCallback( HWND hWnd, int nID, LPCSTR lpsz ); */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL VFWAPI capGetDriverDescription( WORD wDriverIndex, LPSTR lpszName, INT cbName, LPSTR lpszVer, INT cbVer ); */
/*
HB_FUNC( VWN_CAPGETDRIVERDESCRIPTION )
{
 TCHAR lpszName[255];
 int cbName = 255;
 TCHAR lpszVer[255];
 int cbVer = 255;
 BOOL bRet;
 bRet = capGetDriverDescription( (WORD) hb_parni(1), lpszName, cbName, lpszVer, cbVer );
 hb_storc( lpszName, 2 );
 hb_storni( cbName, 3 );
 hb_storc( lpszVer, 4 );
 hb_storni( cbVer, 5 );
 hb_retl(bRet);
}
*/

/* ------------------------------------------------------------------------ */

/* LRESULT CALLBACK capStatusCallback( HWND hWnd, int nID, LPCSTR lpsz ); */
/* To Do */

/* ------------------------------------------------------------------------ */

/* LRESULT CALLBACK capVideoStreamCallback( HWND hWnd, LPVIDEOHDR lpVHdr ); */
/* To Do */

/* ------------------------------------------------------------------------ */

/* LRESULT CALLBACK capWaveStreamCallback( HWND hWnd, LPWAVEHDR lpWHdr ); */
/* To Do */

/* ------------------------------------------------------------------------ */

/* LRESULT CALLBACK capYieldCallback( HWND hWnd ); */
/* To Do */

/* ======================================================================== */
whtmmcap.c265
HB_FUNCVWN_CAPCAPTUREABORT(void)
/* SendMessage( hwnd, WM_CAP_ABORT, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTUREABORT )
{
 hb_retl( capCaptureAbort( (HWND) HB_PARWH(1) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capCaptureGetSetup( hwnd, s, wSize ); */
/* WM_CAP_GET_SEQUENCE_SETUP */
/* SendMessage( hwnd, WM_CAP_GET_SEQUENCE_SETUP, 0, 0 ) */
whtmmcap.c330
HB_FUNCVWN_CAPCAPTURESEQUENCE(void)
/* SendMessage( hwnd, WM_CAP_SEQUENCE, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESEQUENCE )
{
 hb_retl( capCaptureSequence( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c347
HB_FUNCVWN_CAPCAPTURESEQUENCENOFILE(void)
/* SendMessage( hwnd, WM_CAP_SEQUENCE_NOFILE, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESEQUENCENOFILE )
{
 hb_retl( capCaptureSequenceNoFile( (HWND) HB_PARWH(1) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capCaptureSetSetup( hwnd, psCapParms, wSize ); */
/* WM_CAP_SET_SEQUENCE_SETUP */
/* SendMessage( hwnd, WM_CAP_SET_SEQUENCE_SETUP, 0, 0 ) */
whtmmcap.c357
HB_FUNCVWN_CAPCAPTURESINGLEFRAME(void)
/* SendMessage( hwnd, WM_CAP_SINGLE_FRAME, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESINGLEFRAME )
{
 hb_retl( capCaptureSingleFrame( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c374
HB_FUNCVWN_CAPCAPTURESINGLEFRAMECLOSE(void)
/* SendMessage( hwnd, WM_CAP_SINGLE_FRAME_CLOSE, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESINGLEFRAMECLOSE )
{
 hb_retl( capCaptureSingleFrameClose( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c384
HB_FUNCVWN_CAPCAPTURESINGLEFRAMEOPEN(void)
/* SendMessage( hwnd, WM_CAP_SINGLE_FRAME_OPEN, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESINGLEFRAMEOPEN )
{
 hb_retl( capCaptureSingleFrameOpen( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c394
HB_FUNCVWN_CAPCAPTURESTOP(void)
/* SendMessage( hwnd, WM_CAP_STOP, 0, 0 ) */
HB_FUNC( VWN_CAPCAPTURESTOP )
{
 hb_retl( capCaptureStop( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c404
HB_FUNCVWN_CAPDLGVIDEOCOMPRESSION(void)
/* SendMessage( hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0 ) */
HB_FUNC( VWN_CAPDLGVIDEOCOMPRESSION )
{
 hb_retl( capDlgVideoCompression( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c414
HB_FUNCVWN_CAPDLGVIDEODISPLAY(void)
/* SendMessage( hwnd, WM_CAP_DLG_VIDEODISPLAY, 0, 0 ) */
HB_FUNC( VWN_CAPDLGVIDEODISPLAY )
{
 hb_retl( capDlgVideoDisplay( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c424
HB_FUNCVWN_CAPDLGVIDEOFORMAT(void)
/* SendMessage( hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0 ) */
HB_FUNC( VWN_CAPDLGVIDEOFORMAT )
{
 hb_retl( capDlgVideoFormat( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c434
HB_FUNCVWN_CAPDLGVIDEOSOURCE(void)
/* SendMessage( hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0 ) */
HB_FUNC( VWN_CAPDLGVIDEOSOURCE )
{
 hb_retl( capDlgVideoSource( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c444
HB_FUNCVWN_CAPDRIVERCONNECT(void)
/* SendMessage( hwnd, WM_CAP_DRIVER_CONNECT, 0, 0 ) */
HB_FUNC( VWN_CAPDRIVERCONNECT )
{
 hb_retl( capDriverConnect( (HWND) HB_PARWH(1), hb_parni(2) ) );
}
whtmmcap.c454
HB_FUNCVWN_CAPDRIVERDISCONNECT(void)
/* SendMessage( hwnd, WM_CAP_DRIVER_DISCONNECT, 0, 0 ) */
HB_FUNC( VWN_CAPDRIVERDISCONNECT )
{
 hb_retl( capDriverDisconnect( (HWND) HB_PARWH(1) ) );
}

/* ------------------------------------------------------------------------ */

/* capDriverGetCaps( hwnd, psCaps, wSize ); */
/* WM_CAP_DRIVER_GET_CAPS */
/* SendMessage( hwnd, WM_CAP_DRIVER_GET_CAPS, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capDriverGetName( hwnd, szName, wSize ); */
/* WM_CAP_DRIVER_GET_NAME */
/* SendMessage( hwnd, WM_CAP_DRIVER_GET_NAME, 0, 0 ) */
/*
HB_FUNC( VWN_CAPDRIVERGETNAME )
{
 TCHAR szName[255];
 WORD wSize = 255;
 BOOL bRet;
 bRet = capDriverGetName( (HWND) HB_PARWH(1), szName, &wSize );
 hb_storc( szName, 2 );
 hb_storni( wSize, 3 );
 hb_retl(bRet);
}
*/

/* ------------------------------------------------------------------------ */

/* BOOL capDriverGetVersion( hwnd, szVer, wSize ); */
/* WM_CAP_DRIVER_GET_VERSION */
/* SendMessage( hwnd, WM_CAP_DRIVER_GET_VERSION, 0, 0 ) */
whtmmcap.c464
HB_FUNCVWN_CAPEDITCOPY(void)
/* SendMessage( hwnd, WM_CAP_EDIT_COPY, 0, 0 ) */
HB_FUNC( VWN_CAPEDITCOPY )
{
 hb_retl( capEditCopy( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c517
HB_FUNCVWN_CAPFILEALLOC(void)
/* SendMessage( hwnd, WM_CAP_FILE_ALLOCATE, 0, 0 ) */
HB_FUNC( VWN_CAPFILEALLOC )
{
 hb_retl( capFileAlloc( (HWND) HB_PARWH(1), (DWORD) hb_parnl(2) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capFileGetCaptureFile( hwnd, szName, wSize ); */
/* WM_CAP_FILE_GET_CAPTURE_FILE */
/* SendMessage( hwnd, WM_CAP_FILE_GET_CAPTURE_FILE, 0, 0 ) */
whtmmcap.c527
HB_FUNCVWN_CAPFILESAVEAS(void)
/* SendMessage( hwnd, WM_CAP_FILE_SAVEAS, 0, 0 ) */
HB_FUNC( VWN_CAPFILESAVEAS )
{
 hb_retl( capFileSaveAs( (HWND) HB_PARWH(1), hb_parc(2) ) );
}
whtmmcap.c555
HB_FUNCVWN_CAPFILESAVEDIB(void)
/* SendMessage( hwnd, WM_CAP_FILE_SAVEDIB, 0, 0 ) */
HB_FUNC( VWN_CAPFILESAVEDIB )
{
 hb_retl( capFileSaveDIB( (HWND) HB_PARWH(1), hb_parc(2) ) );
}
whtmmcap.c565
HB_FUNCVWN_CAPFILESETCAPTUREFILE(void)
/* SendMessage( hwnd, WM_CAP_FILE_SET_CAPTURE_FILE, 0, 0 ) */
HB_FUNC( VWN_CAPFILESETCAPTUREFILE )
{
 hb_retl( capFileSetCaptureFile( (HWND) HB_PARWH(1), hb_parc(2) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capFileSetInfoChunk( hwnd, lpInfoChunk ); */
/* WM_CAP_FILE_SET_INFOCHUNK */
/* SendMessage( hwnd, WM_CAP_FILE_SET_INFOCHUNK, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* DWORD capGetAudioFormat( hwnd, psAudioFormat, wSize ); */
/* WM_CAP_GET_AUDIOFORMAT */
/* SendMessage( hwnd, WM_CAP_GET_AUDIOFORMAT, 0, 0 ) */
whtmmcap.c575
HB_FUNCVWN_CAPGETAUDIOFORMATSIZE(void)
/* SendMessage( hwnd, WM_CAP_GET_AUDIOFORMAT, 0, 0 ) */
HB_FUNC( VWN_CAPGETAUDIOFORMATSIZE )
{
 hb_retnl( capGetAudioFormatSize( (HWND) HB_PARWH(1) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capGetMCIDeviceName( hwnd, szName, wSize ); */
/* WM_CAP_GET_MCI_DEVICE */
/* SendMessage( hwnd, WM_CAP_GET_MCI_DEVICE, 0, 0 ) */
/*
HB_FUNC( VWN_CAPGETMCIDEVICENAME )
{
 TCHAR szName[255];
 WORD wSize = 255;
 BOOL bRet;
 bRet = capGetMCIDeviceName( (HWND) HB_PARWH(1), szName, &wSize );
 hb_storc( szName, 2 );
 hb_storni( wSize, 3 );
 hb_retl(bRet);
}
*/

/* ------------------------------------------------------------------------ */

/* BOOL capGetStatus( hwnd, s, wSize ); */
/* WM_CAP_GET_STATUS */
/* SendMessage( hwnd, WM_CAP_GET_STATUS, 0, 0 ) */
whtmmcap.c599
HB_FUNCVWN_CAPGETUSERDATA(void)
/* SendMessage( hwnd, WM_CAP_GET_USER_DATA, 0, 0 ) */
/* To check: the return must be a LONG */
HB_FUNC( VWN_CAPGETUSERDATA )
{
   hb_retl( capGetUserData( (HWND) HB_PARWH(1) ) != 0 );
}

/* ------------------------------------------------------------------------ */

/* DWORD capGetVideoFormat( hwnd, psVideoFormat, wSize ); */
/* WM_CAP_GET_VIDEOFORMAT */
/* SendMessage( hwnd, WM_CAP_GET_VIDEOFORMAT, 0, 0 ) */
whtmmcap.c634
HB_FUNCVWN_CAPGETVIDEOFORMATSIZE(void)
/* SendMessage( hwnd, WM_CAP_GET_VIDEOFORMAT, 0, 0 ) */
HB_FUNC( VWN_CAPGETVIDEOFORMATSIZE )
{
 hb_retnl( capGetVideoFormatSize( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c652
HB_FUNCVWN_CAPGRABFRAME(void)
/* SendMessage( hwnd, WM_CAP_GRAB_FRAME, 0, 0 ) */
HB_FUNC( VWN_CAPGRABFRAME )
{
 hb_retl( capGrabFrame( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c662
HB_FUNCVWN_CAPGRABFRAMENOSTOP(void)
/* SendMessage( hwnd, WM_CAP_GRAB_FRAME_NOSTOP, 0, 0 ) */
HB_FUNC( VWN_CAPGRABFRAMENOSTOP )
{
 hb_retl( capGrabFrameNoStop( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c672
HB_FUNCVWN_CAPOVERLAY(void)
/* SendMessage( hwnd, WM_CAP_SET_OVERLAY, 0, 0 ) */
HB_FUNC( VWN_CAPOVERLAY )
{
 hb_retl( capOverlay( (HWND) HB_PARWH(1), hb_parl(2) ) );
}
whtmmcap.c682
HB_FUNCVWN_CAPPALETTEAUTO(void)
/* SendMessage( hwnd, WM_CAP_PAL_AUTOCREATE, 0, 0 ) */
HB_FUNC( VWN_CAPPALETTEAUTO )
{
 hb_retl( capPaletteAuto( (HWND) HB_PARWH(1), hb_parni(2), hb_parni(3) ) );
}
whtmmcap.c692
HB_FUNCVWN_CAPPALETTEMANUAL(void)
/* SendMessage( hwnd, WM_CAP_PAL_MANUALCREATE, 0, 0 ) */
HB_FUNC( VWN_CAPPALETTEMANUAL )
{
 hb_retl( capPaletteManual( (HWND) HB_PARWH(1), hb_parl(2), hb_parni(3) ) );
}
whtmmcap.c702
HB_FUNCVWN_CAPPALETTEOPEN(void)
/* SendMessage( hwnd, WM_CAP_PAL_OPEN, 0, 0 ) */
HB_FUNC( VWN_CAPPALETTEOPEN )
{
 hb_retl( capPaletteOpen( (HWND) HB_PARWH(1), hb_parc(2) ) );
}
whtmmcap.c712
HB_FUNCVWN_CAPPALETTEPASTE(void)
/* SendMessage( hwnd, WM_CAP_PAL_PASTE, 0, 0 ) */
HB_FUNC( VWN_CAPPALETTEPASTE )
{
 hb_retl( capPalettePaste( (HWND) HB_PARWH(1) ) );
}
whtmmcap.c722
HB_FUNCVWN_CAPPALETTESAVE(void)
/* SendMessage( hwnd, WM_CAP_PAL_SAVE, 0, 0 ) */
HB_FUNC( VWN_CAPPALETTESAVE )
{
 hb_retl( capPaletteSave( (HWND) HB_PARWH(1), hb_parc(2) ) );
}
whtmmcap.c732
HB_FUNCVWN_CAPPREVIEW(void)
/* SendMessage( hwnd, WM_CAP_SET_PREVIEW, 0, 0 ) */
HB_FUNC( VWN_CAPPREVIEW )
{
 hb_retl( capPreview( (HWND) HB_PARWH(1), hb_parl(2) ) );
}
whtmmcap.c742
HB_FUNCVWN_CAPPREVIEWRATE(void)
/* SendMessage( hwnd, WM_CAP_SET_PREVIEWRATE, 0, 0 ) */
HB_FUNC( VWN_CAPPREVIEWRATE )
{
 hb_retl( capPreviewRate( (HWND) HB_PARWH(1), (WORD) hb_parnl(2) ) );
}
whtmmcap.c752
HB_FUNCVWN_CAPPREVIEWSCALE(void)
/* SendMessage( hwnd, WM_CAP_SET_SCALE, 0, 0 ) */
HB_FUNC( VWN_CAPPREVIEWSCALE )
{
 hb_retl( capPreviewScale( (HWND) HB_PARWH(1), hb_parl(2) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capSetAudioFormat( hwnd, psAudioFormat, wSize ); */
/* WM_CAP_SET_AUDIOFORMAT */
/* SendMessage( hwnd, WM_CAP_SET_AUDIOFORMAT, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnCapControl( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_CAPCONTROL */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_CAPCONTROL, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnError( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_ERROR */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_ERROR, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnFrame( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_FRAME */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_FRAME, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnStatus( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_STATUS */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_STATUS, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnVideoStream( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_VIDEOSTREAM */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnWaveStream( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_WAVESTREAM */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_WAVESTREAM, 0, 0 ) */
/* To Do */

/* ------------------------------------------------------------------------ */

/* BOOL capSetCallbackOnYield( hwnd, fpProc ); */
/* WM_CAP_SET_CALLBACK_YIELD */
/* SendMessage( hwnd, WM_CAP_SET_CALLBACK_YIELD, 0, 0 ) */
whtmmcap.c762
HB_FUNCVWN_CAPSETMCIDEVICENAME(void)
/* SendMessage( hwnd, WM_CAP_SET_MCI_DEVICE, 0, 0 ) */
HB_FUNC( VWN_CAPSETMCIDEVICENAME )
{
 hb_retl( capSetMCIDeviceName( (HWND) HB_PARWH(1), hb_parc(2) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capSetScrollPos( hwnd, lpP ); */
/* WM_CAP_SET_SCROLL */
/* SendMessage( hwnd, WM_CAP_SET_SCROLL, 0, 0 ) */
whtmmcap.c828
HB_FUNCVWN_CAPSETUSERDATA(void)
/* SendMessage( hwnd, WM_CAP_SET_USER_DATA, 0, 0 ) */
HB_FUNC( VWN_CAPSETUSERDATA )
{
 hb_retl( capSetUserData( (HWND) HB_PARWH(1), hb_parnl(2) ) );
}

/* ------------------------------------------------------------------------ */

/* BOOL capSetVideoFormat( hwnd, psVideoFormat, wSize ); */
/* WM_CAP_SET_VIDEOFORMAT */
/* SendMessage( hwnd, WM_CAP_SET_VIDEOFORMAT, 0, 0 ) */
whtmmcap.c845
whtmous.c
TypeFunctionSourceLine
HB_FUNCVWN_LOADCURSOR(void)
HB_FUNC( VWN_LOADCURSOR )
{
   HB_RETWH( LoadCursor( ISNIL(1) ? NULL : (HINSTANCE) HB_PARWH(1) ,
                    hb_parinfo(2)== HB_IT_STRING ? hb_parcx(2): MAKEINTRESOURCE( hb_parnl( 2 ) ) ) );
}
whtmous.c39
HB_FUNCVWN_GETCAPTURE(void)
HB_FUNC( VWN_GETCAPTURE )
{
   HB_RETWH( GetCapture(  ) );
}
whtmous.c49
HB_FUNCVWN_SETCAPTURE(void)
HB_FUNC( VWN_SETCAPTURE )
{
   HB_RETWH( SetCapture( (HWND) HB_PARWH( 1 ) ) );
}
whtmous.c58
HB_FUNCVWN_RELEASECAPTURE(void)
HB_FUNC( VWN_RELEASECAPTURE )
{
   hb_retl( ReleaseCapture(  ) );
}
whtmous.c67
HB_FUNCVWN_GETDOUBLECLICKTIME(void)
HB_FUNC( VWN_GETDOUBLECLICKTIME )
{
   hb_retni( GetDoubleClickTime(  ) );
}
whtmous.c77
HB_FUNCVWN_SETDOUBLECLICKTIME(void)
HB_FUNC( VWN_SETDOUBLECLICKTIME )
{
   hb_retl( SetDoubleClickTime( (UINT) hb_parni( 1 ) ) );
}
whtmous.c86
HB_FUNCVWN_SHOWCURSOR(void)
HB_FUNC( VWN_SHOWCURSOR )
{
   hb_retni( ShowCursor( hb_parl( 1 ) ) );
}
whtmous.c96
HB_FUNCVWN_SETCURSORPOS(void)
HB_FUNC( VWN_SETCURSORPOS )
{
   hb_retl( SetCursorPos( hb_parni( 1 ), hb_parni( 2 ) ) );
}
whtmous.c105
HB_FUNCVWN_WINSETCURSOR(void)
HB_FUNC( VWN_WINSETCURSOR )
{
   HB_RETWH( SetCursor( (HCURSOR) HB_PARWH( 1 ) ) );
}
whtmous.c119
HB_FUNCVWN_TRACKMOUSEEVENT(void)
HB_FUNC( VWN_TRACKMOUSEEVENT )
{

 TRACKMOUSEEVENT *tme =  (TRACKMOUSEEVENT * ) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;

  hb_retl( TrackMouseEvent( tme ) );

}
whtmous.c126
HB_FUNCVWN_GETCURSORPOS(void)
HB_FUNC( VWN_GETCURSORPOS )
{
   POINT Point ;
   PHB_ITEM gcPos ;

   if ( GetCursorPos( &Point ) )
   {
      gcPos = Point2Array( &Point);
      hb_itemReturn( gcPos );
      hb_itemRelease( gcPos );
   }

}
whtmous.c139
HB_FUNCVWN_CLIPCURSOR(void)
HB_FUNC( VWN_CLIPCURSOR )
{
   RECT rc ;
   BOOL bRectOk ;

   bRectOk = ( ISARRAY( 2 )  &&   Array2Rect( hb_param(1,HB_IT_ARRAY), &rc ) );

   hb_retl(  ClipCursor( bRectOk ? &rc : NULL ) );

}
whtmous.c157
HB_FUNCVWN_GETCLIPCURSOR(void)
HB_FUNC( VWN_GETCLIPCURSOR )
{
   RECT rc;

   if ( GetClipCursor( &rc ) )
      hb_itemReturnRelease( Rect2Array( &rc ) );
}
whtmous.c172
HB_FUNCVWN_GETCURSOR(void)
HB_FUNC( VWN_GETCURSOR )
{
   HB_RETWH( GetCursor(  ) );
}
whtmous.c186
HB_FUNCVWN_SWAPMOUSEBUTTON(void)
HB_FUNC( VWN_SWAPMOUSEBUTTON )
{
   hb_retl( SwapMouseButton( hb_parl( 1 ) ) );
}
whtmous.c196
HB_FUNCVWN_LOADCURSORFROMFILE(void)
HB_FUNC( VWN_LOADCURSORFROMFILE )
{
   HB_RETWH( LoadCursorFromFile( (LPCSTR) hb_parcx( 1 ) ) );
}
whtmous.c206
HB_FUNCVWN_CREATECURSOR(void)
HB_FUNC( VWN_CREATECURSOR )
{
   HB_RETWH( CreateCursor( (HINSTANCE) HB_PARWH( 1 ),
                                  hb_parni( 2 )            ,
                                  hb_parni( 3 )            ,
                                  hb_parni( 4 )            ,
                                  hb_parni( 5 )            ,
                                  hb_parcx( 6 )             ,
                                  hb_parcx( 7 )
                                 ) );
}
whtmous.c215
HB_FUNCVWN_DESTROYCURSOR(void)
HB_FUNC( VWN_DESTROYCURSOR )
{
   hb_retl( DestroyCursor( (HCURSOR) HB_PARWH( 1 ) ) );
}
whtmous.c232
HB_FUNCVWN_COPYCURSOR(void)
HB_FUNC( VWN_COPYCURSOR )
{
   HB_RETWH( CopyCursor( (HCURSOR) HB_PARWH( 1 ) ) );
}
whtmous.c241
HB_FUNCVWN_SETSYSTEMCURSOR(void)
HB_FUNC( VWN_SETSYSTEMCURSOR )
{
   hb_retl( SetSystemCursor( (HCURSOR) HB_PARWH( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtmous.c250
HB_FUNCVWN_GETCURSORINFO(void)
HB_FUNC( VWN_GETCURSORINFO )
{
   CURSORINFO pci ;

   if ( GetCursorInfo( &pci ) )

      hb_retclen( (char *) &pci, sizeof( CURSORINFO ) );

}
whtmous.c259
whtmsg.c
TypeFunctionSourceLine
HB_FUNCVWN_ISDIALOGMESSAGE(void)
HB_FUNC( VWN_ISDIALOGMESSAGE )
{
  hb_retl( IsDialogMessage( (HWND) HB_PARWH(1), (MSG*) hb_parcx(2) ));
}
whtmsg.c27
HB_FUNCVWN_TRANSLATEMDISYSACCEL(void)
HB_FUNC( VWN_TRANSLATEMDISYSACCEL )
{
   hb_retl( TranslateMDISysAccel( (HWND) HB_PARWH( 1 ), (MSG*) hb_parcx( 2 ) ) );
}
whtmsg.c36
HB_FUNCVWN_TRANSLATEMESSAGE(void)
HB_FUNC( VWN_TRANSLATEMESSAGE )
{
  hb_retl(TranslateMessage( (MSG*) hb_parcx(1)));
}
whtmsg.c44
HB_FUNCVWN_DISPATCHMESSAGE(void)
HB_FUNC( VWN_DISPATCHMESSAGE )
{
  HB_RETWI( DispatchMessage( ( MSG * ) hb_parcx( 1 ) ) );
}
whtmsg.c51
HB_FUNCVWN_POSTQUITMESSAGE(void)
HB_FUNC( VWN_POSTQUITMESSAGE )
{
  PostQuitMessage(hb_parni(1));
}
whtmsg.c58
HB_FUNCVWN_POSTMESSAGE(void)
HB_FUNC( VWN_POSTMESSAGE )
{

   char *cText = NULL;

   if (ISBYREF(4))
   {
      cText = (char*) hb_xgrab( hb_parcsiz(4) );
      hb_xmemcpy( cText, hb_parcx(4), hb_parcsiz(4) );
   }


   hb_retnl( (LONG) PostMessage( (HWND) HB_PARWH( 1 ), (UINT) hb_parni( 2 ),
                                (ISNIL(3) ? 0 : (WPARAM) hb_parnint( 3 ))   ,
                                (ISNIL(4) ? 0 : ( ISBYREF(4)? (LPARAM) (LPSTR) cText : ( ISCHAR(4) ? (LPARAM)(LPSTR) hb_parcx(4) : (LPARAM) hb_parnint( 4 ))))
                               )
            );


   if( ISBYREF( 4 ) )
   {
      hb_storclen( cText, hb_parcsiz(4), 4 );
      hb_xfree( cText );
   }
}
whtmsg.c66
HB_FUNCVWN_SENDMESSAGE(void)
HB_FUNC( VWN_SENDMESSAGE )
{

   char *cText = NULL;


   if( ISBYREF(4) )
   {
      cText = (char*) hb_xgrab( hb_parcsiz(4) );
      hb_xmemcpy( cText, hb_parcx(4), hb_parcsiz(4) );
   }

   hb_retnl( (ULONG) SendMessage( (HWND) HB_PARWH( 1 ), (UINT) hb_parni( 2 ),
                                  (ISNIL(3) ? 0 : (WPARAM) hb_parnint( 3 ))   ,
                                  (ISNIL(4) ? 0 : ( ISBYREF(4)? (LPARAM) (LPSTR) cText : ( ISCHAR(4) ? (LPARAM)(LPSTR) hb_parcx(4) : (LPARAM) hb_parnint( 4 ))))
                                )
           );


   if (ISBYREF( 4 ))
   {
      hb_storclen( cText, hb_parcsiz(4), 4 );
      hb_xfree( cText );
   }
}
whtmsg.c94
HB_FUNCVWN_SENDDLGITEMMESSAGE(void)
HB_FUNC( VWN_SENDDLGITEMMESSAGE )
{
   char *cText;
   PHB_ITEM pText = hb_param( 5, HB_IT_STRING );

   if( pText )
   {
      cText = (char*) hb_xgrab( hb_itemGetCLen( pText )+1 ); //pText->item.asString.length + 1 );
      //hb_xmemcpy( cText, pText->item.asString.value, pText->item.asString.length + 1 );
      hb_xmemcpy( cText, hb_itemGetC( pText ), hb_itemGetCLen( pText ) + 1 );
   }
   else
   {
      cText = NULL;
   }

   hb_retnl( (LONG) SendDlgItemMessage( (HWND) HB_PARWH( 1 ) ,
                                        (int)  hb_parni( 2 ) ,
                                        (UINT) hb_parni( 3 ) ,
                                        (ISNIL(4) ? 0 : (WPARAM) hb_parnint( 4 ))   ,
                                        (cText ? (LPARAM) cText : (LPARAM) hb_parnint( 5 ))
                                      )
            );

  // Will be ignored if not BYREF.
  if( pText )
  {
     //hb_storclen( cText, pText->item.asString.length, 5 );
     hb_storclen( cText, hb_itemGetCLen( pText ), 5 );
  }

  if( cText )
  {
     hb_xfree( cText );
  }

/*
   hb_retnl( SendDlgItemMessage( (HWND) HB_PARWH(1) ,     // handle of dialog box
                                (int)   hb_parni(2) ,     // identifier of control
                                (UINT)  hb_parni(3) ,     // message to send
                                (ISNIL(4) ? 0 : (WPARAM) hb_parnint(4) ) ,  // first message parameter
                                (ISNIL(5) ? 0 : (hb_parinfo(5)==HB_IT_STRING ? (LPARAM) (LPSTR) hb_parcx(5) : (LPARAM) hb_parnint( 5 )) )   // second message parameter
                              ));

*/

}
whtmsg.c123
HB_FUNCVWN_GETMESSAGE(void)
HB_FUNC( VWN_GETMESSAGE )
{
  MSG Msg ;

  if (GetMessage( &Msg,
                  ISNIL(2) ? NULL : (HWND) HB_PARWH(2),
                  ISNIL(3) ? 0 : hb_parnl(3),
                  ISNIL(4) ? 0 : hb_parnl(4) ) )
    {
      hb_storclen( (LPSTR) &Msg, sizeof(MSG), 1 );
      hb_retl( 1 );
    }
  else
    hb_retl ( 0 );
}
whtmsg.c177
HB_FUNCVWN_PEEKMESSAGE(void)
HB_FUNC( VWN_PEEKMESSAGE )
{
  MSG Msg ;

   if (PeekMessage( (MSG*) &Msg,
                    ISNIL(2) ? NULL :(HWND) HB_PARWH(2),
                    ISNIL(3) ? 0 : hb_parnl(3),
                    ISNIL(4) ? 0 : hb_parnl(4),
                    ISNIL(5) ? PM_NOREMOVE : hb_parnl(5)))
     {
       hb_storclen( (LPSTR) &Msg, sizeof(MSG),1);
       hb_retl( 1 );
     }
  else
     hb_retl ( 0 );

}
whtmsg.c195
HB_FUNCVWN_REGISTERWINDOWMESSAGE(void)
HB_FUNC( VWN_REGISTERWINDOWMESSAGE )
{
   hb_retni( RegisterWindowMessageA( (LPCSTR) hb_parcx( 1 ) ) );
}
whtmsg.c218
HB_FUNCVWN_SETMESSAGEQUEUE(void)
HB_FUNC( VWN_SETMESSAGEQUEUE )
{
   hb_retl( SetMessageQueue( hb_parni( 1 ) ) );
}
whtmsg.c228
HB_FUNCVWN_GETMESSAGEPOS(void)
HB_FUNC( VWN_GETMESSAGEPOS )
{
   hb_retnl( (LONG) GetMessagePos(  ) );
}
whtmsg.c237
HB_FUNCVWN_GETMESSAGETIME(void)
HB_FUNC( VWN_GETMESSAGETIME )
{
   hb_retnl( (LONG) GetMessageTime(  ) );
}
whtmsg.c246
HB_FUNCVWN_GETMESSAGEEXTRAINFO(void)
HB_FUNC( VWN_GETMESSAGEEXTRAINFO )
{
   hb_retnl( (LONG) GetMessageExtraInfo(  ) );
}
whtmsg.c255
HB_FUNCVWN_SETMESSAGEEXTRAINFO(void)
HB_FUNC( VWN_SETMESSAGEEXTRAINFO )
{
   hb_retnl( (LONG) SetMessageExtraInfo( (LPARAM) hb_parnint( 1 ) ) );
}
whtmsg.c264
HB_FUNCVWN_SENDNOTIFYMESSAGE(void)
HB_FUNC( VWN_SENDNOTIFYMESSAGE )
{
   hb_retl( SendNotifyMessage( (HWND) HB_PARWH( 1 )  ,
                               (UINT) hb_parni( 2 )  ,
                               (WPARAM) hb_parnint( 3 ),
                               (LPARAM) hb_parnint( 4 )
                             ) );
}
whtmsg.c297
HB_FUNCVWN_POSTTHREADMESSAGE(void)
HB_FUNC( VWN_POSTTHREADMESSAGE )
{
   hb_retl( PostThreadMessage( (DWORD) hb_parnl( 1 ) ,
                               (UINT) hb_parni( 2 )  ,
                               (WPARAM) hb_parnint( 3 ),
                               (LPARAM) hb_parnint( 4 )
                             ) );
}
whtmsg.c310
HB_FUNCVWN_REPLYMESSAGE(void)
HB_FUNC( VWN_REPLYMESSAGE )
{
   hb_retl( ReplyMessage( (LRESULT) hb_parnl( 1 ) ) );
}
whtmsg.c322
HB_FUNCVWN_WAITMESSAGE(void)
HB_FUNC( VWN_WAITMESSAGE )
{
   hb_retl( WaitMessage(  ) );
}
whtmsg.c331
HB_FUNCVWN_WAITFORINPUTIDLE(void)
HB_FUNC( VWN_WAITFORINPUTIDLE )
{
   hb_retnl( (LONG) WaitForInputIdle( (HANDLE) HB_PARWH( 1 ),
                                      (DWORD) hb_parnl( 2 )
                                    ) );
}
whtmsg.c339
HB_FUNCVWN_INSENDMESSAGE(void)
HB_FUNC( VWN_INSENDMESSAGE )
{
   hb_retl( InSendMessage(  ) );
}
whtmsg.c349
HB_FUNCVWN_INSENDMESSAGEEX(void)
HB_FUNC( VWN_INSENDMESSAGEEX )
{

   hb_retnl( (LONG) InSendMessageEx( NULL ) ); // param reserved must be NULL
}
whtmsg.c360
HB_FUNCVWN_MSGWAITFORMULTIPLEOBJECTS(void)
HB_FUNC( VWN_MSGWAITFORMULTIPLEOBJECTS )
{
   hb_retnl( (LONG) MsgWaitForMultipleObjects( (DWORD) hb_parnl( 1 ) ,
                                               (HANDLE *) HB_PARWI( 2 ),
                                               hb_parl( 3 ) ,
                                               (DWORD) hb_parnl( 4 ) ,
                                               (DWORD) hb_parnl( 5 )
                                             ) );
}
whtmsg.c373
HB_FUNCVWN_MSGWAITFORMULTIPLEOBJECTSEX(void)
HB_FUNC( VWN_MSGWAITFORMULTIPLEOBJECTSEX )
{
   hb_retnl( (LONG) MsgWaitForMultipleObjectsEx( (DWORD) hb_parnl( 1 ) ,
                                                 (HANDLE *) HB_PARWI( 2 ),
                                                 (DWORD) hb_parnl( 3 ) ,
                                                 (DWORD) hb_parnl( 4 ) ,
                                                 (DWORD) hb_parnl( 5 )
                                               ) );
}


//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI SendMessageCallbackA( IN HWND hWnd, IN UINT Msg, IN WPARAM wParam, IN LPARAM lParam, IN SENDASYNCPROC lpResultCallBack, IN ULONG_PTR dwData);

/*

HB_FUNC( VWN_SENDMESSAGECALLBACK )
{
   SENDASYNCPROC lpResultCallBack ;
   ULONG_PTR     dwData           ;

   // Your code goes here

   hb_retl( SendMessageCallback( (HWND) HB_PARWH( 1 )  ,
                                 (UINT) hb_parni( 2 )  ,
                                 (WPARAM) hb_parnint( 3 ),
                                 (LPARAM) hb_parnint( 4 ),
                                 lpResultCallBack ,
                                 dwData
                               ) );
}

*/

//-----------------------------------------------------------------------------
// WINUSERAPI long WINAPI BroadcastSystemMessageA( IN DWORD, IN LPDWORD, IN UINT, IN WPARAM, IN LPARAM);

/*

HB_FUNC( VWN_BROADCASTSYSTEMMESSAGE )
{
   LPDWORD lpdWord ;

   // Your code goes here

   hb_retnl( (LONG) BroadcastSystemMessage( (DWORD) hb_parnl( 1 ) ,
                                            lpdWord               ,
                                            (UINT) hb_parni( 3 )  ,
                                            (WPARAM) hb_parnint( 4 ),
                                            (LPARAM) hb_parnint( 5 )
                                          ) );
}

*/

//-----------------------------------------------------------------------------
// WINUSERAPI long WINAPI BroadcastSystemMessage( IN DWORD, IN LPDWORD, IN UINT, IN WPARAM, IN LPARAM);

whtmsg.c387
HB_FUNCVWN_UNREGISTERDEVICENOTIFICATION(void)
HB_FUNC( VWN_UNREGISTERDEVICENOTIFICATION )
{
   hb_retl( UnregisterDeviceNotification( (HDEVNOTIFY) HB_PARWH( 1 ) ) );
}
whtmsg.c487
HB_FUNCVWN_ATTACHTHREADINPUT(void)
HB_FUNC( VWN_ATTACHTHREADINPUT )
{

   hb_retl( AttachThreadInput( (DWORD) hb_parnl( 1 ) ,
                               (DWORD) hb_parnl( 2 ) ,
                               hb_parl( 3 )
                             ) );
}
whtmsg.c498
HB_FUNCVWN_CALLMSGFILTER(void)
HB_FUNC( VWN_CALLMSGFILTER )
{
   MSG *Msg = (MSG * ) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value;

   hb_retl( CallMsgFilter( Msg, hb_parni( 2 ) ) );
}
whtmsg.c511
whtpen.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATEPEN(void)
HB_FUNC( VWN_CREATEPEN )
{
   HB_RETWH( CreatePen(
               hb_parni( 1 ),   // pen style
               hb_parni( 2 ),   // pen width
               (COLORREF) hb_parnl( 3 ) // pen color
             ) );
}

//-----------------------------------------------------------------------------
// WINGDIAPI HPEN WINAPI CreatePenIndirect( IN CONST LOGPEN *);

/*

HB_FUNC( VWN_CREATEPENINDIRECT )
{
   CONST LOGPEN ;

   // Your code goes here

   HB_RETWH( CreatePenIndirect( &LOGPEN ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI COLORREF WINAPI GetDCPenColor( IN HDC);

// NT ?

/*

HB_FUNC( VWN_GETDCPENCOLOR )
{
   hb_retnl( (ULONG) GetDCPenColor( (HDC) HB_PARWH( 1 ) ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI COLORREF WINAPI SetDCPenColor(IN HDC, IN COLORREF);

// NT ?

whtpen.c26
whtprn.c
TypeFunctionSourceLine
HB_FUNCVWN_STARTDOC(void)
HB_FUNC( VWN_STARTDOC )
{
   DOCINFO di;
   di.cbSize       = sizeof(DOCINFO);
   di.lpszDocName  = hb_parcx( 2 );
   di.lpszOutput   = (LPTSTR) ( ISNIL( 3 ) ? NULL : hb_parcx( 3 ) );
   di.lpszDatatype = (LPTSTR) ( ISNIL( 4 ) ? NULL : hb_parcx( 4 ) );
   di.fwType       = (DWORD)  ( ISNIL( 5 ) ? 0 : hb_parnl( 5 ) );

   hb_retni( StartDoc( (HDC) HB_PARWH( 1 ), &di ) );
}
whtprn.c28
HB_FUNCVWN_ENDDOC(void)
HB_FUNC( VWN_ENDDOC )
{
   hb_retni(EndDoc( (HDC) HB_PARWH( 1 ) ) );
}
whtprn.c42
HB_FUNCVWN_ABORTDOC(void)
HB_FUNC( VWN_ABORTDOC )
{
   hb_retni( AbortDoc( (HDC) HB_PARWH( 1 ) ) );
}
whtprn.c52
HB_FUNCVWN_STARTPAGE(void)
HB_FUNC( VWN_STARTPAGE )
{
   hb_retni( StartPage( (HDC) HB_PARWH( 1 ) ) );
}
whtprn.c60
HB_FUNCVWN_ENDPAGE(void)
HB_FUNC( VWN_ENDPAGE )
{
   hb_retni( EndPage( (HDC) HB_PARWH( 1 ) ) );
}


//-----------------------------------------------------------------------------
// WINGDIAPI int WINAPI Escape( IN HDC, IN int, IN int, IN LPCSTR, OUT LPVOID);

whtprn.c67
whtrect.c
TypeFunctionSourceLine
HB_FUNCVWN_DRAWFOCUSRECT(void)
HB_FUNC( VWN_DRAWFOCUSRECT )
{
   RECT lprc ;

   if (ISARRAY(2) && Array2Rect( hb_param( 2 ,HB_IT_ARRAY ) , &lprc ) )
      hb_retl( DrawFocusRect( (HDC) HB_PARWH( 1 ), &lprc ) );
   else
      hb_retl(FALSE);
}
whtrect.c42
HB_FUNCVWN_INTERSECTCLIPRECT(void)
HB_FUNC( VWN_INTERSECTCLIPRECT )
{
   hb_retni( IntersectClipRect( (HDC) HB_PARWH( 1 ),
                                hb_parni( 2 )      ,
                                hb_parni( 3 )      ,
                                hb_parni( 4 )      ,
                                hb_parni( 5 )
                                ) );
}

//-----------------------------------------------------------------------------
//WINUSERAPI int WINAPI FillRect( IN HDC hDC, IN CONST RECT *lprc, IN HBRUSH hbr);
//SYNTAX FILLRect(nHdc,aRect,hBrush) -> nil

// ok
/*
HB_FUNC( VWN_FILLRECT )
{
   RECT rc;

   if (Array2Rect( hb_param( 2 , HB_IT_ARRAY) , &rc) )
      hb_retni( FillRect(
       (HDC) HB_PARWH( 1 ),   // handle to device context
       &rc, // pointer to structure with rectangle
       (HBRUSH) HB_PARWH( 3 )    // handle to brush
   ) );
}
*/



//-----------------------------------------------------------------------------
// WINUSERAPI int WINAPI FillRect( IN HDC hDC, IN CONST RECT *lprc, IN HBRUSH hbr);

/* Call as
   Local aSrc := { 11 , 25 , 32 , 18 }
   FILLRECT(nDC,aSrc,hbr)
*/

// rewritten in _WinDraw.c

/*

HB_FUNC( VWN_FILLRECT )
{
   RECT   lprc ;
   PHB_ITEM pSrc1;

    if (Array2Rect( hb_param( 2 , HB_IT_ARRAY) , &rc) )
      hb_retni( FillRect( (HDC) HB_PARWH( 1 ), &lprc, (HBRUSH) HB_PARWH( 3 ) ) );
   }
   else
    hb_retni(0);
}

*/


//-----------------------------------------------------------------------------
// WINUSERAPI int WINAPI FrameRect( IN HDC hDC, IN CONST RECT *lprc, IN HBRUSH hbr);

/* Call as
   Local aSrc := { 11 , 25 , 32 , 18 }
   FRAMERECT(nDC,aSrc,hbr)
*/

// re written in _WinDraw.c

/*
HB_FUNC( VWN_FRAMERECT )
{
   RECT   lprc ;

   PHB_ITEM pSrc1;

 if (Array2Rect( hb_param( 2 , HB_IT_ARRAY) , &lprc) )
      hb_retni( FrameRect( (HDC) HB_PARWH( 1 ), &lprc, (HBRUSH) HB_PARWH( 3 ) ) );
   }
   else
      hb_retni( 0 );
}

*/

//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI InvertRect( IN HDC hDC, IN CONST RECT *lprc);

/* Call as
   Local aSrc := { 11 , 25 , 32 , 18 }
   INVERTRECT(nDC,aSrc,hbr)
*/

// rewritten in _WinDraw.c

whtrect.c56
HB_FUNCVWN_SETRECT(void)
HB_FUNC( VWN_SETRECT )
{
   RECT lprc    ;

   if ( SetRect( &lprc         ,
                     hb_parni( 1 ),
                     hb_parni( 2 ),
                     hb_parni( 3 ),
                     hb_parni( 4 )
                   ) ) {
      hb_itemRelease(hb_itemReturn(Rect2Array( &lprc)));
   }
   else
      hb_ret( );

}
whtrect.c174
HB_FUNCVWN_SETRECTEMPTY(void)
HB_FUNC( VWN_SETRECTEMPTY )
{
   RECT lprc ;
   if( SetRectEmpty( &lprc ) ) {
       hb_itemRelease(hb_itemReturn(Rect2Array( &lprc)));
   }
   else
      hb_ret();

}
whtrect.c202
HB_FUNCVWN_COPYRECT(void)
HB_FUNC( VWN_COPYRECT )
{
   RECT   lprcDst ;
   RECT   lprcSrc ;
   if ( Array2Rect(hb_param( 1, HB_IT_ARRAY ) , &lprcSrc ))
      {
      if ( CopyRect( &lprcDst, &lprcSrc ) ){
          hb_itemRelease(hb_itemReturn(Rect2Array( &lprcDst)));

      }
      else
         hb_ret();
      }
   else
     hb_ret();

}
whtrect.c225
HB_FUNCVWN_INFLATERECT(void)
HB_FUNC( VWN_INFLATERECT )
{
   RECT lprc ;
   PHB_ITEM pArray=hb_param( 1, HB_IT_ARRAY );

   if ( Array2Rect( pArray , &lprc ))
      {
      if ( InflateRect( &lprc, hb_parni( 2 ), hb_parni( 3 ) ) )
{
         Rect2ArrayEx( &lprc,pArray );
         hb_retl( TRUE );
      }
      else
         hb_retl(FALSE);
   }
   else
      hb_retl(FALSE);

}
whtrect.c253
HB_FUNCVWN_INTERSECTRECT(void)
HB_FUNC( VWN_INTERSECTRECT )
{
   RECT   lprcDst  ;
   RECT   lprcSrc1 ;
   RECT   lprcSrc2 ;

   if ( Array2Rect(hb_param( 1, HB_IT_ARRAY ) , &lprcSrc1 )  && Array2Rect(hb_param( 2, HB_IT_ARRAY ) , &lprcSrc2 ))
   {
      if (IntersectRect( &lprcDst, &lprcSrc1, &lprcSrc2 ) )
        hb_itemRelease(hb_itemReturn(Rect2Array( &lprcDst)));
     else
        hb_ret();

   }
   else
      hb_ret();

}
whtrect.c285
HB_FUNCVWN_UNIONRECT(void)
HB_FUNC( VWN_UNIONRECT )
{
   RECT lprcDst  ;
   RECT   lprcSrc1 ;
   RECT   lprcSrc2 ;


  if ( Array2Rect(hb_param( 1, HB_IT_ARRAY ) , &lprcSrc1 )  && Array2Rect(hb_param( 2, HB_IT_ARRAY ) , &lprcSrc2 ))
   {
      if (UnionRect( &lprcDst, &lprcSrc1, &lprcSrc2 ) )
         {
         hb_itemRelease(hb_itemReturn(Rect2Array( &lprcDst)));
      }
      else
         hb_ret();
   }
   else
      hb_ret();
}
whtrect.c317
HB_FUNCVWN_SUBTRACTRECT(void)
HB_FUNC( VWN_SUBTRACTRECT )
{
   RECT lprcDst  ;
   RECT   lprcSrc1 ;
   RECT   lprcSrc2 ;

  if ( Array2Rect(hb_param( 1, HB_IT_ARRAY ) , &lprcSrc1 )  && Array2Rect(hb_param( 2, HB_IT_ARRAY ) , &lprcSrc2 ))
   {
      if (SubtractRect( &lprcDst, &lprcSrc1, &lprcSrc2 ))
      {
         hb_itemRelease(hb_itemReturn(Rect2Array(&lprcDst)));

      }
      else
         hb_ret();
   }
   else
      hb_ret();
}
whtrect.c350
HB_FUNCVWN_OFFSETRECT(void)
HB_FUNC( VWN_OFFSETRECT )
{
   RECT lprc ;
   PHB_ITEM pSrc1=hb_param( 1, HB_IT_ARRAY );

   if (ISARRAY(1) && Array2Rect( pSrc1, &lprc))
   {
       if(OffsetRect( &lprc, hb_parni( 2 ), hb_parni( 3 ) ))
         {
           Rect2ArrayEx(&lprc,pSrc1);
           hb_retl(TRUE);
         }
       else
           hb_retl(FALSE);
      }
   else
      hb_retl(FALSE);
}
whtrect.c381
HB_FUNCVWN_ISRECTEMPTY(void)
HB_FUNC( VWN_ISRECTEMPTY )
{
   RECT lprc ;
   PHB_ITEM pSrc1=hb_param( 1, HB_IT_ARRAY );

   if (ISARRAY(1) && Array2Rect( pSrc1, &lprc))
   {
      hb_retl( IsRectEmpty( &lprc ) );
   }
   else
      hb_retl(FALSE);

}
whtrect.c411
HB_FUNCVWN_EQUALRECT(void)
HB_FUNC( VWN_EQUALRECT )
{
   RECT lprc1 ;
   RECT lprc2 ;
   PHB_ITEM pSrc1=hb_param( 1 ,HB_IT_ARRAY ),pSrc2=hb_param( 2 ,HB_IT_ARRAY );

   if (Array2Rect( pSrc1, &lprc1) && Array2Rect( pSrc2, &lprc2))
   {
      hb_retl( EqualRect( &lprc1, &lprc2 ) );
   }
   else
      hb_retl(FALSE);
}
whtrect.c430
HB_FUNCVWN_PTINRECT(void)
HB_FUNC( VWN_PTINRECT )
{
   RECT  lprc ;
   POINT pt   ;
   PHB_ITEM pSrc1=hb_param( 1, HB_IT_ARRAY ),pSrc2=hb_param( 2, HB_IT_ARRAY );

   if (Array2Rect( pSrc1, &lprc) && Array2Point( pSrc2, &pt))
   {
      hb_retl( (BOOL) PtInRect( &lprc, pt ) );

   }
   else
      hb_retl( FALSE);

}
whtrect.c461
HB_FUNCVWN_EXCLUDECLIPRECT(void)
HB_FUNC( VWN_EXCLUDECLIPRECT )
{
   hb_retni( ExcludeClipRect( (HDC) HB_PARWH( 1 ),
                              hb_parni( 2 )      ,
                              hb_parni( 3 )      ,
                              hb_parni( 4 )      ,
                              hb_parni( 5 )
                              ) );
}
whtrect.c483
HB_FUNCVWN_RECTVISIBLE(void)
HB_FUNC( VWN_RECTVISIBLE )
{
   RECT rc;

   if ( ISARRAY(2) && Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ))
      hb_retl( RectVisible( (HDC) HB_PARWH( 1 ), &rc ) );
   else
      hb_retl(0);

}
whtrect.c499
HB_FUNCVWN_VALIDATERECT(void)
HB_FUNC( VWN_VALIDATERECT )
{
   RECT rc ;

   if (ISARRAY( 2 ) && Array2Rect( hb_param( 2, HB_IT_ARRAY ), &rc ) )
      hb_retl( ValidateRect( (HWND) HB_PARWH( 1 ), &rc) );
   else
      hb_retl(ValidateRect( (HWND) HB_PARWH( 1 ),NULL));
}
whtrect.c530
whtreg.c
TypeFunctionSourceLine
HB_FUNCVWN_REGCLOSEKEY(void)
HB_FUNC( VWN_REGCLOSEKEY )
{

   HKEY hwHandle = ( HKEY ) HB_PARWH( 1 );

   if ( RegCloseKey( hwHandle ) == ERROR_SUCCESS )
      {
         hb_retnl( ERROR_SUCCESS );
      }

   else
      {
         hb_retnl( -1 );
      }

}
whtreg.c69
HB_FUNCVWN_REGOPENKEYEX(void)
HB_FUNC( VWN_REGOPENKEYEX )
{

   HKEY hwKey = ( ( HKEY ) HB_PARWH( 1 ) );
   LPCTSTR lpValue=hb_parcx( 2 );
   LONG lError;
   HKEY phwHandle;

   lError = RegOpenKeyExA( ( HKEY ) hwKey , lpValue , 0 , KEY_ALL_ACCESS , &phwHandle );

   if ( lError > 0 )
      {
         hb_retnl( -1 );
      }

   else
      {
         hb_stornl( PtrToLong( phwHandle ) , 5 );
         hb_retnl( 0 );
      }
}
whtreg.c86
HB_FUNCVWN_REGQUERYVALUEEX(void)
HB_FUNC( VWN_REGQUERYVALUEEX )
{
   LONG lError;
   DWORD lpType=hb_parnl( 4 );

   DWORD lpcbData=0;
   lError=RegQueryValueExA( ( HKEY ) HB_PARWH( 1 ) , ( LPTSTR ) hb_parcx( 2 ) , NULL , &lpType , NULL , &lpcbData );

   if ( lError == ERROR_SUCCESS )
   {
      BYTE *lpData;
      lpData=(BYTE*)malloc( ( int ) lpcbData+1 );
      lError= RegQueryValueExA( ( HKEY ) HB_PARWH( 1 ) , ( LPTSTR ) hb_parcx( 2 ) , NULL , &lpType , ( BYTE* ) lpData , &lpcbData );

      if ( lError > 0 )
      {
         hb_retnl( -1 );
      }
      else
      {
         hb_storc( ( char *)lpData , 5 );
         hb_retnl( 0 );
      }

      free( ( BYTE* ) lpData );
   }

}
whtreg.c108
HB_FUNCVWN_REGENUMKEYEX(void)
HB_FUNC( VWN_REGENUMKEYEX )
{

   FILETIME ft;
   long bErr;
   TCHAR Buffer[255];
   DWORD dwBuffSize = 255;
   TCHAR Class[255];
   DWORD dwClass = 255;

    bErr = RegEnumKeyEx( ( HKEY ) HB_PARWH( 1 ) , hb_parnl( 2 ) , Buffer , &dwBuffSize , NULL , Class , &dwClass , &ft );

    if ( bErr != ERROR_SUCCESS )
      {
         hb_retnl( bErr );
      }
    else
      {
         hb_storc( Buffer , 3 );
         hb_stornl( ( long ) dwBuffSize , 4 );
         hb_storc( Class , 6 );
         hb_stornl( ( long ) dwClass , 7 );

         hb_retnl( ERROR_SUCCESS );
      }
}
whtreg.c138
HB_FUNCVWN_REGSETVALUEEX(void)
HB_FUNC( VWN_REGSETVALUEEX )
{

   hb_retnl( RegSetValueExA( ( HKEY ) HB_PARWH( 1 ), hb_parcx( 2 ), 0, hb_parnl( 4 ), ( BYTE * const ) hb_parcx( 5 ), ( strlen( hb_parcx( 5 ) ) + 1 ) ) );

}
whtreg.c166
HB_FUNCVWN_REGCREATEKEY(void)
HB_FUNC( VWN_REGCREATEKEY )
{
   HKEY hKey;
   LONG nErr;

   nErr = RegCreateKey( ( HKEY ) HB_PARWH( 1 ) , hb_parcx( 2 ) , &hKey );
   if ( nErr == ERROR_SUCCESS )
   {
      hb_stornl( PtrToLong( hKey ) , 3 );
   }
   hb_retnl( nErr );

}
whtreg.c173
HB_FUNCVWN_REGCREATEKEYEX(void)
HB_FUNC( VWN_REGCREATEKEYEX )
{

  HKEY hkResult ;
  DWORD dwDisposition ;
  LONG nErr ;
  SECURITY_ATTRIBUTES *sa = NULL;

  if (ISCHAR(7))
       sa = (SECURITY_ATTRIBUTES *) hb_parc( 7 ); //hb_param(7, HB_IT_STRING)->item.asString.value;

  nErr = RegCreateKeyEx( (HKEY)    HB_PARWH( 1 ) ,
                         (LPCSTR)  hb_parcx( 2 )  ,
                         (DWORD)   0             ,
                         (LPSTR)   hb_parcx( 4 )  ,
                         (DWORD)   hb_parnl( 5 ) ,
                         (DWORD)   hb_parnl( 6 ) ,
                         sa                      ,
                         &hkResult               ,
                         &dwDisposition )        ;

  if ( nErr == ERROR_SUCCESS )
  {
    HB_STORWH( hkResult, 8 );
    hb_stornl( (LONG) dwDisposition, 9 );
  }
  hb_retnl( nErr );

}
whtreg.c204
HB_FUNCVWN_REGDELETEKEY(void)
HB_FUNC( VWN_REGDELETEKEY )
{
   if ( RegDeleteKeyA( ( HKEY ) HB_PARWH( 1 ), ( LPCTSTR ) hb_parcx( 2 ) ) == ERROR_SUCCESS )
      hb_retnl( 0 );
   else
      hb_retnl( -1 );
}
whtreg.c235
HB_FUNCVWN_REGDELETEVALUE(void)
HB_FUNC( VWN_REGDELETEVALUE )
{
   if ( RegDeleteValue( ( HKEY ) HB_PARWH( 1 ), hb_parcx( 2 ) ) == ERROR_SUCCESS )
      hb_retnl( 0 );
   else
      hb_retnl( -1 );
}
whtreg.c246
whtrgn.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATEELLIPTICRGN(void)
HB_FUNC( VWN_CREATEELLIPTICRGN )
{
   HB_RETWH( CreateEllipticRgn( hb_parni( 1 ),
                                       hb_parni( 2 ),
                                       hb_parni( 3 ),
                                       hb_parni( 4 )
                                       ) );
}
whtrgn.c29
HB_FUNCVWN_CREATEELLIPTICRGNINDIRECT(void)
HB_FUNC( VWN_CREATEELLIPTICRGNINDIRECT )
{
   RECT rc;

   if (ISARRAY( 1 ) && Array2Rect( hb_param( 1, HB_IT_ARRAY ), &rc ) )
      HB_RETWH( CreateEllipticRgnIndirect( &rc ) );
   else
      hb_retnl( 0 );
}
whtrgn.c44
HB_FUNCVWN_FILLRGN(void)
HB_FUNC( VWN_FILLRGN )
{
   hb_retl( FillRgn( (HDC) HB_PARWH( 1 )   ,
                     (HRGN) HB_PARWH( 2 )  ,
                     (HBRUSH) HB_PARWH( 3 )
                     ) );
}
whtrgn.c58
HB_FUNCVWN_CREATEPOLYGONRGN(void)
HB_FUNC( VWN_CREATEPOLYGONRGN )
{
   POINT * Point ;
   POINT pt ;
   int iCount ;
   int i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 1 ) )
   {
       iCount = (int) hb_parinfa( 1, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(1,HB_IT_ARRAY);

       for ( i = 0 ; i
whtrgn.c72
HB_FUNCVWN_CREATEPOLYPOLYGONRGN(void)
HB_FUNC( VWN_CREATEPOLYPOLYGONRGN )
{
   POINT * Point ;
   INT * PolyPoints ;
   int iPolyCount ;
   int iCount ;
   POINT pt ;
   int i ;
   PHB_ITEM aParam ;
   PHB_ITEM aSub ;

   if (ISARRAY( 1 ) && ISARRAY( 2 ) )
   {
       iPolyCount = hb_parinfa(2,0);
       PolyPoints = ( INT *) hb_xgrab( iPolyCount * sizeof( INT ) );

       for ( i=0 ; i < iPolyCount ; i++ )
       {
          *(PolyPoints+i) = hb_parni( 2,i+1);
       }

       iCount = hb_parinfa( 1, 0 );
       Point = (POINT *) hb_xgrab( iCount * sizeof (POINT) );
       aParam = hb_param(1,HB_IT_ARRAY);

       for ( i = 0 ; i
whtrgn.c115
HB_FUNCVWN_CREATERECTRGN(void)
HB_FUNC( VWN_CREATERECTRGN )
{
   HB_RETWH( CreateRectRgn( hb_parni( 1 ),
                                   hb_parni( 2 ),
                                   hb_parni( 3 ),
                                   hb_parni( 4 )
                                   ) );
}
whtrgn.c172
HB_FUNCVWN_CREATERECTRGNINDIRECT(void)
HB_FUNC( VWN_CREATERECTRGNINDIRECT )
{

   RECT rc;

   if (ISARRAY( 1 ) && Array2Rect( hb_param( 1, HB_IT_ARRAY ), &rc ) )
      HB_RETWH( CreateRectRgnIndirect( &rc ) );
   else
      hb_retnl( 0 );
}
whtrgn.c187
HB_FUNCVWN_CREATEROUNDRECTRGN(void)
HB_FUNC( VWN_CREATEROUNDRECTRGN )
{
   HB_RETWH( CreateRoundRectRgn( hb_parni( 1 ),
                                        hb_parni( 2 ),
                                        hb_parni( 3 ),
                                        hb_parni( 4 ),
                                        hb_parni( 5 ),
                                        hb_parni( 6 )
                                        ) );
}
whtrgn.c204
HB_FUNCVWN_COMBINERGN(void)
HB_FUNC( VWN_COMBINERGN )
{
    hb_retni( CombineRgn( (HRGN) HB_PARWH(1), (HRGN) HB_PARWH(2),
                          (HRGN) HB_PARWH(3), hb_parni(4) ) );

}
whtrgn.c223
HB_FUNCVWN_GETREGIONDATA(void)
HB_FUNC( VWN_GETREGIONDATA )
{
   RGNDATA *RgnData ;
   DWORD nBytes = GetRegionData( (HRGN) HB_PARWH( 1 ) , 0, NULL );
   DWORD nRet ;

   if ( nBytes )
   {
     RgnData = (RGNDATA *) hb_xgrab( nBytes );
     nRet = GetRegionData( (HRGN) HB_PARWH( 1 ) ,
                             nBytes             ,
                             RgnData
                         );
     if ( nRet == 1 )
         hb_retclen( ( char *) RgnData,nBytes );

     hb_xfree( RgnData);
   }

}
whtrgn.c238
HB_FUNCVWN_EXTSELECTCLIPRGN(void)
HB_FUNC( VWN_EXTSELECTCLIPRGN )
{
   hb_retni( ExtSelectClipRgn( (HDC) HB_PARWH( 1 ) ,
                               (HRGN) HB_PARWH( 2 ),
                               hb_parni( 3 )
                               ) );
}
whtrgn.c264
HB_FUNCVWN_RECTINREGION(void)
HB_FUNC( VWN_RECTINREGION )
{
    RECT rc;

   if (ISARRAY( 2 ) && Array2Rect( hb_param( 2, HB_IT_ARRAY ), &rc ) )
      hb_retl( RectInRegion( (HRGN) HB_PARWH( 1 ), &rc ) );
}
whtrgn.c278
HB_FUNCVWN_GETRANDOMRGN(void)
HB_FUNC( VWN_GETRANDOMRGN )
{
   hb_retni( GetRandomRgn( (HDC) HB_PARWH( 1 ) ,
                           (HRGN) HB_PARWH( 2 ),
                           hb_parni( 3 )
                           ) );
}
whtrgn.c291
HB_FUNCVWN_GETCLIPRGN(void)
HB_FUNC( VWN_GETCLIPRGN )
{
   hb_retni( GetClipRgn( (HDC) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c304
HB_FUNCVWN_FRAMERGN(void)
HB_FUNC( VWN_FRAMERGN )
{
   hb_retl( FrameRgn( (HDC) HB_PARWH( 1 )   ,
                      (HRGN) HB_PARWH( 2 )  ,
                      (HBRUSH) HB_PARWH( 3 ),
                      hb_parni( 4 )         ,
                      hb_parni( 5 )
                      ) );
}
whtrgn.c314
HB_FUNCVWN_EQUALRGN(void)
HB_FUNC( VWN_EQUALRGN )
{
   hb_retl( EqualRgn( (HRGN) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c328
HB_FUNCVWN_INVALIDATERGN(void)
HB_FUNC( VWN_INVALIDATERGN )
{
   hb_retl( InvalidateRgn( (HWND) HB_PARWH( 1 ),
                           (HRGN) HB_PARWH( 2 ),
                           hb_parl( 3 )
                         ) );
}
whtrgn.c357
HB_FUNCVWN_VALIDATERGN(void)
HB_FUNC( VWN_VALIDATERGN )
{
   hb_retl( ValidateRgn( (HWND) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c369
HB_FUNCVWN_INVERTRGN(void)
HB_FUNC( VWN_INVERTRGN )
{
   hb_retl( InvertRgn( (HDC) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c378
HB_FUNCVWN_OFFSETCLIPRGN(void)
HB_FUNC( VWN_OFFSETCLIPRGN )
{
   hb_retni( OffsetClipRgn( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtrgn.c387
HB_FUNCVWN_OFFSETRGN(void)
HB_FUNC( VWN_OFFSETRGN )
{
   hb_retni( OffsetRgn( (HRGN) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtrgn.c396
HB_FUNCVWN_PAINTRGN(void)
HB_FUNC( VWN_PAINTRGN )
{
   hb_retl( PaintRgn( (HDC) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c405
HB_FUNCVWN_PATHTOREGION(void)
HB_FUNC( VWN_PATHTOREGION )
{
   HB_RETWH( PathToRegion( (HDC) HB_PARWH( 1 ) ) );
}
whtrgn.c414
HB_FUNCVWN_PTINREGION(void)
HB_FUNC( VWN_PTINREGION )
{
   hb_retl( PtInRegion( (HRGN) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtrgn.c423
HB_FUNCVWN_SELECTCLIPRGN(void)
HB_FUNC( VWN_SELECTCLIPRGN )
{
   hb_retni( SelectClipRgn( (HDC) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtrgn.c434
HB_FUNCVWN_SETRECTRGN(void)
HB_FUNC( VWN_SETRECTRGN )
{
   hb_retl( SetRectRgn( (HRGN) HB_PARWH( 1 ),
                        hb_parni( 2 )       ,
                        hb_parni( 3 )       ,
                        hb_parni( 4 )       ,
                        hb_parni( 5 )
                        ) );
}
whtrgn.c443
HB_FUNCVWN_GETUPDATERGN(void)
HB_FUNC( VWN_GETUPDATERGN )
{
   hb_retni( GetUpdateRgn( (HWND) HB_PARWH( 1 ),
                           (HRGN) HB_PARWH( 2 ),
                           hb_parl( 3 )
                         ) );
}
whtrgn.c458
HB_FUNCVWN_EXCLUDEUPDATERGN(void)
HB_FUNC( VWN_EXCLUDEUPDATERGN )
{
   hb_retni( ExcludeUpdateRgn( (HDC) HB_PARWH( 1 ), (HWND) HB_PARWH( 2 ) ) );
}



//-----------------------------------------------------------------------------
// WINGDIAPI int WINAPI GetRgnBox( IN HRGN, OUT LPRECT);


// Syntax
// GetRgnBox(hRgn,@aRect) -> nType, or NIL


whtrgn.c470
whtscrlb.c
TypeFunctionSourceLine
HB_FUNCVWN_SETSCROLLPOS(void)
HB_FUNC( VWN_SETSCROLLPOS )
{
   hb_retni( SetScrollPos( (HWND) HB_PARWH( 1 ),
                           hb_parni( 2 )       ,
                           hb_parni( 3 )       ,
                           hb_parl( 4 )
                         ) );
}
whtscrlb.c21
HB_FUNCVWN_GETSCROLLPOS(void)
HB_FUNC( VWN_GETSCROLLPOS )
{
   hb_retni( GetScrollPos( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtscrlb.c34
HB_FUNCVWN_SETSCROLLRANGE(void)
HB_FUNC( VWN_SETSCROLLRANGE )
{
   hb_retl( SetScrollRange( (HWND) HB_PARWH( 1 ),
                            hb_parni( 2 )       ,
                            hb_parni( 3 )       ,
                            hb_parni( 4 )       ,
                            hb_parl( 5 )
                          ) );
}
whtscrlb.c43
HB_FUNCVWN_GETSCROLLRANGE(void)
HB_FUNC( VWN_GETSCROLLRANGE )
{
   LPINT lpMinPos = 0 ;
   LPINT lpMaxPos = 0 ;

   if ( GetScrollRange( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), lpMinPos, lpMaxPos ) )
   {
      if ( ISBYREF(3) && ISBYREF(4) )
      {
         hb_storni(3,*lpMinPos);
         hb_storni(4,*lpMaxPos);
         hb_retl(1);
      }
      else
        hb_retl(0);
   }
   else
     hb_retl(0);

}
whtscrlb.c60
HB_FUNCVWN_SHOWSCROLLBAR(void)
HB_FUNC( VWN_SHOWSCROLLBAR )
{
   hb_retl( ShowScrollBar( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), hb_parl( 3 ) ) );
}
whtscrlb.c86
HB_FUNCVWN_ENABLESCROLLBAR(void)
HB_FUNC( VWN_ENABLESCROLLBAR )
{
   hb_retl( EnableScrollBar( (HWND) HB_PARWH( 1 ),
                             (UINT) hb_parni( 2 ),
                             (UINT) hb_parni( 3 )
                           ) );
}
whtscrlb.c95
HB_FUNCVWN_SETSCROLLINFO(void)
HB_FUNC( VWN_SETSCROLLINFO )
{
   SCROLLINFO * scrollInfo =  (SCROLLINFO * ) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value;

   hb_retni( SetScrollInfo( (HWND) HB_PARWH( 1 ),
                            hb_parni( 2 )       ,
                            scrollInfo          ,
                            hb_parl( 4 )
                          ) );
}
whtscrlb.c110
HB_FUNCVWN_GETSCROLLINFO(void)
HB_FUNC( VWN_GETSCROLLINFO )
{
   SCROLLINFO si ;
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask  = SIF_ALL ;

   if ( GetScrollInfo( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), &si ) )
      hb_retclen( (char *) &si, sizeof( SCROLLINFO ) );

      // problem
      //hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) &si, sizeof( SCROLLINFO ) );

}
whtscrlb.c128
HB_FUNCVWN_GETSCROLLBARINFO(void)
HB_FUNC( VWN_GETSCROLLBARINFO )
{
   SCROLLBARINFO sbi     ;

   if ( GetScrollBarInfo( (HWND) HB_PARWH( 1 ), hb_parnl( 2 ), &sbi ) )
       hb_retclen( (char *) &sbi, sizeof( SCROLLBARINFO ) );

     // problem
     // hb_itemPutCRaw( hb_param( -1, HB_IT_ANY ), (char *) &sbi, sizeof( SCROLLBARINFO ) );
}
whtscrlb.c151
whtseria.c
TypeFunctionSourceLine
HB_FUNCVWN_BUILDCOMMDCB(void)
BuildComm( cComParam, @dcbInfo )
dcb:buffer( dcbInfo )
*/
HB_FUNC( VWN_BUILDCOMMDCB )
{
   DCB dcb ;

   hb_retl( BuildCommDCB( ( LPCTSTR ) hb_parcx( 1 ), &dcb ) );

   hb_storclen( ( char * ) &dcb, sizeof( DCB ), 2 );
}

//-------------------------------------------------------------------//
/*
BOOL BuildCommDCBAndTimeouts(
  LPCTSTR         lpDef,          // device-control string           IN
  LPDCB           lpDCB,          // device-control block           OUT
  LPCOMMTIMEOUTS  lpCommTimeouts  // device time-out values          IN
);
local dcb IS DCB
local CommTimeOuts IS COMMTIMEOUTS
local dcbInfo := dcb:value
local cComParam := 'COM1: baud=9600 parity=N data=8 stop=1 to=ON'
whtseria.c39
HB_FUNCVWN_BUILDCOMMDCBANDTIMEOUTS(void)
BuildComDCBAndTimeouts( cCommParam, @dcbInfo, CommTimeOuts:value )
dcb:buffer( dcbInfo )
*/
//
HB_FUNC( VWN_BUILDCOMMDCBANDTIMEOUTS )
{
   DCB dcb ;
   LPCOMMTIMEOUTS lptimeouts = ( LPCOMMTIMEOUTS ) hb_parcx( 3 );
   hb_retl( BuildCommDCBAndTimeouts( ( LPCTSTR ) hb_parcx( 1 ), &dcb, lptimeouts ) );

   hb_storclen( ( char * ) &dcb, sizeof( DCB ), 2 );
}
whtseria.c63
HB_FUNCVWN_CLEARCOMMBREAK(void)
HB_FUNC( VWN_CLEARCOMMBREAK )
{
   hb_retl( ClearCommBreak( ( HANDLE ) HB_PARWH( 1 ) ) );
}
whtseria.c76
HB_FUNCVWN_CLEARCOMMERROR(void)
HB_FUNC( VWN_CLEARCOMMERROR )
{
   DWORD   err = 0 ;
   COMSTAT Stat ;

   hb_retl( ClearCommError( ( HANDLE ) HB_PARWH( 1 ), &err, &Stat ) );

   hb_stornl( err, 2 );
   hb_storclen( ( char * ) &Stat, sizeof( COMSTAT ), 3 );
}

//-------------------------------------------------------------------//
/*
BOOL CommConfigDialog(
  LPCTSTR lpszName,   // device name string                          IN
  HWND hWnd,          // handle to window                            IN
  LPCOMMCONFIG lpCC   // configuration information               IN/OUT
);
local cDeviceName := 'Standard Modem over IR link #4'
local hWnd        := nil
local CommConfig IS COMMCONFIG
local cCommConfig := CommConfig:value
whtseria.c92
HB_FUNCVWN_COMMCONFIGDIALOG(void)
if CommConfigDialog( cDeviceName, hWnd, @cCommConfig )
   ? 'Hurray'
   CommConfig:buffer( cCommConfig )
endif
*/
HB_FUNC( VWN_COMMCONFIGDIALOG )
{
   LPCTSTR      lpszName = ( LPCTSTR ) hb_parcx( 1 );
   HWND         hwnd     = ISNIL( 2 ) ? NULL : ( HWND ) HB_PARWH( 2 );
   LPCOMMCONFIG lpCC     = ( LPCOMMCONFIG ) hb_parcx( 3 );

   hb_retl( CommConfigDialog( lpszName, hwnd, lpCC ) );

   hb_storclen( ( char * ) lpCC, sizeof( COMMCONFIG ), 3 );
}

//-------------------------------------------------------------------//
/*
BOOL EscapeCommFunction(
  HANDLE hFile,   // handle to communications device                 IN
  DWORD  dwFunc   // extended function to perform                    IN
);
local nFunc := CLRDTR  // CLRRTS, SETDTR, SETRTS, SETXOFF, SETXON, SETBREAK, CLRBREAK - one of these values
whtseria.c126
HB_FUNCVWN_ESCAPECOMMFUNCTION(void)
if EscapeCommFunction( hFile, nFunc )
   // ok
endif
*/
HB_FUNC( VWN_ESCAPECOMMFUNCTION )
{
   hb_retl( EscapeCommFunction( ( HANDLE ) HB_PARWH( 1 ), hb_parnl( 2 ) ) );
}
whtseria.c150
HB_FUNCVWN_GETCOMMCONFIG(void)
HB_FUNC( VWN_GETCOMMCONFIG )
{
   COMMCONFIG lpCC ; // = ( LPCOMMCONFIG ) hb_parcx( 2 );
   DWORD        size = sizeof( COMMCONFIG );

   hb_retl( GetCommConfig( ( HANDLE ) HB_PARWH( 1 ), &lpCC, &size ) );

   hb_storclen( ( char * ) &lpCC, size, 2 );
}
whtseria.c159
HB_FUNCVWN_GETCOMMMASK(void)
HB_FUNC( VWN_GETCOMMMASK )
{
   DWORD mask;
   hb_retl( GetCommMask( ( HANDLE ) HB_PARWH( 1 ), &mask ) );
   hb_stornl( ( ULONG ) mask, 2 );
}
whtseria.c180
HB_FUNCVWN_GETCOMMMODEMSTATUS(void)
HB_FUNC( VWN_GETCOMMMODEMSTATUS )
{
   DWORD modemStat ;
   hb_retl( GetCommModemStatus( ( HANDLE ) HB_PARWH( 1 ), &modemStat ) );
   hb_stornl( ( ULONG ) modemStat, 2 );
}
whtseria.c198
HB_FUNCVWN_GETCOMMPROPERTIES(void)
HB_FUNC( VWN_GETCOMMPROPERTIES )
{
   COMMPROP CommProp ;
   CommProp.wPacketLength = sizeof( COMMPROP );

   hb_retl( GetCommProperties( ( HANDLE ) HB_PARWH( 1 ), &CommProp ) );

   hb_storclen( ( char * ) &CommProp, sizeof( COMMPROP ), 2 );
}
whtseria.c216
HB_FUNCVWN_GETCOMMSTATE(void)
HB_FUNC( VWN_GETCOMMSTATE )
{
   DCB dcb ;
   dcb.DCBlength = sizeof( DCB );

   hb_retl( GetCommState( ( HANDLE ) HB_PARWH( 1 ), &dcb ) );

   hb_storclen( ( char * ) &dcb, sizeof( DCB ), 2 );
}
whtseria.c237
HB_FUNCVWN_GETCOMMTIMEOUTS(void)
HB_FUNC( VWN_GETCOMMTIMEOUTS )
{
   COMMTIMEOUTS Timeouts ;

   hb_retl( GetCommTimeouts( ( HANDLE ) HB_PARWH( 1 ), &Timeouts ) );

   hb_storclen( ( char * ) &Timeouts, sizeof( COMMTIMEOUTS ), 2 );
}
whtseria.c256
HB_FUNCVWN_GETDEFAULTCOMMCONFIG(void)
HB_FUNC( VWN_GETDEFAULTCOMMCONFIG )
{
   char * Buffer = (char *) hb_xgrab( sizeof( COMMCONFIG ) );
   DWORD size = sizeof( COMMCONFIG );

   if ( GetDefaultCommConfig( ( LPCTSTR ) hb_parcx( 1 ), ( COMMCONFIG * ) Buffer, &size ) == 0 )
   {
      hb_xfree( Buffer );
      Buffer = (char *) hb_xgrab( size );
      if ( GetDefaultCommConfig( ( LPCTSTR ) hb_parcx( 1 ), ( COMMCONFIG * ) Buffer, &size ) == 0 )
      {
         hb_xfree( Buffer );
         hb_retl( FALSE );
         return ;
      }
   }
   hb_retl( TRUE );
   hb_storclen( ( char * ) Buffer, size, 2 );
   hb_xfree( Buffer );
}
whtseria.c274
HB_FUNCVWN_PURGECOMM(void)
HB_FUNC( VWN_PURGECOMM )
{
   hb_retl( PurgeComm( ( HANDLE ) HB_PARWH( 1 ), hb_parnl( 2 ) ) );
}
whtseria.c304
HB_FUNCVWN_SETCOMMBREAK(void)
HB_FUNC( VWN_SETCOMMBREAK )
{
   hb_retl( SetCommBreak( ( HANDLE ) HB_PARWH( 1 ) ) );
}
whtseria.c319
HB_FUNCVWN_SETCOMMCONFIG(void)
HB_FUNC( VWN_SETCOMMCONFIG )
{
   LPCOMMCONFIG lpCC = ( LPCOMMCONFIG ) hb_parcx( 2 );
   DWORD        size = ISNIL( 3 ) ? ( DWORD ) sizeof( COMMCONFIG ) : ( DWORD ) hb_parnl( 3 );

   hb_retl( SetCommConfig( ( HANDLE ) HB_PARWH( 1 ), lpCC, size ) );
}
whtseria.c330
HB_FUNCVWN_SETCOMMMASK(void)
HB_FUNC( VWN_SETCOMMMASK )
{
   hb_retl( SetCommMask( ( HANDLE ) HB_PARWH( 1 ), hb_parnl( 2 ) ) );
}
whtseria.c347
HB_FUNCVWN_SETCOMMSTATE(void)
HB_FUNC( VWN_SETCOMMSTATE )
{
   LPDCB lpDCB = ( LPDCB ) hb_parcx( 2 );

   hb_retl( SetCommState( ( HANDLE ) HB_PARWH( 1 ), lpDCB ) );
}
whtseria.c361
HB_FUNCVWN_SETCOMMTIMEOUTS(void)
HB_FUNC( VWN_SETCOMMTIMEOUTS )
{
   LPCOMMTIMEOUTS lptimeouts = ( LPCOMMTIMEOUTS ) hb_parcx( 2 );

   hb_retl( SetCommTimeouts( ( HANDLE ) HB_PARWH( 1 ), lptimeouts ) );
}
whtseria.c375
HB_FUNCVWN_SETDEFAULTCOMMCONFIG(void)
HB_FUNC( VWN_SETDEFAULTCOMMCONFIG )
{
   LPCOMMCONFIG lpCC = ( LPCOMMCONFIG ) hb_parcx( 2 );
   DWORD        size = sizeof( COMMCONFIG );

   hb_retl( SetDefaultCommConfig( ( LPCTSTR ) hb_parcx( 1 ), lpCC, size ) );
}
whtseria.c389
HB_FUNCVWN_SETUPCOMM(void)
HB_FUNC( VWN_SETUPCOMM )
{
   hb_retl( SetupComm( ( HANDLE ) HB_PARWH( 1 ), hb_parnl( 2 ), hb_parnl( 3 ) ) );
}
whtseria.c405
HB_FUNCVWN_TRANSMITCOMMCHAR(void)
HB_FUNC( VWN_TRANSMITCOMMCHAR )
{
   hb_retl( TransmitCommChar( ( HANDLE ) HB_PARWH( 1 ), ( char ) hb_parni( 2 ) ) );
}
whtseria.c418
HB_FUNCVWN_WAITCOMMEVENT(void)
HB_FUNC( VWN_WAITCOMMEVENT )
{
   DWORD evMask ;

   hb_retl( WaitCommEvent( ( HANDLE ) HB_PARWH( 1 ), &evMask, NULL ) );
   hb_stornl( ( ULONG ) evMask, 2 );
}
whtseria.c430
whtshell.c
TypeFunctionSourceLine
HB_FUNCVWN_DRAGQUERYFILE(void)
HB_FUNC( VWN_DRAGQUERYFILE )
{

  char *cFile ;
  UINT iRet   ;

  if ( hb_parni( 4 ) > 0  )
    cFile = (char*) hb_xgrab( hb_parni(4) + 1 );
  else
    cFile = (char*) hb_xgrab( strlen( hb_parcx(3) ) + 1 );


  iRet = DragQueryFile( (HDROP) HB_PARWH( 1 ),
                        (UINT) hb_parni( 2 ) ,
                        hb_parni(4) > 0 ? cFile : NULL ,
                        (UINT) hb_parni( 4 )
                      );

   if (hb_parni( 4 ) > 0)
   {
      hb_storclen( cFile, iRet, 3 );
      hb_xfree( cFile );
   }
   hb_retni( iRet );
 }
whtshell.c25
HB_FUNCVWN_DRAGQUERYPOINT(void)
HB_FUNC( VWN_DRAGQUERYPOINT )
{
   POINT lpPoInt ;
   BOOL lRet ;
   lRet = DragQueryPoint( (HDROP) HB_PARWH( 1 ),(LPPOINT) &lpPoInt )  ;
   if (ISBYREF( 2 ) ){
      hb_stornl(2,lpPoInt.x,1);
      hb_stornl(2,lpPoInt.y,2);
   }
   hb_retl( lRet );

}
whtshell.c56
HB_FUNCVWN_DRAGFINISH(void)
HB_FUNC( VWN_DRAGFINISH )
{
   DragFinish( (HDROP) HB_PARWH( 1 ) );
}
whtshell.c74
HB_FUNCVWN_DRAGACCEPTFILES(void)
HB_FUNC( VWN_DRAGACCEPTFILES )
{
   DragAcceptFiles( (HWND) HB_PARWH( 1 ), hb_parl( 2 ) );
}
whtshell.c83
HB_FUNCVWN_SHELLEXECUTE(void)
HB_FUNC( VWN_SHELLEXECUTE )
{
   HB_RETWH( ShellExecute( (HWND) HB_PARWH( 1 )     ,
                                  (LPCSTR) hb_parcx( 2 )    ,
                                  (LPCSTR) hb_parcx( 3 )    ,
                                  ISNIL(4) ? NULL : (LPCSTR) hb_parcx( 4 )    ,
                                  (LPCSTR) hb_parcx( 5 )    ,
                                   hb_parni( 6 )
                                 ) );
}
whtshell.c92
HB_FUNCVWN_FINDEXECUTABLE(void)
HB_FUNC( VWN_FINDEXECUTABLE )
{

  char cBuffer[MAX_PATH];
  HINSTANCE hInst ;


   hInst = FindExecutable( (LPCSTR) hb_parcx( 1 )    ,
                           (LPCSTR) hb_parcx( 2 )    ,
                           (LPSTR)  cBuffer
                         );

   HB_RETWH( hInst);

   if( ( HB_PTRDIFF ) hInst > 32 )
      hb_storc( cBuffer, 3 );
}
whtshell.c106
HB_FUNCVWN_SHELLABOUT(void)
HB_FUNC( VWN_SHELLABOUT )
{
   hb_retni( ShellAbout( (HWND) HB_PARWH(1),
                         (LPCSTR) hb_parcx(2),
                         (LPCSTR) hb_parcx(3),
                         (ISNIL(4) ? NULL : (HICON) HB_PARWH(4) )
                       ) );
}
whtshell.c148
HB_FUNCVWN_DOENVIRONMENTSUBST(void)
HB_FUNC( VWN_DOENVIRONMENTSUBST )
{
   hb_retnl((LONG) DoEnvironmentSubst( (LPSTR) hb_parcx( 1 ) ,
                                       (UINT) hb_parni( 2 )
                                     ) );
}
whtshell.c178
HB_FUNCVWN_SHFILEOPERATION(void)
HB_FUNC( VWN_SHFILEOPERATION )
{
   SHFILEOPSTRUCT *sfo = (SHFILEOPSTRUCT *) hb_parc( 1 ); //hb_param(1, HB_IT_STRING)->item.asString.value;
   hb_retni( SHFileOperation( sfo ) );
}
whtshell.c212
HB_FUNCVWN_SHFREENAMEMAPPINGS(void)
HB_FUNC( VWN_SHFREENAMEMAPPINGS )
{
   SHFreeNameMappings( (HANDLE) HB_PARWH( 1 ) );
}
whtshell.c221
HB_FUNCVWN_SHELLEXECUTEEX(void)
HB_FUNC( VWN_SHELLEXECUTEEX )
{
   SHELLEXECUTEINFO *ExecInfo = (SHELLEXECUTEINFO *) hb_parc( 1 ); //hb_param(1, HB_IT_STRING)->item.asString.value;
   hb_retl( ShellExecuteEx( ExecInfo ) );
}



//-----------------------------------------------------------------------------
// SHSTDAPI_(void) WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
/*


// NT only ?
// ????

HB_FUNC( VWN_WINEXECERROR )
{
   WinExecError( (HWND) HB_PARWH( 1 ) ,
                 hb_parni( 2 )        ,
                 (LPCSTR) hb_parcx( 3 ),
                 (LPCSTR) hb_parcx( 4 )
                  );
}

*/

//-----------------------------------------------------------------------------
// SHSTDAPI_(BOOL) SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi);

whtshell.c231
HB_FUNCVWN_SHEMPTYRECYCLEBIN(void)
HB_FUNC( VWN_SHEMPTYRECYCLEBIN )
{
   hb_retnl(  SHEmptyRecycleBin( (HWND) HB_PARWH( 1 ) ,
                                 (LPCSTR) hb_parcx( 2 ),
                                 (DWORD) hb_parnl( 3 )
                                ) );
}
whtshell.c299
HB_FUNCVWN_SHELL_NOTIFYICON(void)
HB_FUNC( VWN_SHELL_NOTIFYICON )
{
   NOTIFYICONDATA * Data =  (NOTIFYICONDATA * ) hb_parc( 2 ); //hb_param(2, HB_IT_STRING)->item.asString.value;
   hb_retl( Shell_NotifyIcon( (DWORD) hb_parnl( 1 ), Data ) );
}



//-----------------------------------------------------------------------------
// SHSTDAPI_(DWORD_PTR) SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);

/*

HB_FUNC( VWN_SHGETFILEINFO )
{
   SHFILEINFOA psfi             ;

   // Your code goes here

// hb_retnl( SHGetFileInfo( (LPCSTR) hb_parcx( 1 )    ,
                            (DWORD) hb_parnl( 2 )    ,
                            &psfi                    ,
                            (UINT) hb_parni( 4 )     ,
                            (UINT) hb_parni( 5 )
                          ) );
}

*/

//-----------------------------------------------------------------------------
// SHSTDAPI_(BOOL) SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);

whtshell.c314
HB_FUNCVWN_SHINVOKEPRINTERCOMMAND(void)
HB_FUNC( VWN_SHINVOKEPRINTERCOMMAND )
{
   hb_retl( SHInvokePrinterCommand( (HWND) HB_PARWH( 1 ) ,
                                    (UINT) hb_parni( 2 ) ,
                                    (LPCSTR) hb_parcx( 3 ),
                                    (LPCSTR) hb_parcx( 4 ),
                                     hb_parl( 5 )
                                   ) );
}
whtshell.c386
whtsock.c
TypeFunctionSourceLine
HB_FUNCVWN_ACCEPT(void)
HB_FUNC( VWN_ACCEPT )
{
   char *addr  ;
   int addrlen ;

   if ( ISNIL(2) )
      hb_retnl( (LONG) accept( (SOCKET) hb_parnl(1), NULL, NULL ) );
   else
   {
      addr = hb_parcx(2);
      addrlen = ISNIL(3) ? hb_parni(3) : ( int ) hb_parclen(2);
      hb_retnl( (LONG) accept( (SOCKET) hb_parnl(1), ( struct sockaddr *) addr, &addrlen ) );
      hb_storclen( addr, addrlen, 2 );
      hb_storni( addrlen, 3);
   }
}
whtsock.c39
HB_FUNCVWN_BIND(void)
HB_FUNC( VWN_BIND )
{
   char *name = (char *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;

   hb_retni(( int ) bind( (SOCKET) hb_parnl(1), ( struct sockaddr *) name, hb_parni( 3 ) ) );
}
whtsock.c62
HB_FUNCVWN_CLOSESOCKET(void)
HB_FUNC( VWN_CLOSESOCKET )
{
   hb_retni( closesocket( (SOCKET) hb_parnl(1) ) );
}
whtsock.c73
HB_FUNCVWN_CONNECT(void)
HB_FUNC( VWN_CONNECT )
{
   char *name = (char *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;

   hb_retni( (int ) connect((SOCKET) hb_parnl( 1 ), ( struct sockaddr *) name, hb_parni( 3 ) ) );
}
whtsock.c84
HB_FUNCVWN_IOCTLSOCKET(void)
HB_FUNC( VWN_IOCTLSOCKET )
{
   ULONG arg = hb_parnl( 3 );

   hb_retni( (int ) ioctlsocket((SOCKET) hb_parnl( 1 ), hb_parnl( 2 ), &arg ) );
   hb_stornl( arg, 3 );
}
whtsock.c97
HB_FUNCVWN_GETPEERNAME(void)
HB_FUNC( VWN_GETPEERNAME )
{
   char *name  = (char *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;
   int addrlen = ISNIL(3) ? hb_parni(3) : ( int ) hb_parclen(2);

   hb_retni( (int ) getpeername((SOCKET) hb_parnl( 1 ), ( struct sockaddr *) name, &addrlen ) );
   hb_storclen( name, addrlen, 2 );
   hb_storni( addrlen, 3);
}
whtsock.c111
HB_FUNCVWN_GETSOCKNAME(void)
HB_FUNC( VWN_GETSOCKNAME )
{
   char *name  = (char *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;
   int addrlen = ISNIL(3) ? hb_parni(3) : ( int ) hb_parclen(2);

   hb_retni( (int ) getsockname((SOCKET) hb_parnl( 1 ), ( struct sockaddr *) name, &addrlen ) );
   hb_storclen( name, addrlen, 2 );
   hb_storni( addrlen, 3);
}
whtsock.c127
HB_FUNCVWN_GETSOCKOPT(void)
HB_FUNC( VWN_GETSOCKOPT )
{
   char *optval = (char *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ;
   int  optlen  = hb_parni( 5 );

   hb_retni( (int ) getsockopt( hb_parnl( 1 ) ,
                                hb_parni( 2 ),
                                hb_parni( 3 ),
                                optval      ,
                                &optlen
                              ) );

   hb_storclen( optval, optlen, 4 );
   hb_storni( optlen, 5 );
}
whtsock.c143
HB_FUNCVWN_HTONL(void)
HB_FUNC( VWN_HTONL )
{
   hb_retnl( (ULONG) htonl( hb_parnl( 1 ) ) );
}
whtsock.c163
HB_FUNCVWN_HTONS(void)
HB_FUNC( VWN_HTONS )
{
   hb_retni( (USHORT) htons( (USHORT) hb_parni( 1 ) ) );
}
whtsock.c172
HB_FUNCVWN_INET_ADDR(void)
HB_FUNC( VWN_INET_ADDR )
{
   hb_retnl( (ULONG) inet_addr( hb_parcx( 1 ) ) );
}
whtsock.c181
HB_FUNCVWN_INET_NTOA(void)
HB_FUNC( VWN_INET_NTOA )
{
   struct in_addr *in = (struct in_addr *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value ;

   hb_retc( inet_ntoa( *in ) );
}
whtsock.c190
HB_FUNCVWN_LISTEN(void)
HB_FUNC( VWN_LISTEN )
{
 hb_retni( (int) listen((SOCKET) hb_parnl( 1 ), hb_parni( 2 ) ) );
}
whtsock.c201
HB_FUNCVWN_NTOHL(void)
HB_FUNC( VWN_NTOHL )
{
   hb_retnl( (ULONG) ntohl( hb_parnl(1 ) ) );
}
whtsock.c210
HB_FUNCVWN_NTOHS(void)
HB_FUNC( VWN_NTOHS )
{
   hb_retni( ( USHORT ) ntohs( (USHORT) hb_parni(1) ) );
}
whtsock.c219
HB_FUNCVWN_RECV(void)
HB_FUNC( VWN_RECV )
{
   int  iBuffLen = (ISNIL(3) ? (ISNIL(2) ? 0 : ( int ) hb_parclen(2) ) : hb_parni(3));
   char   *buf  = ( char *) hb_xgrab(iBuffLen);
   int iRet;

   iRet = recv((SOCKET) hb_parnl( 1 ), buf, iBuffLen, hb_parni( 4 ) );
   if ( iRet && ISBYREF( 2 ) )
      hb_storclen( buf, iRet, 2 );

   hb_retni( iRet );
   hb_xfree( buf );
}
whtsock.c230
HB_FUNCVWN_RECVFROM(void)
HB_FUNC( VWN_RECVFROM )
{
   int  iBuffLen = (ISNIL(3) ? (ISNIL(2) ? 0 : ( int ) hb_parclen(2) ) : hb_parni(3));
   char *buf     = ( char *) hb_xgrab(iBuffLen);
   char *from    = (ISNIL(5) ? NULL : (char *) hb_parc( 5 )); //hb_param( 5, HB_IT_STRING )->item.asString.value );
   int  iAddrLen = (ISNIL(6) ? (ISNIL(5) ? 0 : ( int ) hb_parclen(5) ) : hb_parni(6));
   int  iRet;

   iRet = ( int ) recvfrom( (SOCKET) hb_parnl( 1 )  ,
                              buf         ,
                              iBuffLen,
                              hb_parni( 4 ),
                              ( struct sockaddr *)from  ,
                              &iAddrLen
                              );

   if ( iRet && ISBYREF( 2 ) )
      hb_storclen( buf, iRet, 2 );

   if ( iAddrLen && ISBYREF(5) )
      hb_storclen(from, iAddrLen, 5 );

   hb_retni( iRet );
   hb_xfree( buf );

}
whtsock.c250
HB_FUNCVWN_SOCKSELECT(void)
HB_FUNC( VWN_SOCKSELECT )
{
   fd_set   *readfds   = NULL;
   fd_set   *writefds  = NULL;
   fd_set   *exceptfds = NULL;
   struct timeval  *timeout = NULL;

   if ( ISCHAR( 2 ) )
      readfds = (fd_set *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING )->item.asString.value ;

   if ( ISCHAR( 3 ) )
      writefds = (fd_set *) hb_parc( 3 ); //hb_param( 3, HB_IT_STRING )->item.asString.value ;

   if ( ISCHAR( 4 ) )
      exceptfds = (fd_set *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ;

   if ( ISCHAR( 5 ) )
      timeout = (struct timeval *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ;

   hb_retni(( int ) select( hb_parni( 1 ),
                            readfds      ,
                            writefds     ,
                            exceptfds    ,
                            timeout
                           ) );

    if ( ISCHAR( 2 ) && ISBYREF( 2 ) )
       hb_storclen( ( char *) readfds, sizeof(fd_set), 2 );
    if ( ISCHAR( 3 ) && ISBYREF( 3 ) )
       hb_storclen( ( char *) writefds, sizeof(fd_set), 3 );
    if ( ISCHAR( 4 ) && ISBYREF( 4 ) )
       hb_storclen( ( char *) exceptfds, sizeof(fd_set), 4 );

 }
whtsock.c283
HB_FUNCVWN_SEND(void)
HB_FUNC( VWN_SEND )
{
   int  iBuffLen = (ISNIL(3) ? (ISNIL(2) ? 0 : ( int ) hb_parclen(2) ) : hb_parni(3));
   hb_retni( ( int ) send((SOCKET) hb_parnl( 1 ), hb_parcx(2), iBuffLen, hb_parni( 4 ) ) );
}
whtsock.c322
HB_FUNCVWN_SENDTO(void)
HB_FUNC( VWN_SENDTO )
{

   int  iBuffLen = (ISNIL(3) ? ( ISNIL(2) ? 0 : ( int ) hb_parclen(2) ) : hb_parni(3));
   struct sockaddr *to = NULL;
   int iToLen = 0 ;

   if ( ISCHAR( 5 ) )
   {
     to = (struct sockaddr *) hb_parc( 5 ); //hb_param( 5, HB_IT_STRING )->item.asString.value ;
     iToLen = (ISNIL(6) ? (ISNIL(5) ? 0 : ( int ) hb_parclen(5) ) : hb_parni(6));
   }

   hb_retni( (int ) sendto( (SOCKET) hb_parnl( 1 )       ,
                                            hb_parcx( 2 ) ,
                                            iBuffLen     ,
                                            hb_parni( 4 ),
                                            to           ,
                                            iToLen
                                          ) );
}
whtsock.c334
HB_FUNCVWN_SETSOCKOPT(void)
HB_FUNC( VWN_SETSOCKOPT )
{
//   SOCKET s       ;
   INT    optval  = hb_parni(5);

   hb_retni( (int ) setsockopt( (SOCKET) hb_parnl( 1 ) ,
                                 hb_parni( 2 ),
                                 hb_parni( 3 ),
                                 (const char *) &optval      ,
                                 sizeof( optval) //hb_parni( 5 )
                               ) );
}
whtsock.c360
HB_FUNCVWN_SHUTDOWN(void)
HB_FUNC( VWN_SHUTDOWN )
{
   hb_retni( (int ) shutdown((SOCKET) hb_parnl( 1 ), hb_parni( 2 ) ) );
}
whtsock.c377
HB_FUNCVWN_SOCKET(void)
HB_FUNC( VWN_SOCKET )
{
   hb_retnl( ( ULONG ) socket( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtsock.c386
HB_FUNCVWN_GETHOSTBYADDR(void)
HB_FUNC( VWN_GETHOSTBYADDR )
{
   HOSTENT *he ;
   he = gethostbyaddr( hb_parcx( 1 ) ,
                       hb_parni( 2 ),
                       hb_parni( 3 )
                     );

   hb_retclen( ( char *)he, sizeof(HOSTENT) );
}
whtsock.c395
HB_FUNCVWN_GETHOSTBYNAME(void)
HB_FUNC( VWN_GETHOSTBYNAME )
{
   HOSTENT *he ;

   he = gethostbyname( hb_parcx( 1 ) );

   hb_retclen( ( char *)he, sizeof(HOSTENT) );

}
whtsock.c410
HB_FUNCVWN_GETHOSTNAME(void)
HB_FUNC( VWN_GETHOSTNAME )
{
   char *name  = ( char*) hb_parcx( 1 )  ;
   int iLen    =  hb_parclen( 1 );

   hb_retni( (int ) gethostname( name, iLen ) )  ;
   hb_storc( name, 1 );
}
whtsock.c426
HB_FUNCVWN_GETSERVBYPORT(void)
HB_FUNC( VWN_GETSERVBYPORT )
{
   hb_retclen( ( char * ) getservbyport( hb_parni( 1 ),hb_parcx( 2 ) ), sizeof(SERVENT) );
}
whtsock.c439
HB_FUNCVWN_GETSERVBYNAME(void)
HB_FUNC( VWN_GETSERVBYNAME )
{
   hb_retclen( ( char *) getservbyname( hb_parcx( 1 ), hb_parcx( 2 ) ), sizeof(SERVENT) );
}
whtsock.c448
HB_FUNCVWN_GETPROTOBYNUMBER(void)
HB_FUNC( VWN_GETPROTOBYNUMBER )
{
   hb_retclen( ( char * ) getprotobynumber( hb_parni( 1 ) ), sizeof(PROTOENT) );
}
whtsock.c457
HB_FUNCVWN_GETPROTOBYNAME(void)
HB_FUNC( VWN_GETPROTOBYNAME )
{
   hb_retclen( ( char * ) getprotobyname( hb_parcx( 1 ) ), sizeof(PROTOENT) );
}
whtsock.c466
HB_FUNCVWN_WSASTARTUP(void)
HB_FUNC( VWN_WSASTARTUP )
{
   WSADATA WSAData  ;

   hb_retni( (int ) WSAStartup( ( WORD ) hb_parni( 1 ), &WSAData ) );

   if ( ISBYREF( 2 ) )
     hb_storclen( ( char * ) &WSAData, sizeof( WSADATA ), 2 );
}
whtsock.c475
HB_FUNCVWN_WSACLEANUP(void)
HB_FUNC( VWN_WSACLEANUP )
{
   hb_retni( (int ) WSACleanup( ) );
}
whtsock.c490
HB_FUNCVWN_WSASETLASTERROR(void)
HB_FUNC( VWN_WSASETLASTERROR )
{
   WSASetLastError( hb_parni( 1 ) );
}
whtsock.c499
HB_FUNCVWN_WSAGETLASTERROR(void)
HB_FUNC( VWN_WSAGETLASTERROR )
{
   hb_retni( (int ) WSAGetLastError( ) );
}
whtsock.c508
HB_FUNCVWN_WSAISBLOCKING(void)
HB_FUNC( VWN_WSAISBLOCKING )
{
   hb_retl( WSAIsBlocking( ) );
}
whtsock.c517
HB_FUNCVWN_WSAUNHOOKBLOCKINGHOOK(void)
HB_FUNC( VWN_WSAUNHOOKBLOCKINGHOOK )
{
   hb_retni( (int ) WSAUnhookBlockingHook() );
}
whtsock.c526
HB_FUNCVWN_WSACANCELBLOCKINGCALL(void)
HB_FUNC( VWN_WSACANCELBLOCKINGCALL )
{
   hb_retni( (int ) WSACancelBlockingCall() );
}
whtsock.c554
HB_FUNCVWN_WSAASYNCGETSERVBYNAME(void)
HB_FUNC( VWN_WSAASYNCGETSERVBYNAME )
{
   char * buf = ( char *) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetServByName( (HWND)         HB_PARWH( 1 ),
                                     (unsigned int) hb_parni( 2 ),
                                     ( char *)      hb_parcx( 3 ) ,
                                     ISNIL( 4 ) ? NULL : ( char *) hb_parcx( 4 ) ,
                                     ( char *)      buf          ,
                                     ( int)         MAXGETHOSTSTRUCT ) ) != 0 )

      hb_storclen( buf, sizeof(SERVENT), 5 );

   HB_RETWH( hRet );
   hb_xfree( buf );
}
whtsock.c571
HB_FUNCVWN_WSAASYNCGETSERVBYPORT(void)
HB_FUNC( VWN_WSAASYNCGETSERVBYPORT )
{
   char * buf = (char *) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetServByPort( (HWND) HB_PARWH( 1 )        ,
                                      (unsigned int) hb_parni( 2 ),
                                       hb_parni( 3 )              ,
                                       ISNIL( 4 ) ? NULL : ( char *) hb_parcx( 4 ) ,
                                       ( char *)      buf         ,
                                       ( int)         MAXGETHOSTSTRUCT  ) ) != 0 )

        hb_storclen( buf, sizeof(SERVENT), 5 );

   HB_RETWH( hRet );
   hb_xfree( buf );
}
whtsock.c599
HB_FUNCVWN_WSAASYNCGETPROTOBYNAME(void)
HB_FUNC( VWN_WSAASYNCGETPROTOBYNAME )
{
   char * buf = ( char * ) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetProtoByName( (HWND)         HB_PARWH( 1 ),
                                       (unsigned int) hb_parni( 2 ),
                                       ( char *)      hb_parcx( 3 ) ,
                                       ( char *)      buf          ,
                                       ( int)         MAXGETHOSTSTRUCT  ) ) != 0 )

        hb_storclen( buf, sizeof(PROTOENT), 4);

   HB_RETWH( hRet );
   hb_xfree( buf );
}
whtsock.c628
HB_FUNCVWN_WSAASYNCGETPROTOBYNUMBER(void)
HB_FUNC( VWN_WSAASYNCGETPROTOBYNUMBER )
{
   char * buf = ( char *) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetProtoByNumber( (HWND)         HB_PARWH( 1 ),
                                         (unsigned int) hb_parni( 2 ),
                                         (int)          hb_parni( 3 ),
                                         ( char *)      buf          ,
                                         ( int)         MAXGETHOSTSTRUCT  ) ) != 0 )

        hb_storclen( buf, sizeof(PROTOENT), 4);

   HB_RETWH( hRet );
   hb_xfree( buf );
}
whtsock.c656
HB_FUNCVWN_WSAASYNCGETHOSTBYNAME(void)
HB_FUNC( VWN_WSAASYNCGETHOSTBYNAME )
{
   char * buf = ( char *) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetHostByName( (HWND) HB_PARWH( 1 ),
                                       (unsigned int) hb_parni( 2 ),
                                       ( char *)      hb_parcx( 3 ) ,
                                       ( char *)      buf          ,
                                       ( int)         MAXGETHOSTSTRUCT ) ) != 0 )

      hb_storclen( buf, sizeof(HOSTENT), 4);

   HB_RETWH( hRet );
   hb_xfree( buf );
}
whtsock.c682
HB_FUNCVWN_WSAASYNCGETHOSTBYADDR(void)
HB_FUNC( VWN_WSAASYNCGETHOSTBYADDR )
{

   char * buf = ( char *) hb_xgrab( MAXGETHOSTSTRUCT );
   HANDLE hRet ;

   if( ( hRet = WSAAsyncGetHostByAddr( (HWND)         HB_PARWH( 1 ) ,
                                      (unsigned int) hb_parni( 2 ) ,
                                      ( char *)      hb_parcx( 3 )  ,
                                      ( int )        hb_parclen( 3),
                                      ( int )        hb_parni( 4 ) ,
                                      ( char *)      buf           ,
                                      ( int)         MAXGETHOSTSTRUCT  ) ) != 0 )

      hb_storclen( buf, sizeof(HOSTENT), 5);

   HB_RETWH( hRet );
   hb_xfree( buf );


}
whtsock.c710
HB_FUNCVWN_WSACANCELASYNCREQUEST(void)
HB_FUNC( VWN_WSACANCELASYNCREQUEST )
{
   hb_retni( (int) WSACancelAsyncRequest( (HANDLE) HB_PARWH( 1 ) ) );
}
whtsock.c736
HB_FUNCVWN_WSAASYNCSELECT(void)
HB_FUNC( VWN_WSAASYNCSELECT )
{
   hb_retni( (int ) WSAAsyncSelect( (SOCKET) hb_parnl( 1 ) ,
                                    (HWND) HB_PARWH( 2 )   ,
                                    (UINT) hb_parni( 3 )   ,
                                     hb_parnl( 4 )
                                  ) );
}
whtsock.c745
INT _STDCALL_WSACondFunc( LPWSABUF lpCallerId, LPWSABUF lpCallerData, LPQOS lpSQOS, LPQOS lpGQOS, LPWSABUF lpCalleeId, LPWSABUF lpCalleeData, GROUP * g, DWORD_PTR dwCallbackData )
int _stdcall _WSACondFunc( LPWSABUF lpCallerId,  LPWSABUF lpCallerData, LPQOS lpSQOS,
                 LPQOS lpGQOS, LPWSABUF lpCalleeId, LPWSABUF lpCalleeData,
                 GROUP * g, DWORD_PTR dwCallbackData )
{

   int res = CF_ACCEPT ;

   if ( dwCallbackData != 0 )
   {
      hb_vmPushSymbol( (HB_SYMB *) dwCallbackData ); // Harbour function pointer
      hb_vmPushNil();

      hb_vmPushNumInt( ( HB_PTRDIFF ) lpCallerId );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpCallerId );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpCallerData );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpSQOS );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpGQOS );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpCalleeId );
      hb_vmPushNumInt( ( HB_PTRDIFF ) lpCalleeData );
      hb_vmPushNumInt( ( HB_PTRDIFF ) g );

      hb_vmDo(7);
      res = hb_itemGetNI( (PHB_ITEM) hb_param( -1, HB_IT_ANY ) );

   }
   return res;
}
whtsock.c764
HB_FUNCVWN_WSAACCEPT(void)
HB_FUNC( VWN_WSAACCEPT )
{
//   SOCKET          s              ;
   struct sockaddr addr           ;
   INT           addrlen  = ISBYREF( 2 ) ? 0 : sizeof(addr)  ;
   SOCKET sRet ;

   sRet = WSAAccept( (SOCKET) hb_parnl( 1 )   ,
                     &addr                    ,
                     &addrlen                 ,
                     _WSACondFunc              ,
                     ISNIL( 3 ) ? 0 : (DWORD_PTR) hb_parnl( 3 ) );

   if( ( sRet != INVALID_SOCKET ) && ISBYREF( 2 ) )
        hb_storclen( ( char * ) &addr, addrlen, 2 );

    hb_retnl( ( ULONG ) sRet );

}
whtsock.c809
HB_FUNCVWN_WSACLOSEEVENT(void)
HB_FUNC( VWN_WSACLOSEEVENT )
{
   hb_retl( ( BOOL ) WSACloseEvent( (WSAEVENT) HB_PARWH( 1 ) ) );
}
whtsock.c834
HB_FUNCVWN_WSACREATEEVENT(void)
HB_FUNC( VWN_WSACREATEEVENT )
{
   HB_RETWH( WSACreateEvent( ) );
}


//-----------------------------------------------------------------------------
//  int  WSADuplicateSocketA( IN SOCKET s, IN DWORD dwProcessId,
//                            OUT LPWSAPROTOCOL_INFOA lpProtocolInfo );

/*

HB_FUNC( VWN_WSADUPLICATESOCKET )
{
   SOCKET              s              ;
   LPWSAPROTOCOL_INFOA lpProtocolInfo ;

   // Your code goes here

// hb_retni( (int ) WSADuplicateSocket( (SOCKET) hb_parnl( 1 )               ,
                                                        (DWORD) hb_parnl( 2 ),
                                                        lpProtocolInfo
                                                      ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSAEnumNetworkEvents( IN SOCKET s, IN WSAEVENT hEventObject, OUT LPWSANETWORKEVENTS lpNetworkEvents );

whtsock.c897
HB_FUNCVWN_WSAEVENTSELECT(void)
HB_FUNC( VWN_WSAEVENTSELECT )
{
   hb_retni( (int ) WSAEventSelect( (SOCKET)   hb_parnl( 1 ),
                                    (WSAEVENT) HB_PARWH( 2 ),
                                    (long)     hb_parnl( 3 )
                                   ) );
}


//-----------------------------------------------------------------------------
//  BOOL  WSAGetOverlappedResult( IN SOCKET s, IN LPWSAOVERLAPPED lpOverlapped, OUT LPDWORD lpcbTransfer, IN BOOL fWait, OUT LPDWORD lpdwFlags );

/*

HB_FUNC( VWN_WSAGETOVERLAPPEDRESULT )
{
   SOCKET          s            ;
   LPWSAOVERLAPPED lpOverlapped ;
   LPDWORD         lpcbTransfer ;
   LPDWORD         lpdwFlags    ;

   // Your code goes here

// hb_retl( WSAGetOverlappedResult( (SOCKET) hb_parnl( 1 )           ,
                                    lpOverlapped,
                                    lpcbTransfer,
                                    hb_parl( 4 ),
                                    lpdwFlags
                                   ) );
}

*/


//-----------------------------------------------------------------------------
//  BOOL  WSAGetQOSByName( IN SOCKET s, IN LPWSABUF lpQOSName, OUT LPQOS lpQOS );

/*

HB_FUNC( VWN_WSAGETQOSBYNAME )
{
   SOCKET   s         ;
   LPWSABUF lpQOSName ;
   LPQOS    lpQOS     ;

   // Your code goes here

// hb_retl( WSAGetQOSByName((SOCKET) hb_parnl( 1 ), lpQOSName, lpQOS ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSAHtonl( IN SOCKET s, IN u_long hostlong, OUT u_long * lpnetlong );

/*

HB_FUNC( VWN_WSAHTONL )
{
   SOCKET s         ;
   u_long hostlong  ;
   u_long lpnetlong ;

   // Your code goes here

// hb_retni( (int ) WSAHtonl((SOCKET) hb_parnl( 1 ), hostlong, &lpnetlong ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSAHtons( IN SOCKET s, IN u_short hostshort, OUT u_short * lpnetshort );

/*

HB_FUNC( VWN_WSAHTONS )
{
   SOCKET  s          ;
   u_short hostshort  ;
   u_short lpnetshort ;

   // Your code goes here

// hb_retni( (int ) WSAHtons((SOCKET) hb_parnl( 1 ), hostshort, &lpnetshort ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSAIoctl( IN SOCKET s, IN DWORD dwIoControlCode, IN LPVOID lpvInBuffer, IN DWORD cbInBuffer, OUT LPVOID lpvOutBuffer, IN DWORD cbOutBuffer, OUT LPDWORD lpcbBytesReturned, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );

/*

HB_FUNC( VWN_WSAIOCTL )
{
   SOCKET                             s                   ;
   LPVOID                             lpvInBuffer         ;
   LPVOID                             lpvOutBuffer        ;
   LPDWORD                            lpcbBytesReturned   ;
   LPWSAOVERLAPPED                    lpOverlapped        ;
   LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine ;

   // Your code goes here

// hb_retni( (int ) WSAIoctl( (SOCKET) hb_parnl( 1 )s                    ,
                                              (DWORD) hb_parnl( 2 ),
                                              lpvInBuffer          ,
                                              (DWORD) hb_parnl( 4 ),
                                              lpvOutBuffer         ,
                                              (DWORD) hb_parnl( 6 ),
                                              lpcbBytesReturned    ,
                                              lpOverlapped         ,
                                              lpCompletionRoutine
                                            ) );
}

*/


//-----------------------------------------------------------------------------
//  SOCKET  WSAJoinLeaf( IN SOCKET s, IN const struct sockaddr * name, IN int namelen, IN LPWSABUF lpCallerData, OUT LPWSABUF lpCalleeData, IN LPQOS lpSQOS, IN LPQOS lpGQOS, IN DWORD dwFlags );

/*

HB_FUNC( VWN_WSAJOINLEAF )
{
   SOCKET          s            ;
   sockaddr struct name         ;
   LPWSABUF        lpCallerData ;
   LPWSABUF        lpCalleeData ;
   LPQOS           lpSQOS       ;
   LPQOS           lpGQOS       ;

   // Your code goes here

// hb_retnl( WSAJoinLeaf( (SOCKET) hb_parnl( 1 )s                    ,
                                                    &name                ,
                                                    hb_parni( 3 )        ,
                                                    lpCallerData         ,
                                                    lpCalleeData         ,
                                                    lpSQOS               ,
                                                    lpGQOS               ,
                                                    (DWORD) hb_parnl( 8 )
                                                  ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSANtohl( IN SOCKET s, IN u_long netlong, OUT u_long * lphostlong );

/*

HB_FUNC( VWN_WSANTOHL )
{
   SOCKET s          ;
   u_long netlong    ;
   u_long lphostlong ;

   // Your code goes here

   hb_retni( (int ) WSANtohl((SOCKET) hb_parnl( 1 ), netlong, &lphostlong ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSANtohs( IN SOCKET s, IN u_short netshort, OUT u_short * lphostshort );

/*

HB_FUNC( VWN_WSANTOHS )
{
   SOCKET  s           ;
   u_short netshort    ;
   u_short lphostshort ;

   // Your code goes here

   hb_retni( (int ) WSANtohs((SOCKET) hb_parnl( 1 ), netshort, &lphostshort ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSARecv( IN SOCKET s, IN OUT LPWSABUF lpBuffers, IN DWORD dwBufferCount, OUT LPDWORD lpNumberOfBytesRecvd, IN OUT LPDWORD lpFlags, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );

/*

HB_FUNC( VWN_WSARECV )
{
   SOCKET                             s                    ;
   LPWSABUF                           lpBuffers            ;
   LPDWORD                            lpNumberOfBytesRecvd ;
   LPDWORD                            lpFlags              ;
   LPWSAOVERLAPPED                    lpOverlapped         ;
   LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine  ;

   // Your code goes here

   hb_retni( (int ) WSARecv( (SOCKET) hb_parnl( 1 )               ,
                                             lpBuffers            ,
                                             (DWORD) hb_parnl( 3 ),
                                             lpNumberOfBytesRecvd ,
                                             lpFlags              ,
                                             lpOverlapped         ,
                                             lpCompletionRoutine
                                           ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSARecvDisconnect( IN SOCKET s, OUT LPWSABUF lpInboundDisconnectData );

whtsock.c972
HB_FUNCVWN_WSARESETEVENT(void)
HB_FUNC( VWN_WSARESETEVENT )
{
   hb_retl( WSAResetEvent( (WSAEVENT) HB_PARWH( 1 ) ) );
}


//-----------------------------------------------------------------------------
//  int  WSASend( IN SOCKET s, IN LPWSABUF lpBuffers, IN DWORD dwBufferCount, OUT LPDWORD lpNumberOfBytesSent, IN DWORD dwFlags, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );

/*

HB_FUNC( VWN_WSASEND )
{
   SOCKET                             s                   ;
   LPWSABUF                           lpBuffers           ;
   LPDWORD                            lpNumberOfBytesSent ;
   LPWSAOVERLAPPED                    lpOverlapped        ;
   LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine ;


   hb_retni( (int ) WSASend( (SOCKET) hb_parnl( 1 )               ,
                                             lpBuffers            ,
                                             (DWORD) hb_parnl( 3 ),
                                             lpNumberOfBytesSent  ,
                                             (DWORD) hb_parnl( 5 ),
                                             lpOverlapped         ,
                                             lpCompletionRoutine
                                           ) );
}

*/


//-----------------------------------------------------------------------------
//  int  WSASendDisconnect( IN SOCKET s, IN LPWSABUF lpOutboundDisconnectData );

whtsock.c1243
HB_FUNCVWN_WSASETEVENT(void)
HB_FUNC( VWN_WSASETEVENT )
{
   hb_retl( WSASetEvent( (WSAEVENT) HB_PARWH( 1 ) ) );
}


//-----------------------------------------------------------------------------
//  SOCKET  WSASocketA( IN int af, IN int type, IN int protocol, IN LPWSAPROTOCOL_INFOA lpProtocolInfo, IN GROUP g, IN DWORD dwFlags );

/*

HB_FUNC( VWN_WSASOCKET )
{
   LPWSAPROTOCOL_INFOA lpProtocolInfo ;
   GROUP               g              ;

   // Your code goes here

   hb_retnl( ( ULONG ) WSASocket( hb_parni( 1 )        ,
                         hb_parni( 2 )        ,
                                                  hb_parni( 3 )        ,
                                                  lpProtocolInfo       ,
                                                  g                    ,
                                                  (DWORD) hb_parnl( 6 )
                                                ) );
}

*/


//-----------------------------------------------------------------------------
//  DWORD  WSAWaitForMultipleEvents( IN DWORD cEvents, IN const WSAEVENT * lphEvents, IN BOOL fWaitAll, IN DWORD dwTimeout, IN BOOL fAlertable );

/*

HB_FUNC( VWN_WSAWAITFORMULTIPLEEVENTS )
{
   WSAEVENT lphEvents  ;

   // Your code goes here

   hb_retnl( ( DWORD ) WSAWaitForMultipleEvents( (DWORD) hb_parnl( 1 ),
                                                                &lphEvents           ,
                                                                hb_parl( 3 )         ,
                                                                (DWORD) hb_parnl( 4 ),
                                                                hb_parl( 5 )
                                                              ) );
}

*/


//-----------------------------------------------------------------------------
//  INT  WSAAddressToStringA( IN LPSOCKADDR lpsaAddress, IN DWORD dwAddressLength, IN LPWSAPROTOCOL_INFOA lpProtocolInfo, IN OUT LPSTR lpszAddressString, IN OUT LPDWORD lpdwAddressStringLength );

/*

HB_FUNC( VWN_WSAADDRESSTOSTRING )
{
   LPSOCKADDR          lpsaAddress             ;
   LPWSAPROTOCOL_INFOA lpProtocolInfo          ;
   LPDWORD             lpdwAddressStringLength ;

   // Your code goes here

// hb_retni( (int ) WSAAddressToString( lpsaAddress            ,
                                                        (DWORD) hb_parnl( 2 )  ,
                                                        lpProtocolInfo         ,
                                                        (LPSTR) hb_parcx( 4 )   ,
                                                        lpdwAddressStringLength
                                                      ) );
}

*/



//-----------------------------------------------------------------------------
//  INT  WSAStringToAddressA( IN LPSTR AddressString, IN INT AddressFamily, IN LPWSAPROTOCOL_INFOA lpProtocolInfo, OUT LPSOCKADDR lpAddress, IN OUT LPINT lpAddressLength );

/*

HB_FUNC( VWN_WSASTRINGTOADDRESS )
{
   LPWSAPROTOCOL_INFOA lpProtocolInfo  ;
   LPSOCKADDR          lpAddress       ;
   LPINT               lpAddressLength ;

   // Your code goes here

// hb_retni( (int ) WSAStringToAddress( (LPSTR) hb_parcx( 1 ),
                                                        hb_parni( 2 )       ,
                                                        lpProtocolInfo      ,
                                                        lpAddress           ,
                                                        lpAddressLength
                                                      ) );
}

*/



//-----------------------------------------------------------------------------
//  INT  WSALookupServiceBeginA( IN LPWSAQUERYSETA lpqsRestrictions, IN DWORD dwControlFlags, OUT LPHANDLE lphLookup );

whtsock.c1330
HB_FUNCVWN_WSALOOKUPSERVICEEND(void)
HB_FUNC( VWN_WSALOOKUPSERVICEEND )
{
   hb_retni( (int ) WSALookupServiceEnd( (HANDLE) HB_PARWH( 1 ) ) );
}


//-----------------------------------------------------------------------------
//  INT  WSAInstallServiceClassA( IN LPWSASERVICECLASSINFOA lpServiceClassInfo );

/*

HB_FUNC( VWN_WSAINSTALLSERVICECLASS )
{
   LPWSASERVICECLASSINFOA lpServiceClassInfo ;

   // Your code goes here

// hb_retni( (int ) WSAInstallServiceClass( lpServiceClassInfo ) );
}

*/



//-----------------------------------------------------------------------------
//  INT  WSARemoveServiceClass( IN LPGUID lpServiceClassId );

/*

HB_FUNC( VWN_WSAREMOVESERVICECLASS )
{
   LPGUID lpServiceClassId ;

   // Your code goes here

// hb_retni( (int ) WSARemoveServiceClass( lpServiceClassId ) );
}

*/


//-----------------------------------------------------------------------------
//  INT  WSAGetServiceClassInfoA( IN LPGUID lpProviderId, IN LPGUID lpServiceClassId, IN OUT LPDWORD lpdwBufSize, OUT LPWSASERVICECLASSINFOA lpServiceClassInfo );

/*

HB_FUNC( VWN_WSAGETSERVICECLASSINFO )
{
   LPGUID                 lpProviderId       ;
   LPGUID                 lpServiceClassId   ;
   LPDWORD                lpdwBufSize        ;
   LPWSASERVICECLASSINFOA lpServiceClassInfo ;

   // Your code goes here

// hb_retni( (int ) WSAGetServiceClassInfo( lpProviderId      ,
                                                            lpServiceClassId  ,
                                                            lpdwBufSize       ,
                                                            lpServiceClassInfo
                                                          ) );
}

*/


//-----------------------------------------------------------------------------
//  INT  WSAEnumNameSpaceProvidersA( IN OUT LPDWORD lpdwBufferLength, OUT LPWSANAMESPACE_INFOA lpnspBuffer );

/*

HB_FUNC( VWN_WSAENUMNAMESPACEPROVIDERS )
{
   LPDWORD              lpdwBufferLength ;
   LPWSANAMESPACE_INFOA lpnspBuffer      ;

   // Your code goes here

// hb_retni( (int ) WSAEnumNameSpaceProviders( lpdwBufferLength,
                                                               lpnspBuffer
                                                             ) );
}

*/


//-----------------------------------------------------------------------------
//  INT  WSAGetServiceClassNameByClassIdA( IN LPGUID lpServiceClassId, OUT LPSTR lpszServiceClassName, IN OUT LPDWORD lpdwBufferLength );

/*

HB_FUNC( VWN_WSAGETSERVICECLASSNAMEBYCLASSID )
{
   LPGUID  lpServiceClassId     ;
   LPDWORD lpdwBufferLength     ;

   // Your code goes here

// hb_retni( (int ) WSAGetServiceClassNameByClassId( lpServiceClassId    ,
                                                                     (LPSTR) hb_parcx( 2 ),
                                                                     lpdwBufferLength
                                                                   ) );
}

*/


//-----------------------------------------------------------------------------
//  INT  WSASetServiceA( IN LPWSAQUERYSETA lpqsRegInfo, IN WSAESETSERVICEOP essoperation, IN DWORD dwControlFlags );

whtsock.c1480
whtsys.c
TypeFunctionSourceLine
HB_FUNCVWN_GETFREESPACE(void)
HB_FUNC( VWN_GETFREESPACE )
{
   hb_retnl( (LONG) GetFreeSpace( (UINT) hb_parni( 1 ) ) );
}
whtsys.c54
HB_FUNCVWN_OUTPUTDEBUGSTRING(void)
HB_FUNC( VWN_OUTPUTDEBUGSTRING )
{
   OutputDebugString( (LPCSTR) hb_parcx( 1 ) );
}
whtsys.c65
HB_FUNCVWN_GETTIMEZONEINFORMATION(void)
HB_FUNC( VWN_GETTIMEZONEINFORMATION )
{
 TIME_ZONE_INFORMATION tzi;

 hb_retnl( GetTimeZoneInformation( &tzi ) );

 if ( ISBYREF(1) )
    hb_storclen( (char*) &tzi, sizeof(tzi), 1);
}
whtsys.c70
HB_FUNCVWN_SETTIMEZONEINFORMATION(void)
HB_FUNC( VWN_SETTIMEZONEINFORMATION )
{
 TIME_ZONE_INFORMATION *tzi = ( TIME_ZONE_INFORMATION *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value ;

 hb_retl( SetTimeZoneInformation( tzi ) );

}
whtsys.c89
HB_FUNCVWN_DEBUGBREAK(void)
HB_FUNC( VWN_DEBUGBREAK )
{
   DebugBreak(  );
}

//-------------------------------------------------------------------//
//
// WINADVAPI BOOL WINAPI EncryptFileA( IN LPCSTR lpFileName );
//
// NT ?
/*
HB_FUNC( VWN_ENCRYPTFILE )
{
   hb_retl( EncryptFileA( (LPCSTR) hb_parcx( 1 ) ) );
}
*/

//-------------------------------------------------------------------//
//
// WINADVAPI BOOL WINAPI DecryptFileA( IN LPCSTR lpFileName, IN DWORD dwReserved );
//
// NT ?
/*
HB_FUNC( VWN_DECRYPTFILE )
{
   hb_retl( DecryptFileA( (LPCSTR) hb_parcx( 1 ), 0 ) ); //(DWORD) hb_parnl( 2 ) ) );
}
*/

//-------------------------------------------------------------------//
//
// WINADVAPI BOOL WINAPI FileEncryptionStatusA( LPCSTR lpFileName, LPDWORD lpStatus );
/*
// need function info !

HB_FUNC( VWN_FILEENCRYPTIONSTATUSA )
{
   LPDWORD lpStatus   ;
whtsys.c103
HB_FUNCVWN_ISPROCESSORFEATUREPRESENT(void)
   hb_retl( FileEncryptionStatusA( (LPCSTR) hb_parcx( 1 ), lpStatus ) );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI IsProcessorFeaturePresent( IN DWORD ProcessorFeature );
//
HB_FUNC( VWN_ISPROCESSORFEATUREPRESENT )
{
   hb_retl( IsProcessorFeaturePresent( (DWORD) hb_parnl( 1 ) ) );
}
whtsys.c157
HB_FUNCVWN_MULDIV(void)
HB_FUNC( VWN_MULDIV )
{
   hb_retni( MulDiv( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) );
}
whtsys.c173
HB_FUNCVWN_SYSTEMPARAMETERSINFO(void)
HB_FUNC( VWN_SYSTEMPARAMETERSINFO )
{
   PHB_ITEM pBuffer = hb_param( 3, HB_IT_STRING );

   if( pBuffer )
   {
      char * cText = (char*) hb_xgrab( hb_itemGetCLen( pBuffer )+1 );
      hb_xmemcpy( cText, hb_itemGetC( pBuffer ), hb_itemGetCLen( pBuffer )+1 );

      if( SystemParametersInfo( (UINT) hb_parni( 1 ),
                                (UINT) hb_parni( 2 ),
                                cText,
                                (UINT) hb_parni( 4 ) ) )
      {
         if( ISBYREF( 3 ) )
         {
            if( ! hb_storclen_buffer( cText, hb_itemGetCLen( pBuffer ), 3 ) )
               hb_xfree( cText );

            hb_retl( TRUE );
            return;
         }
      }

      hb_xfree( cText );
   }

   hb_retl( FALSE );
}
whtsys.c178
HB_FUNCVWN_FREERESOURCE(void)
HB_FUNC( VWN_FREERESOURCE )
{
   hb_retl( FreeResource( (HGLOBAL) HB_PARWH( 6 )) );
}
whtsys.c214
HB_FUNCVWN_SETDEBUGERRORLEVEL(void)
HB_FUNC( VWN_SETDEBUGERRORLEVEL )
{
   SetDebugErrorLevel( (DWORD) hb_parnl( 1 ) );
}
whtsys.c223
HB_FUNCVWN_SETLASTERROREX(void)
HB_FUNC( VWN_SETLASTERROREX )
{
   SetLastErrorEx( (DWORD) hb_parnl( 1 ), (DWORD) hb_parnl( 2 ) );
}
whtsys.c232
HB_FUNCVWN_GETSTDHANDLE(void)
HB_FUNC( VWN_GETSTDHANDLE )
{
   HB_RETWH( GetStdHandle( (DWORD) hb_parnl(1) ) );
}
whtsys.c246
HB_FUNCVWN_SETSTDHANDLE(void)
HB_FUNC( VWN_SETSTDHANDLE )
{
   hb_retl( SetStdHandle( (DWORD) hb_parnl(1), (HANDLE) HB_PARWH(2) ) );
}
whtsys.c259
HB_FUNCVWN_SETCONSOLETITLE(void)
HB_FUNC( VWN_SETCONSOLETITLE )
{
   hb_retnl( ( LONG ) SetConsoleTitle( ( LPCSTR ) hb_parcx( 1 ) ) );
}
whtsys.c269
HB_FUNCVWN_GETCONSOLEWINDOW(void)
HB_FUNC( VWN_GETCONSOLEWINDOW )
{
   char realtitle[ MAX_PATH ];

   GetConsoleTitle( realtitle,MAX_PATH );
   SetConsoleTitle( "Finding Handle" );
   HB_RETWH( FindWindow( NULL,"Finding Handle" ) );
   SetConsoleTitle( realtitle );
}
whtsys.c274
HB_FUNCVWN_GETSYSTEMMETRICS(void)
HB_FUNC( VWN_GETSYSTEMMETRICS )
{
   hb_retni( GetSystemMetrics( hb_parni( 1 ) ) );
}
whtsys.c294
HB_FUNCVWN_SETTIMER(void)
HB_FUNC( VWN_SETTIMER )
{
   HB_RETWI( SetTimer( (HWND) HB_PARWH( 1 ),
                       ( UINT_PTR ) HB_PARWI( 2 ),
                       (UINT) hb_parni( 3 ),
                       ISNIL(4) ? NULL : (TIMERPROC) HB_PARWH(4)
                      ) );
}
whtsys.c303
HB_FUNCVWN_KILLTIMER(void)
HB_FUNC( VWN_KILLTIMER )
{
   hb_retl( KillTimer( (HWND) HB_PARWH( 1 ), (UINT) hb_parni(2) ) );
}
whtsys.c316
HB_FUNCVWN_GETSYSCOLOR(void)
HB_FUNC( VWN_GETSYSCOLOR )
{
  hb_retnl( GetSysColor( hb_parni(1) ) );
}
whtsys.c327
HB_FUNCVWN_EXITWINDOWSEX(void)
HB_FUNC( VWN_EXITWINDOWSEX )
{
   hb_retl( ExitWindowsEx( (UINT) hb_parni( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtsys.c332
HB_FUNCVWN_GETSYSCOLORBRUSH(void)
HB_FUNC( VWN_GETSYSCOLORBRUSH )
{
   HB_RETWH( GetSysColorBrush( hb_parni( 1 ) ) );
}
whtsys.c341
HB_FUNCVWN_AND(void)
HB_FUNC( VWN_AND )
{
  hb_retnl( hb_parnl(1) & hb_parnl(2) );
}
whtsys.c365
HB_FUNCVWN_OR(void)
HB_FUNC( VWN_OR )
{
  hb_retnl( hb_parnl(1) | hb_parnl(2) );
}
whtsys.c372
HB_FUNCVWN_NOT(void)
HB_FUNC( VWN_NOT )
{
   hb_retnl( ~( hb_parnl(1) ) );
}
whtsys.c379
HB_FUNCVWN__GETINSTANCE(void)
HB_FUNC( VWN__GETINSTANCE )
{
   HB_RETWH( GetModuleHandle( NULL ) );
}
whtsys.c386
HB_FUNCVWN_LOWORD(void)
HB_FUNC( VWN_LOWORD )
{
   hb_retni( (int) ( hb_parnl( 1 ) & 0xFFFF ) );
}
whtsys.c393
HB_FUNCVWN_HIWORD(void)
HB_FUNC( VWN_HIWORD )
{
   hb_retni( (int) ( ( hb_parnl( 1 ) >> 16 ) & 0xFFFF ) );
}
whtsys.c400
HB_FUNCVWN_MAKELONG(void)
HB_FUNC( VWN_MAKELONG )
{
   hb_retnl( (LONG) (((WORD) (hb_parni(1))) | (((DWORD) ((WORD) (hb_parni(2)))) << 16)) );
}

//-------------------------------------------------------------------//
whtsys.c407
HB_FUNCVWN_SETERRORMODE(void)
HB_FUNC( VWN_SETERRORMODE )
{
   hb_retni( SetErrorMode( (UINT) hb_parni( 1 ) ) );
}
whtsys.c437
HB_FUNCVWN_OEMTOCHAR(void)
HB_FUNC( VWN_OEMTOCHAR )
{
   int iLen = hb_parclen( 1 );
   char * buffer = ( char* ) hb_xgrab( iLen + 1 );

   OemToCharBuff( hb_parcx( 1 ), buffer, iLen );
   hb_retclenAdopt( buffer, iLen );
}
whtsys.c458
HB_FUNCVWN_CHARTOOEM(void)
HB_FUNC( VWN_CHARTOOEM )
{
   int iLen = hb_parclen( 1 );
   char * buffer = ( char* ) hb_xgrab( iLen + 1 );

   CharToOemBuff( hb_parcx( 1 ), buffer, iLen );
   hb_retclenAdopt( buffer, iLen );
}
whtsys.c469
HB_FUNCVWN_OEMTOANSI(void)
HB_FUNC( VWN_OEMTOANSI )
{
HB_FUNCNAME( VWN_OEMTOCHAR )();
}
whtsys.c480
HB_FUNCVWN_ANSITOOEM(void)
HB_FUNC( VWN_ANSITOOEM )
{
HB_FUNCNAME( VWN_CHARTOOEM )();
}
whtsys.c487
HB_FUNCVWN_GETVERSION(void)
HB_FUNC( VWN_GETVERSION )
{
   hb_retnl( (LONG) GetVersion(  ) );
}
whtsys.c496
HB_FUNCVWN_FINDRESOURCE(void)
HB_FUNC( VWN_FINDRESOURCE )
{
   HB_RETWH( FindResourceA( (HMODULE) HB_PARWH( 1 ),
                                   (LPCSTR) hb_parcx( 2 )  ,
                                   (LPCSTR) hb_parcx( 3 )
                                  ) );
}
whtsys.c501
HB_FUNCVWN_FINDRESOURCEEX(void)
HB_FUNC( VWN_FINDRESOURCEEX )
{
   HB_RETWH( FindResourceExA( (HMODULE) HB_PARWH( 1 ),
                                     (LPCSTR) hb_parcx( 2 )  ,
                                     (LPCSTR) hb_parcx( 3 )  ,
                                     (WORD) hb_parni( 4 )
                                     ) );
}
whtsys.c513
HB_FUNCVWN_LOADRESOURCE(void)
HB_FUNC( VWN_LOADRESOURCE )
{
   HB_RETWH( LoadResource( (HMODULE) HB_PARWH( 1 ),
                                  (HRSRC) HB_PARWH( 2 )
                                 ) );
}
whtsys.c526
HB_FUNCVWN_LOADSTRING(void)
HB_FUNC( VWN_LOADSTRING )
{
   ULONG iLen = ISNIL(3) ? MAX_PATH : (ULONG) hb_parclen( 3 );
   LPTSTR cText = (char*) hb_xgrab( iLen+1 );

   iLen = LoadString( ( ISNIL(1) ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH(1) ),
                      (UINT) hb_parni(2) ,
                      (LPTSTR) cText ,
                      iLen );

   hb_retclen( cText, iLen );
   hb_xfree( cText );
}
whtsys.c537
HB_FUNCVWN_SIZEOFRESOURCE(void)
HB_FUNC( VWN_SIZEOFRESOURCE )
{
   hb_retnl( (LONG) SizeofResource( (HMODULE) HB_PARWH( 1 ),
                                    (HRSRC) HB_PARWH( 2 )
                                    ) );
}
whtsys.c561
HB_FUNCVWN_LOCKRESOURCE(void)
HB_FUNC( VWN_LOCKRESOURCE )
{
   HB_RETWH( LockResource( (HGLOBAL) HB_PARWH( 1 ) ) );
}
whtsys.c572
HB_FUNCVWN_TONE(void)
HB_FUNC( VWN_TONE )
{
   hb_retl( Beep( (DWORD) hb_parnl( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtsys.c595
HB_FUNCVWN_GETMODULEFILENAME(void)
HB_FUNC( VWN_GETMODULEFILENAME )
{
   char szBuffer[ MAX_PATH + 1 ] = {0} ;
   GetModuleFileNameA( ISNIL(1) ? GetModuleHandle(NULL) : (HMODULE) HB_PARWH( 1 ),
                       szBuffer  ,
                       MAX_PATH
                     );
   hb_retc(szBuffer);
}
whtsys.c608
HB_FUNCVWN_GETMODULEHANDLE(void)
HB_FUNC( VWN_GETMODULEHANDLE )
{
   HB_RETWH( GetModuleHandleA( (ISNIL(1) ? NULL : (LPCSTR) hb_parcx( 1 ) ) ) );
}
whtsys.c618
HB_FUNCVWN_GETCOMMANDLINE(void)
HB_FUNC( VWN_GETCOMMANDLINE )
{
   hb_retc( (LPSTR) GetCommandLine() );
}

//-------------------------------------------------------------------//
//
// WINBASEAPI VOID WINAPI GetSystemTime( OUT LPSYSTEMTIME lpSystemTime );
/*
HB_FUNC( VWN_GETSYSTEMTIME )
{
   LPSYSTEMTIME lpSystemTime ;

   // Your code goes here

   GetSystemTime( lpSystemTime );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI SetSystemTime( IN CONST SYSTEMTIME *lpSystemTime );
//
/*
HB_FUNC( VWN_SETSYSTEMTIME )
{
   SYSTEMTIME CONST lpSystemTime ;

   // Your code goes here

   hb_retl( SetSystemTime( &lpSystemTime ) );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI VOID WINAPI GetLocalTime( OUT LPSYSTEMTIME lpSystemTime );
/*
HB_FUNC( VWN_GETLOCALTIME )
{
   LPSYSTEMTIME lpSystemTime ;

   // Your code goes here

   GetLocalTime( lpSystemTime );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI SetLocalTime( IN CONST SYSTEMTIME *lpSystemTime );
/*
HB_FUNC( VWN_SETLOCALTIME )
{
   SYSTEMTIME CONST lpSystemTime ;

   // Your code goes here

   hb_retl( SetLocalTime( &lpSystemTime ) );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI VOID WINAPI GetSystemInfo( OUT LPSYSTEM_INFO lpSystemInfo );
/*
HB_FUNC( VWN_GETSYSTEMINFO )
{
   LPSYSTEM_INFO lpSystemInfo ;
whtsys.c627
HB_FUNCVWN_GETTICKCOUNT(void)
   GetSystemInfo( lpSystemInfo );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI DWORD WINAPI GetTickCount( VOID );
//
HB_FUNC( VWN_GETTICKCOUNT )
{
   hb_retnl( (LONG) GetTickCount(  ) );
}
whtsys.c699
HB_FUNCVWN_GETLOGICALDRIVESTRINGS(void)
HB_FUNC( VWN_GETLOGICALDRIVESTRINGS )
{
   hb_retnl( (LONG) GetLogicalDriveStrings( (DWORD) hb_parnl( 1 ),
                                             (LPSTR) hb_parcx( 2 )
                                             ) );
}
whtsys.c715
HB_FUNCVWN_GETCOMPUTERNAME(void)
HB_FUNC( VWN_GETCOMPUTERNAME )
{
   char cText[MAX_COMPUTERNAME_LENGTH+1]  ;
   DWORD nSize = MAX_COMPUTERNAME_LENGTH+1;

   hb_retl( GetComputerNameA( (LPSTR) &cText, &nSize ) );

   hb_storc( cText, 1 );
   hb_stornl( nSize, 2 );
}
whtsys.c722
HB_FUNCVWN_SETCOMPUTERNAME(void)
HB_FUNC( VWN_SETCOMPUTERNAME )
{
   hb_retl( SetComputerNameA( (LPCSTR) hb_parcx( 1 ) ) );
}

//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI GetComputerNameExA ( IN COMPUTER_NAME_FORMAT NameType, OUT LPSTR lpBuffer, IN OUT LPDWORD nSize );
/*
HB_FUNC( VWN_GETCOMPUTERNAMEEX )
{
   COMPUTER_NAME_FORMAT NameType ;
   LPDWORD              nSize    ;

   // Your code goes here

   hb_retl( GetComputerNameExA( NameType, (LPSTR) hb_parcx( 2 ), nSize ) );
}
*/
//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI SetComputerNameExA ( IN COMPUTER_NAME_FORMAT NameType, IN LPCSTR lpBuffer );
/*
HB_FUNC( VWN_SETCOMPUTERNAMEEX )
{
   COMPUTER_NAME_FORMAT NameType ;
whtsys.c738
HB_FUNCVWN_GETUSERNAME(void)
   hb_retl( SetComputerNameExA( NameType, (LPCSTR) hb_parcx( 2 ) ) );
}
*/
//-------------------------------------------------------------------//
//
// WINADVAPI BOOL WINAPI GetUserNameA ( OUT LPSTR lpBuffer, IN OUT LPDWORD nSize );
//
HB_FUNC( VWN_GETUSERNAME )
{
   DWORD nSize    ;
   char *szUser = hb_parcx( 1 );

   hb_retl( GetUserNameA( szUser, &nSize ) );
   hb_storc( szUser , 1 );
   hb_stornl( ( LONG ) nSize , 2 );
}
whtsys.c771
HB_FUNCVWN_GETVERSIONEX(void)
HB_FUNC( VWN_GETVERSIONEX )
{
   BOOL bGetVer;
   OSVERSIONINFOEX osvi;
   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);

   bGetVer = GetVersionEx( (OSVERSIONINFO*) &osvi );

   hb_storclen( (char*) &osvi, sizeof(OSVERSIONINFOEX), 1 );
   hb_retl( bGetVer );
}

//-------------------------------------------------------------------//
//
// WINBASEAPI BOOL WINAPI VerifyVersionInfoA( IN LPOSVERSIONINFOEXA lpVersionInformation, IN DWORD dwTypeMask, IN DWORDLONG dwlConditionMask );
/*
HB_FUNC( VWN_VERIFYVERSIONINFO )
{
   LPOSVERSIONINFOEXA lpVersionInformation ;
whtsys.c788
HB_FUNCVWN_ARRANGEICONICWINDOWS(void)
   hb_retl( VerifyVersionInfoA( lpVersionInformation     ,
                                (DWORD) hb_parnl( 2 )    ,
                                (DWORDLONG) hb_parnl( 3 )
                                ) );
}
*/
//-------------------------------------------------------------------//
//
//         The next 3 functions should go to _WinMDI.c
//
//-------------------------------------------------------------------//
//
// WINUSERAPI UINT WINAPI ArrangeIconicWindows( IN HWND hWnd);
//
HB_FUNC( VWN_ARRANGEICONICWINDOWS )
{
   hb_retni( ArrangeIconicWindows( (HWND) HB_PARWH( 1 ) ) );
}


//-------------------------------------------------------------------//
//
// WINUSERAPI WORD WINAPI TileWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
//
// move to MDI
/*
HB_FUNC( VWN_TILEWINDOWS )
{
   RECT lpRect     ;

   // Your code goes here

   hb_retni( TileWindows( (HWND) HB_PARWH( 1 ),
                          (UINT) hb_parni( 2 ),
                          &lpRect             ,
                          (UINT) hb_parni( 4 ),
                          (HWND) HB_PARWH( 5 )
                        ) );
}
*/
//-------------------------------------------------------------------//
//
// WINUSERAPI WORD WINAPI CascadeWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
//
// move to MDI
//
/*
HB_FUNC( VWN_CASCADEWINDOWS )
{
   RECT lpRect     ;
whtsys.c814
HB_FUNCVWN_WINHELP(void)
   hb_retni( CascadeWindows( (HWND) HB_PARWH( 1 ),
                             (UINT) hb_parni( 2 ),
                             &lpRect             ,
                             (UINT) hb_parni( 4 ),
                             (HWND) HB_PARWH( 5 )
                           ) );
}
*/
//-------------------------------------------------------------------//
//
// WINUSERAPI BOOL WINAPI WinHelpA( IN HWND hWndMain, IN LPCSTR lpszHelp, IN UINT uCommand, IN ULONG_PTR dwData );
//
// need to verify 4th parameter !
//
HB_FUNC( VWN_WINHELP )
{
      hb_retl( WinHelp( (HWND) HB_PARWH( 1 ) ,
                     (LPCSTR) hb_parcx( 2 ),
                     (UINT) hb_parni( 3 ) ,
                     (ULONG) hb_parnl( 4 )
                   ) );
}

//-------------------------------------------------------------------//
//
// HWND HtmlHelp(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData);
//
//
//  HtmlHelp( hWndCaller,        ;  // Handle of caller window, can be GetDeskTopWindow()
//            cFullPathAndTopic  )  // C:\creative.acp\help\vvouch.htm::default.htm
//                                  // If topic is not given, default topic will appear
//
//  HtmlHelp( GetDeskTopWindow(), 'C:\help\vvouch.chm::de_windo.htm' )
//
//  To create a .chm file, you need to work with Microsoft's
//  free HtmlHelp Workshop doanloadable from MSDN
//
/*
HB_FUNC( VWN_HTMLHELP )
{
whtsys.c867
HB_FUNCVWN_CREATEFILE(void)
 HB_RETWH( HtmlHelp( (HWND)   HB_PARWH( 1 )  ,
                            (LPCSTR) hb_parcx( 2 ) ,
                            (UINT)   ISNIL(3) ? HH_DISPLAY_TOPIC : hb_parni( 3 )  ,
                            (DWORD)  ISNIL(4) ? NULL : hb_parnl( 4 )
                          )
         );
}
*/
//-------------------------------------------------------------------//
/*
 HANDLE CreateFile(
  LPCTSTR lpFileName,          // pointer to name of the file
  DWORD dwDesiredAccess,       // access (read-write) mode
  DWORD dwShareMode,           // share mode
  LPSECURITY_ATTRIBUTES lpSecurityAttributes,
                               // pointer to security attributes
  DWORD dwCreationDisposition,  // how to create
  DWORD dwFlagsAndAttributes,  // file attributes
  HANDLE hTemplateFile         // handle to file with attributes to
                               // copy
);
*/
HB_FUNC( VWN_CREATEFILE )
{

   SECURITY_ATTRIBUTES *sa = NULL;

   if( ISCHAR( 4 ) )
      sa = ( SECURITY_ATTRIBUTES *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ;

   HB_RETWH( CreateFile( (LPCTSTR) hb_parcx(1),
                                (DWORD)   hb_parnl(2),
                                (DWORD)   hb_parnl(3),
                                ISCHAR( 4 ) ? (SECURITY_ATTRIBUTES *) sa : NULL ,
                                (DWORD) hb_parnl(5),
                                (DWORD) hb_parnl(6),
                                ISNIL( 7 ) ? NULL : (HANDLE) HB_PARWH(7) ) );

}
whtsys.c908
HB_FUNCVWN_CLOSEHANDLE(void)
HB_FUNC( VWN_CLOSEHANDLE )
{
  hb_retl( CloseHandle( (HANDLE) HB_PARWH(1) ) );
}
whtsys.c948
HB_FUNCVWN_READFILE(void)
HB_FUNC( VWN_READFILE )
{
   char * Buffer = ( char * ) hb_xgrab( hb_parnl( 3 ) );
   DWORD nRead   = 0      ;
   BOOL  bRet             ;
   OVERLAPPED *Overlapped = NULL;

   if( ISCHAR( 5 ) )
      Overlapped = ( OVERLAPPED *) hb_parc( 5 ); //hb_param( 5, HB_IT_STRING )->item.asString.value ;


   bRet = ReadFile( (HANDLE) HB_PARWH( 1 ) ,
                    Buffer                 ,
                    (DWORD)  hb_parnl( 3 ) ,
                    &nRead        ,
                    ISCHAR( 5 ) ? Overlapped : NULL );

   if ( bRet )
   {
      hb_storclen( ( char * ) Buffer, nRead, 2 );
   }

   hb_stornl( nRead, 4 );
   hb_retl( bRet );
}
whtsys.c959
HB_FUNCVWN_WRITEFILE(void)
HB_FUNC( VWN_WRITEFILE )
{

   DWORD nWritten = 0;
   OVERLAPPED *Overlapped = NULL;

   if( ISCHAR( 4 ))
     Overlapped = ( OVERLAPPED *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ;

   hb_retl ( WriteFile( (HANDLE)  HB_PARWH( 1 )   ,
                     hb_parcx( 2 )       ,
                     hb_parclen( 2 )    ,
                     &nWritten          ,
                     ISCHAR( 4 ) ? Overlapped : NULL ) );

   hb_stornl( nWritten, 3 );
}
whtsys.c995
HB_FUNCVWN_GETCURRENTPROCESSID(void)
HB_FUNC( VWN_GETCURRENTPROCESSID )
{
   hb_retnl( (ULONG) GetCurrentProcessId() );
}
whtsys.c1023
HB_FUNCVWN_GETCURRENTPROCESS(void)
HB_FUNC( VWN_GETCURRENTPROCESS )
{
   hb_retptr( GetCurrentProcess() );
}
whtsys.c1032
HB_FUNCVWN_GETCURRENTTHREADID(void)
HB_FUNC( VWN_GETCURRENTTHREADID )
{
   hb_retnl( (DWORD) GetCurrentThreadId() );
}
whtsys.c1041
HB_FUNCVWN_GETPROCESSWORKINGSETSIZE(void)
HB_FUNC( VWN_GETPROCESSWORKINGSETSIZE )
{
   PSIZE_T MinimumWorkingSetSize = NULL;
   PSIZE_T MaximumWorkingSetSize = NULL;

   hb_retl(GetProcessWorkingSetSize(ISNIL(1) ? GetCurrentProcess() : (HANDLE) HB_PARWH( 1 ),
                            MinimumWorkingSetSize, MaximumWorkingSetSize ));

   hb_stornl( MinimumWorkingSetSize ? ( long ) *MinimumWorkingSetSize : 0, 2 );
   hb_stornl( MaximumWorkingSetSize ? ( long ) *MaximumWorkingSetSize : 0, 3 );
}
whtsys.c1050
HB_FUNCVWN_SETPROCESSWORKINGSETSIZE(void)
HB_FUNC( VWN_SETPROCESSWORKINGSETSIZE )
{
   hb_retl(SetProcessWorkingSetSize(ISNIL(1) ? GetCurrentProcess() : (HANDLE) HB_PARWH( 1 ),
                   hb_parnl( 2 ), hb_parnl( 3 ) ));
}
whtsys.c1068
HB_FUNCVWN_VIRTUALQUERY(void)
HB_FUNC( VWN_VIRTUALQUERY )
{
// if( hb_parni(1) >= sizeof(MEMORY_BASIC_INFORMATION) )
// {
      hb_retl(VirtualQuery((void *) HB_PARWH(1), (struct _MEMORY_BASIC_INFORMATION *) HB_PARWH(2), sizeof(MEMORY_BASIC_INFORMATION)));
// }
// else
// {
//    SetLastError(ERROR_INSUFFICIENT_BUFFER);
//    hb_retl(FALSE);
// }
}
whtsys.c1081
HB_FUNCVWN_VIRTUALLOCK(void)
HB_FUNC( VWN_VIRTUALLOCK )
{
   hb_retl( VirtualLock( ( void * ) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtsys.c1099
HB_FUNCVWN_FILETIMETOSYSTEMTIME(void)
HB_FUNC( VWN_FILETIMETOSYSTEMTIME )
{
   FILETIME   *FileTime  = ( FILETIME *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value ;
   SYSTEMTIME SystemTime ;

   if ( FileTimeToSystemTime( FileTime, &SystemTime ) )
   {
      hb_retl( TRUE );

      if ( ISBYREF( 2 ) )
      {
         hb_storclen( ( char * ) &SystemTime , sizeof( SYSTEMTIME ), 2 );
      }
   }
   else
   {
      hb_retl( FALSE );
   }
}
whtsys.c1109
HB_FUNCVWN_SETCONSOLEOUTPUTCP(void)
HB_FUNC( VWN_SETCONSOLEOUTPUTCP )
{
   hb_retl( SetConsoleOutputCP( (UINT) hb_parnl( 1 ) ) );
}
whtsys.c1149
whttab.c
TypeFunctionSourceLine
HB_FUNCVWN_TABCTRL_CREATE(void)
HB_FUNC( VWN_TABCTRL_CREATE )
{
   HWND hwnd;
   HWND hbutton;
   LRESULT hFont;
   LONG style;
   style = ISNIL(6) ? 0 : (LONG) hb_parnl(6);
   hwnd = (HWND) HB_PARWH (1);
   hFont = SendMessage( hwnd, WM_GETFONT, 0, 0);
   hbutton = CreateWindowEx(0, WC_TABCONTROL, NULL , style, hb_parni(2), hb_parni(3) , hb_parni(4), hb_parni(5) , hwnd,NULL, GetModuleHandle(NULL) , NULL );
   SendMessage(hbutton,(UINT)WM_SETFONT, (WPARAM) hFont, 1 );
   HB_RETWH( hbutton );
}
whttab.c24
HB_FUNCVWN_TABCTRL_ADDITEM(void)
HB_FUNC( VWN_TABCTRL_ADDITEM )
{
   int iCount = TabCtrl_GetItemCount( (HWND) HB_PARWH(1) );
   TC_ITEM item;

   item.mask = TCIF_TEXT | TCIF_IMAGE;
   item.iImage = ISNIL(3) ? -1 : (LONG) hb_parnl(3);
   item.pszText = (LPSTR) hb_parcx(2);

   hb_retni( TabCtrl_InsertItem( (HWND) HB_PARWH(1), iCount, &item) );
}
whttab.c42
HB_FUNCVWN_TABCTRL_INSERTITEM(void)
HB_FUNC( VWN_TABCTRL_INSERTITEM )
{
   TC_ITEM item;
   item.mask = TCIF_TEXT | TCIF_IMAGE;
   item.iImage = ISNIL(4) ? -1 : (LONG) hb_parnl(4);
   item.pszText = (LPSTR) hb_parcx(2);
   hb_retni( TabCtrl_InsertItem( (HWND) HB_PARWH(1), (INT) hb_parni(3), &item) );
}
whttab.c56
HB_FUNCVWN_TABCTRL_SETCURSEL(void)
HB_FUNC( VWN_TABCTRL_SETCURSEL )
{
   hb_retni( TabCtrl_SetCurSel( (HWND) HB_PARWH(1) , hb_parni (2) ) );
}
whttab.c67
HB_FUNCVWN_TABCTRL_GETCURSEL(void)
HB_FUNC( VWN_TABCTRL_GETCURSEL )
{
   hb_retni ( TabCtrl_GetCurSel( (HWND) HB_PARWH (1) ) );
}
whttab.c74
HB_FUNCVWN_TABCTRL_GETITEM(void)
HB_FUNC( VWN_TABCTRL_GETITEM )
{
   TC_ITEM item;
   hb_retl(TabCtrl_GetItem( (HWND) HB_PARWH (1), (int) hb_parni(2) , &item ) );

   // assign  item to param 3
}
whttab.c81
HB_FUNCVWN_TABCTRL_GETITEMCOUNT(void)
HB_FUNC( VWN_TABCTRL_GETITEMCOUNT )
{
   hb_retni( TabCtrl_GetItemCount( (HWND) HB_PARWH(1) ) );
}
whttab.c91
HB_FUNCVWN_TABCTRL_GETITEMRECT(void)
HB_FUNC( VWN_TABCTRL_GETITEMRECT )
{
   RECT rc;
   PHB_ITEM aRect = hb_itemArrayNew( 4 );

   ( void ) TabCtrl_GetItemRect((HWND) HB_PARWH (1), hb_parni(2), &rc);

   hb_arraySetNL( aRect, 1, rc.left );
   hb_arraySetNL( aRect, 2, rc.top );
   hb_arraySetNL( aRect, 3, rc.right );
   hb_arraySetNL( aRect, 4, rc.bottom );

   hb_itemReturnRelease( aRect );
}
whttab.c98
HB_FUNCVWN_TABCTRL_GETROWCOUNT(void)
HB_FUNC( VWN_TABCTRL_GETROWCOUNT )
{
   hb_retni( TabCtrl_GetRowCount( (HWND) HB_PARWH(1) ) );
}
whttab.c115
HB_FUNCVWN_TABCTRL_GETIMAGELIST(void)
HB_FUNC( VWN_TABCTRL_GETIMAGELIST )
{
   HB_RETWH( TabCtrl_GetImageList( (HWND) HB_PARWH(1) ) );
}
whttab.c126
HB_FUNCVWN_TABCTRL_SETIMAGELIST(void)
HB_FUNC( VWN_TABCTRL_SETIMAGELIST )
{
   HB_RETWH( TabCtrl_SetImageList( (HWND) HB_PARWH( 1 ),
                    (LPARAM)(HIMAGELIST) HB_PARWH( 2 ) ) );
}
whttab.c136
HB_FUNCVWN_TABCTRL_SETITEM(void)
HB_FUNC( VWN_TABCTRL_SETITEM )
{
   TC_ITEM item;
   item.mask = TCIF_TEXT | TCIF_IMAGE;
   item.iImage = -1;
   item.pszText = (LPSTR) hb_parcx( 3 );
   hb_retl( TabCtrl_SetItem( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), &item) );
}
whttab.c147
HB_FUNCVWN_TABCTRL_DELETEALLITEMS(void)
HB_FUNC( VWN_TABCTRL_DELETEALLITEMS )
{
   hb_retl(TabCtrl_DeleteAllItems((HWND) HB_PARWH(1)));
}
whttab.c160
HB_FUNCVWN_TABCTRL_DELETEITEM(void)
HB_FUNC( VWN_TABCTRL_DELETEITEM )
{
   hb_retl(TabCtrl_DeleteItem((HWND) HB_PARWH(1), (WPARAM) hb_parnint(2)));
}
whttab.c169
HB_FUNCVWN_TABCTRL_HITTEST(void)
HB_FUNC( VWN_TABCTRL_HITTEST )
{
   TCHITTESTINFO tcht ;

   hb_parni( TabCtrl_HitTest( (HWND) HB_PARWH(1), &tcht ) );

   // assign to structure in param 2


}
whttab.c180
HB_FUNCVWN_TABCTRL_SETITEMEXTRA(void)
HB_FUNC( VWN_TABCTRL_SETITEMEXTRA )
{
   hb_retl( TabCtrl_SetItemExtra( (HWND) HB_PARWH(1), (int) hb_parni(2) ) );
}
whttab.c195
HB_FUNCVWN_TABCTRL_ADJUSTRECT(void)
HB_FUNC( VWN_TABCTRL_ADJUSTRECT )
{
  RECT rc;

  if ( ISARRAY(3) )
  {
     rc.left   = hb_parnl(3,1);
     rc.top    = hb_parnl(3,2);
     rc.right  = hb_parnl(3,3);
     rc.bottom = hb_parnl(3,4);

     ( void ) TabCtrl_AdjustRect( (HWND) HB_PARWH(1), (BOOL) hb_parl(2), &rc );

     hb_stornl( rc.left  , 3 ,1 );
     hb_stornl( rc.top   , 3, 2 );
     hb_stornl( rc.right , 3 ,3 );
     hb_stornl( rc.bottom, 3, 4 );
  }

}
whttab.c204
HB_FUNCVWN_TABCTRL_SETITEMSIZE(void)
HB_FUNC( VWN_TABCTRL_SETITEMSIZE )
{
   hb_retnl( TabCtrl_SetItemSize( (HWND) HB_PARWH(1), (int) hb_parni(2), (int) hb_parni(3) ) );
}
whttab.c229
HB_FUNCVWN_TABCTRL_REMOVEIMAGE(void)
HB_FUNC( VWN_TABCTRL_REMOVEIMAGE )
{
  TabCtrl_RemoveImage( (HWND) HB_PARWH(1), (int) hb_parni(2) );
}
whttab.c238
HB_FUNCVWN_TABCTRL_SETPADDING(void)
HB_FUNC( VWN_TABCTRL_SETPADDING )
{
   TabCtrl_SetPadding( (HWND) HB_PARWH(1), (int) hb_parni(2), (int) hb_parni(3) );
}
whttab.c247
HB_FUNCVWN_TABCTRL_GETTOOLTIPS(void)
HB_FUNC( VWN_TABCTRL_GETTOOLTIPS )
{
   HB_RETWH( TabCtrl_GetToolTips( (HWND) HB_PARWH( 1 ) ) );
}
whttab.c256
HB_FUNCVWN_TABCTRL_SETTOOLTIPS(void)
HB_FUNC( VWN_TABCTRL_SETTOOLTIPS )
{
   TabCtrl_SetToolTips( (HWND) HB_PARWH(1), (HWND) HB_PARWH(2) );
}
whttab.c265
HB_FUNCVWN_TABCTRL_GETCURFOCUS(void)
HB_FUNC( VWN_TABCTRL_GETCURFOCUS )
{
   hb_retni( TabCtrl_GetCurFocus( (HWND) HB_PARWH(1) ) );
}
whttab.c274
HB_FUNCVWN_TABCTRL_SETCURFOCUS(void)
HB_FUNC( VWN_TABCTRL_SETCURFOCUS )
{
  TabCtrl_SetCurFocus( (HWND) HB_PARWH(1), (int) hb_parni(2) );
  hb_ret();
}
whttab.c283
HB_FUNCVWN_TABCTRL_SETMINTABWIDTH(void)
HB_FUNC( VWN_TABCTRL_SETMINTABWIDTH )
{
   hb_retni( TabCtrl_SetMinTabWidth( (HWND) HB_PARWH(1), (int) hb_parni(2) ) );
}
whttab.c293
HB_FUNCVWN_TABCTRL_DESELECTALL(void)
HB_FUNC( VWN_TABCTRL_DESELECTALL )
{
   TabCtrl_DeselectAll( (HWND) HB_PARWH(1), (UINT) hb_parni( 2 ) );
}
whttab.c302
HB_FUNCVWN_TABCTRL_HIGHLIGHTITEM(void)
HB_FUNC( VWN_TABCTRL_HIGHLIGHTITEM )
{
   hb_retl( TabCtrl_HighlightItem( (HWND) HB_PARWH(1), (int) hb_parni(2), (WORD) hb_parni(3) ) );
}
whttab.c311
HB_FUNCVWN_TABCTRL_SETEXTENDEDSTYLE(void)
HB_FUNC( VWN_TABCTRL_SETEXTENDEDSTYLE )
{
   hb_retnl( TabCtrl_SetExtendedStyle( (HWND) HB_PARWH(1), (DWORD) hb_parnl(2) ) );
}
whttab.c320
HB_FUNCVWN_TABCTRL_GETEXTENDEDSTYLE(void)
HB_FUNC( VWN_TABCTRL_GETEXTENDEDSTYLE )
{
   hb_retnl( TabCtrl_GetExtendedStyle( (HWND) HB_PARWH(1) ) );
}
whttab.c329
HB_FUNCVWN_TABCTRL_SETUNICODEFORMAT(void)
HB_FUNC( VWN_TABCTRL_SETUNICODEFORMAT )
{
   hb_retl( TabCtrl_SetUnicodeFormat( (HWND) HB_PARWH(1), hb_parl(2) ) );
}
whttab.c338
HB_FUNCVWN_TABCTRL_GETUNICODEFORMAT(void)
HB_FUNC( VWN_TABCTRL_GETUNICODEFORMAT )
{
   hb_retl( TabCtrl_GetUnicodeFormat( (HWND) HB_PARWH(1) ) );
}
whttab.c347
whttbar.c
TypeFunctionSourceLine
HB_FUNCVWN_CREATEMAPPEDBITMAP(void)
HB_FUNC( VWN_CREATEMAPPEDBITMAP )
{
   COLORMAP *cm = (COLORMAP *) hb_parc( 4 ); //hb_param(4, HB_IT_STRING)->item.asString.value;

   HB_RETWH( CreateMappedBitmap( (HINSTANCE) HB_PARWH(1),
                                       (int) hb_parni(2),
                                       (UINT) hb_parni(3),
                                       ISNIL(4) ? NULL : (COLORMAP *) cm ,
                                       (int) hb_parni(5) ) );
}
whttbar.c38
HB_FUNCVWN_CREATETOOLBAREX(void)
HB_FUNC( VWN_CREATETOOLBAREX )
{

   HB_RETWH( CreateToolbarEx( (HWND) HB_PARWH(1),    // parent
                                     (DWORD)hb_parnl(2),      // style
                                     (UINT) hb_parni(3),      // id,
                                     (int) hb_parni(4),       // number of btn images in bmp
                                     ISNIL(5) ? NULL : (HINSTANCE) HB_PARWH(5), // hInst of bmp
                                     (UINT) hb_parnl(6),      // resource id, or hBmp handle
                                     (LPCTBBUTTON) hb_parcx(7),// array of button structures
                                     (int) hb_parni(8),         // number of buttons to add
                                     (int) hb_parni(9),         // width of button
                                     (int) hb_parni(10),        // height of button
                                     (int) hb_parni(11),        // width of bitmap
                                     (int) hb_parni(12),            // height of bitmap
                                     (UINT) hb_parni(13) ) );   // size of TBBUTTON

}
whttbar.c54
HB_FUNCVWN_GETTOOLBARITEMRECT(void)
HB_FUNC( VWN_GETTOOLBARITEMRECT )
{
   RECT    rc = {0,0,0,0};
   PHB_ITEM aRect ;
   SendMessage((HWND) HB_PARWH(1), TB_GETITEMRECT, hb_parni(2), (LPARAM)&rc);
//   MapWindowPoints((HWND) HB_PARWH(1), HWND_DESKTOP, (POINT*)&rc, 2);
   aRect = Rect2Array( &rc  );
   hb_itemReturn( aRect );
   hb_itemRelease( aRect );
}
whttbar.c77
whttext.c
TypeFunctionSourceLine
HB_FUNCVWN_TEXTOUT(void)
HB_FUNC( VWN_TEXTOUT )
{

   hb_retl( TextOut((HDC) HB_PARWH( 1 )   ,   // handle of device context
                    hb_parni( 2 )         ,       // x-coordinate of starting position
                    hb_parni( 3 )         ,     // y-coordinate of starting position
                    (LPCTSTR) hb_parcx( 4 ),     // address of string
                    hb_parclen( 4 )            // number of characters in string
                   )
          );
}
whttext.c39
HB_FUNCVWN_EXTTEXTOUT(void)
HB_FUNC( VWN_EXTTEXTOUT )
{
   RECT  rc    ;
   INT * lpDx = NULL;
   BOOL rcOk   ;
   UINT iCount ;
   UINT i      ;
   char * cText = hb_parcx( 6 );

   rcOk = ( ISARRAY(5) && Array2Rect(hb_param(5, HB_IT_ARRAY), &rc) );

   if ( ISARRAY(7) )
   {
       iCount = hb_parinfa(7,0);
       lpDx = (INT *) hb_xgrab( iCount * sizeof( INT ) );
       for ( i=0 ; i < iCount ; i++ )
       {
          *(lpDx+i) = hb_parni( 7,i+1);
       }
   }

   hb_retl( ExtTextOut( (HDC) HB_PARWH( 1 )     ,
                         hb_parni( 2 )          ,
                         hb_parni( 3 )          ,
                         (UINT) hb_parni( 4 )   ,
                         rcOk ? &rc : NULL      ,
                         (LPCSTR) cText         ,
                         (UINT) strlen( cText ) ,
                         ISARRAY(7) ? lpDx : NULL
                         ) );

   if (ISARRAY(7))
       hb_xfree(lpDx);

}
whttext.c74
HB_FUNCVWN_DRAWTEXT(void)
HB_FUNC( VWN_DRAWTEXT )
{
   char *cText = hb_parcx( 2 );
   RECT rc;

   if ( ISARRAY( 3 ) && Array2Rect( hb_param( 3, HB_IT_ARRAY ), &rc ) )
      hb_retni( DrawText(
               (HDC) HB_PARWH( 1 ),   // handle of device context
               (LPCTSTR) cText,           // address of string
               strlen( cText ),         // number of characters in string
               &rc,
               ISNIL(4) ? DT_LEFT : hb_parni( 4 ) ) );
   else
      hb_retni( 0 );
}
whttext.c116
HB_FUNCVWN_DRAWTEXTEX(void)
HB_FUNC( VWN_DRAWTEXTEX )
{
   char *cText = (char *) hb_parcx( 2 );
   RECT rc;
   DRAWTEXTPARAMS *dtp = NULL;

   if ( ISCHAR( 5 ))
      dtp = (DRAWTEXTPARAMS *) hb_parc( 5 ); //hb_param( 5, HB_IT_STRING )->item.asString.value;

   if ( ISARRAY( 3 ) && Array2Rect( hb_param( 3, HB_IT_ARRAY ), &rc ) )
      hb_retni( DrawTextEx( (HDC) HB_PARWH( 1 ),     // handle of device context
                            (LPTSTR) cText    ,     // address of string
                            strlen( cText )    ,     // number of characters in string
                            (LPRECT) &rc,
                            ISNIL(4) ? DT_LEFT : hb_parni( 4 )       ,
                            ISCHAR(5) ? (LPDRAWTEXTPARAMS) dtp : NULL
                           ) );
   else
      hb_retni( 0 );
}
whttext.c138
HB_FUNCVWN_TABBEDTEXTOUT(void)
HB_FUNC( VWN_TABBEDTEXTOUT )
{
   char *cText = hb_parcx( 4 );
   int iCount  ;
   int *aiTabs ;
   int i       ;

   if ( ISARRAY( 5 ) )
   {
      iCount = hb_parinfa(5,0);
      aiTabs = (INT *) hb_xgrab( iCount * sizeof( INT ) );
      for ( i=0 ; i < iCount ; i++ )
      {
        *(aiTabs+i) = hb_parni( 5, i+1 );
      }

      hb_retnl( (LONG) TabbedTextOut( (HDC) HB_PARWH( 1 )  ,
                                      hb_parni( 2 )        ,
                                      hb_parni( 3 )        ,
                                      (LPCSTR) cText       ,
                                      strlen(cText)        ,
                                      iCount               ,
                                      aiTabs               ,
                                      hb_parni( 6 )
                                    ) );
      hb_xfree( aiTabs );

   }
   else
      hb_retnl( 0 );
}
whttext.c166
HB_FUNCVWN_GETTEXTFACE(void)
HB_FUNC( VWN_GETTEXTFACE )
{
  char *cText = (char*) hb_xgrab(MAX_PATH);
  int iRet ;

  iRet = GetTextFace( (HDC) HB_PARWH( 1 ), MAX_PATH , cText );
  if ( iRet )
     hb_retclen( cText, iRet );

  hb_xfree( cText );

}
whttext.c204
HB_FUNCVWN_GETTABBEDTEXTEXTENT(void)
HB_FUNC( VWN_GETTABBEDTEXTEXTENT )
{
   char *cText ;
   int iCount  ;
   int *aiTabs ;
   int i       ;

   if ( ISARRAY( 3 ) )
   {
      iCount = hb_parinfa(3,0);
      aiTabs = (INT *) hb_xgrab( iCount * sizeof( INT ) );
      for ( i=0 ; i < iCount ; i++ )
      {
        *(aiTabs+i) = hb_parni( 3, i+1 );
      }
      cText = hb_parcx( 2 );
      hb_retnl( (LONG) GetTabbedTextExtent( (HDC) HB_PARWH( 1 )  ,
                                            (LPCTSTR) cText      ,
                                            strlen(cText)        ,
                                            iCount               ,
                                            aiTabs
                                          ) );


      hb_xfree( aiTabs );

   }
   else
      hb_retnl( 0 );
}
whttext.c225
HB_FUNCVWN_GETTEXTMETRICS(void)
HB_FUNC( VWN_GETTEXTMETRICS )
{
   TEXTMETRIC tm ;

   if ( GetTextMetrics( (HDC) HB_PARWH( 1 ), &tm ) )
      hb_retclen( (char *) &tm, sizeof( TEXTMETRIC ) );
}
whttext.c262
HB_FUNCVWN_GETTEXTEXTENTPOINT32(void)
HB_FUNC( VWN_GETTEXTEXTENTPOINT32 )
{
   char * pstr = hb_parcx(2);
   SIZE sz;
   PHB_ITEM aMetr ;

   if ( GetTextExtentPoint32( (HDC) HB_PARWH(1), pstr, strlen( pstr ), &sz ) )
   {
      aMetr = Size2Array( &sz );
      hb_itemReturn( aMetr );
      hb_itemRelease( aMetr );
   }

}
whttext.c293
HB_FUNCVWN_GETBKMODE(void)
HB_FUNC( VWN_GETBKMODE )
{
   hb_retni( GetBkMode( (HDC) HB_PARWH( 1 ) ) );
}
whttext.c313
HB_FUNCVWN_SETBKMODE(void)
HB_FUNC( VWN_SETBKMODE )
{
   hb_retni( SetBkMode( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whttext.c322
HB_FUNCVWN_GETTEXTALIGN(void)
HB_FUNC( VWN_GETTEXTALIGN )
{
   hb_retni( GetTextAlign( (HDC) HB_PARWH( 1 ) ) );
}
whttext.c331
HB_FUNCVWN_SETTEXTALIGN(void)
HB_FUNC( VWN_SETTEXTALIGN )
{
   hb_retni( SetTextAlign( (HDC) HB_PARWH( 1 ), (UINT) hb_parni( 2 ) ) );
}
whttext.c340
HB_FUNCVWN_SETTEXTJUSTIFICATION(void)
HB_FUNC( VWN_SETTEXTJUSTIFICATION )
{
   hb_retl( SetTextJustification( (HDC) HB_PARWH( 1 ),
                                  hb_parni( 2 )      ,
                                  hb_parni( 3 )
                                  ) );
}
whttext.c349
HB_FUNCVWN_GETTEXTCHARACTEREXTRA(void)
HB_FUNC( VWN_GETTEXTCHARACTEREXTRA )
{
   hb_retni( GetTextCharacterExtra( (HDC) HB_PARWH( 1 ) ) );
}
whttext.c362
HB_FUNCVWN_SETTEXTCHARACTEREXTRA(void)
HB_FUNC( VWN_SETTEXTCHARACTEREXTRA )
{
   hb_retni( SetTextCharacterExtra( (HDC) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whttext.c371
HB_FUNCVWN_GETTEXTCHARSET(void)
HB_FUNC( VWN_GETTEXTCHARSET )
{
   hb_retni( GetTextCharset( (HDC) HB_PARWH( 1 ) ) );
}


//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI GrayStringA( IN HDC hDC, IN HBRUSH hBrush, IN GRAYSTRINGPROC lpOutputFunc, IN LPARAM lpData, IN int nCount, IN int X, IN int Y, IN int nWidth, IN int nHeight);

// tbd

/*

HB_FUNC( VWN_GRAYSTRING )
{
   GRAYSTRINGPROC lpOutputFunc ;

   // Your code goes here

   hb_retl( GrayString( (HDC) HB_PARWH( 1 )   ,
                        (HBRUSH) HB_PARWH( 2 ),
                        lpOutputFunc          ,
                        (LPARAM) hb_parnint( 4 ),
                        hb_parni( 5 )         ,
                        hb_parni( 6 )         ,
                        hb_parni( 7 )         ,
                        hb_parni( 8 )         ,
                        hb_parni( 9 )
                      ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI BOOL APIENTRY GetCharABCWidthsA( IN HDC, IN UINT, IN UINT, OUT LPABC);

/*

HB_FUNC( VWN_GETCHARABCWIDTHSA )
{
   LPABC lpabc ;

   // Your code goes here

   hb_retl( GetCharABCWidthsA( (HDC) HB_PARWH( 1 ) ,
                               (UINT) hb_parni( 2 ),
                               (UINT) hb_parni( 3 ),
                               lpabc
                               ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL APIENTRY GetCharABCWidthsFloatA( IN HDC, IN UINT, IN UINT, OUT LPABCFLOAT);

/*

HB_FUNC( VWN_GETCHARABCWIDTHSFLOATA )
{
   LPABCFLOAT lpabcFloat ;

   // Your code goes here

   hb_retl( GetCharABCWidthsFloatA( (HDC) HB_PARWH( 1 ) ,
                                    (UINT) hb_parni( 2 ),
                                    (UINT) hb_parni( 3 ),
                                    lpabcFloat
                                    ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetCharABCWidthsI( IN HDC, IN UINT, IN UINT, IN LPWORD, OUT LPABC);

/*

HB_FUNC( VWN_GETCHARABCWIDTHSI )
{
   LPWORD lpWord ;
   LPABC  lpabc  ;

   // Your code goes here

   hb_retl( GetCharABCWidthsI( (HDC) HB_PARWH( 1 ) ,
                               (UINT) hb_parni( 2 ),
                               (UINT) hb_parni( 3 ),
                               lpWord              ,
                               lpabc
                               ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI DWORD WINAPI GetCharacterPlacementA( IN HDC, IN LPCSTR, IN int, IN int, IN OUT LPGCP_RESULTSA, IN DWORD);

/*

HB_FUNC( VWN_GETCHARACTERPLACEMENTA )
{
   LPGCP_RESULTSA lpgcp_resultsa ;

   // Your code goes here

   hb_retnl( (LONG) GetCharacterPlacementA( (HDC) HB_PARWH( 1 )  ,
                                            (LPCSTR) hb_parcx( 2 ),
                                            hb_parni( 3 )        ,
                                            hb_parni( 4 )        ,
                                            lpgcp_resultsa       ,
                                            (DWORD) hb_parnl( 6 )
                                            ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetCharWidth32A( IN HDC, IN UINT, IN UINT, OUT LPINT);

/*

HB_FUNC( VWN_GETCHARWIDTH32A )
{
   LPINT lpInt ;

   // Your code goes here

   hb_retl( GetCharWidth32A( (HDC) HB_PARWH( 1 ) ,
                             (UINT) hb_parni( 2 ),
                             (UINT) hb_parni( 3 ),
                             lpInt
                             ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetCharWidthA( IN HDC, IN UINT, IN UINT, OUT LPINT);

/*

HB_FUNC( VWN_GETCHARWIDTHA )
{
   LPINT lpInt ;

   // Your code goes here

   hb_retl( GetCharWidthA( (HDC) HB_PARWH( 1 ) ,
                           (UINT) hb_parni( 2 ),
                           (UINT) hb_parni( 3 ),
                           lpInt
                           ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL APIENTRY GetCharWidthFloatA( IN HDC, IN UINT, IN UINT, OUT PFLOAT);

/*

HB_FUNC( VWN_GETCHARWIDTHFLOATA )
{
   PFLOAT pFloat ;

   // Your code goes here

   hb_retl( GetCharWidthFloatA( (HDC) HB_PARWH( 1 ) ,
                                (UINT) hb_parni( 2 ),
                                (UINT) hb_parni( 3 ),
                                pFloat
                                ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetCharWidthI( IN HDC, IN UINT, IN UINT, IN LPWORD, OUT LPINT);

/*

HB_FUNC( VWN_GETCHARWIDTHI )
{
   LPWORD lpWord ;
   LPINT  lpInt  ;

   // Your code goes here

   hb_retl( GetCharWidthI( (HDC) HB_PARWH( 1 ) ,
                           (UINT) hb_parni( 2 ),
                           (UINT) hb_parni( 3 ),
                           lpWord              ,
                           lpInt
                           ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI DWORD WINAPI GetKerningPairsA( IN HDC, IN DWORD, OUT LPKERNINGPAIR);

/*

HB_FUNC( VWN_GETKERNINGPAIRSA )
{
   LPKERNINGPAIR lpkerningpair ;

   // Your code goes here

   hb_retnl( (LONG) GetKerningPairsA( (HDC) HB_PARWH( 1 )  ,
                                      (DWORD) hb_parnl( 2 ),
                                      lpkerningpair
                                      ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI int WINAPI GetTextCharsetInfo( IN HDC hdc, OUT LPFONTSIGNATURE lpSig, IN DWORD dwFlags);

/*

HB_FUNC( VWN_GETTEXTCHARSETINFO )
{
   LPFONTSIGNATURE lpSig   ;

   // Your code goes here

   hb_retni( GetTextCharsetInfo( (HDC) HB_PARWH( 1 )  ,
                                 lpSig                ,
                                 (DWORD) hb_parnl( 3 )
                                 ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL APIENTRY GetTextExtentExPointA( IN HDC, IN LPCSTR, IN int, IN int, OUT LPINT, OUT LPINT, OUT LPSIZE );

/*

HB_FUNC( VWN_GETTEXTEXTENTEXPOINTA )
{
   LPINT  lpInt1 ;
   LPINT  lpInt2 ;
   LPSIZE lpSize ;

   // Your code goes here

   hb_retl( GetTextExtentExPointA( (HDC) HB_PARWH( 1 )  ,
                                   (LPCSTR) hb_parcx( 2 ),
                                   hb_parni( 3 )        ,
                                   hb_parni( 4 )        ,
                                   lpInt1               ,
                                   lpInt2               ,
                                   lpSize
                                   ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetTextExtentExPointI( IN HDC, IN LPWORD, IN int, IN int, OUT LPINT, OUT LPINT, OUT LPSIZE);

/*

HB_FUNC( VWN_GETTEXTEXTENTEXPOINTI )
{
   LPWORD lpWord ;
   LPINT  lpInt1 ;
   LPINT  lpInt2 ;
   LPSIZE lpSize ;

   // Your code goes here

   hb_retl( GetTextExtentExPointI( (HDC) HB_PARWH( 1 ),
                                   lpWord             ,
                                   hb_parni( 3 )      ,
                                   hb_parni( 4 )      ,
                                   lpInt1             ,
                                   lpInt2             ,
                                   lpSize
                                   ) );
}

*/


//-----------------------------------------------------------------------------
// WINGDIAPI BOOL APIENTRY GetTextExtentPointA( IN HDC, IN LPCSTR, IN int, OUT LPSIZE );

/*

HB_FUNC( VWN_GETTEXTEXTENTPOINTA )
{
   LPSIZE lpSize ;

   // Your code goes here

   hb_retl( GetTextExtentPointA( (HDC) HB_PARWH( 1 )  ,
                                 (LPCSTR) hb_parcx( 2 ),
                                 hb_parni( 3 )        ,
                                 lpSize
                                 ) );
}

*/

//-----------------------------------------------------------------------------
// WINGDIAPI BOOL WINAPI GetTextExtentPointI( IN HDC, IN LPWORD, IN int, OUT LPSIZE);

whttext.c382
whttree.c
TypeFunctionSourceLine
HB_FUNCVWN_TVINSERTITEM(void)
HB_FUNC( VWN_TVINSERTITEM )
{
   TV_INSERTSTRUCT is;

   is.hParent      = ( HTREEITEM ) HB_PARWH( 3 );
   is.hInsertAfter = TVI_LAST;

   #if (_WIN32_IE >= 0x0400) && !defined(_MSC_VER)
      is.DUMMYUNIONNAME.item.pszText = hb_parcx( 2 );
      is.DUMMYUNIONNAME.item.mask    = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
      is.DUMMYUNIONNAME.item.iImage  = hb_parnl( 4 );
      is.DUMMYUNIONNAME.item.iSelectedImage = hb_parnl( 4 );
   #else
      is.item.pszText = hb_parcx( 2 );
      is.item.mask    = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
      is.item.iImage  = hb_parnl( 4 );
      is.item.iSelectedImage = hb_parnl( 4 );
   #endif

   HB_RETWI( SendMessage( ( HWND ) HB_PARWH( 1 ), TVM_INSERTITEM, 0,
           ( LPARAM )( LPTV_INSERTSTRUCT )( &is ) ) );
}
whttree.c15
HB_FUNCVWN_TVDELETEITEM(void)
HB_FUNC( VWN_TVDELETEITEM )
{
   ( void ) TreeView_DeleteItem( (HWND) HB_PARWH( 1 ), ( HTREEITEM ) HB_PARWH( 2 ) );
}
whttree.c38
HB_FUNCVWN_TVSETIMAGELIST(void)
HB_FUNC( VWN_TVSETIMAGELIST ) // ( hWnd, hImageList, nType )
{
   HB_RETWH( TreeView_SetImageList( ( HWND ) HB_PARWH( 1 ),
            ( HIMAGELIST ) HB_PARWH( 2 ), hb_parnl( 3 ) ) );
}
whttree.c46
HB_FUNCVWN_TVGETSELTEXT(void)
HB_FUNC( VWN_TVGETSELTEXT ) // ( hWnd ) --> cText
{
   HWND hWnd = ( HWND ) HB_PARWH( 1 );
   HTREEITEM hItem = TreeView_GetSelection( hWnd );
   TV_ITEM tvi;
   BYTE buffer[ 100 ];
   if( hItem )
   {
      tvi.mask       = TVIF_TEXT;
      tvi.hItem      = hItem;
      tvi.pszText    = ( char *)buffer;
      tvi.cchTextMax = 100;
      ( void ) TreeView_GetItem( hWnd, &tvi );
      hb_retc( tvi.pszText );
   }
   else
      hb_retc( NULL );
}
whttree.c54
HB_FUNCVWN_TVGETSELECTED(void)
HB_FUNC( VWN_TVGETSELECTED ) // ( hWnd ) --> hItem
{
   HB_RETWH( TreeView_GetSelection( ( HWND ) HB_PARWH( 1 ) ) );
}
whttree.c75
whtview.c
TypeFunctionSourceLine
HB_FUNCVWN_GETVIEWPORTEXTEX(void)
HB_FUNC( VWN_GETVIEWPORTEXTEX )
{
   SIZE siz ;
   PHB_ITEM aSize ;

   if ( GetViewportExtEx( (HDC) HB_PARWH( 1 ), &siz ) )
   {
       aSize = Size2Array( &siz );
       hb_itemReturn( aSize );
       hb_itemRelease( aSize );
   }

}
whtview.c30
HB_FUNCVWN_GETVIEWPORTORGEX(void)
HB_FUNC( VWN_GETVIEWPORTORGEX )
{
   POINT pt ;
   PHB_ITEM aPoint;

   if (  GetViewportOrgEx( (HDC) HB_PARWH( 1 ), &pt ) )
   {
      aPoint = Point2Array( &pt );
      hb_itemReturn( aPoint );
      hb_itemRelease( aPoint );
   }

}
whtview.c51
HB_FUNCVWN_GETWINDOWEXTEX(void)
HB_FUNC( VWN_GETWINDOWEXTEX )
{
   SIZE siz ;
   PHB_ITEM aSize ;

   if ( GetWindowExtEx( (HDC) HB_PARWH( 1 ), &siz ) )
   {
       aSize = Size2Array( &siz );
       hb_itemReturn( aSize );
       hb_itemRelease( aSize );
   }
}
whtview.c72
HB_FUNCVWN_SCALEVIEWPORTEXTEX(void)
HB_FUNC( VWN_SCALEVIEWPORTEXTEX )
{
   SIZE siz ;
   PHB_ITEM aSize ;

   if (  ScaleViewportExtEx( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ),
                                hb_parni( 4 )    , hb_parni( 5 ), &siz  ) )
   {
       aSize = Size2Array( &siz );
       hb_itemReturn( aSize );
       hb_itemRelease( aSize );

   }
}
whtview.c92
HB_FUNCVWN_SETVIEWPORTEXTEX(void)
HB_FUNC( VWN_SETVIEWPORTEXTEX )
{
   SIZE siz ;
   PHB_ITEM aSize ;

   if ( SetViewportExtEx( (HDC) HB_PARWH( 1 ), hb_parni( 2 ), hb_parni( 3 ), &siz ) )
   {
       aSize = Size2Array( &siz );
       hb_itemReturn( aSize );
       hb_itemRelease( aSize );

   }
}
whtview.c114
HB_FUNCVWN_SETVIEWPORTORGEX(void)
HB_FUNC( VWN_SETVIEWPORTORGEX )
{
   POINT pt ;
   PHB_ITEM aPoint ;

   if ( SetViewportOrgEx( (HDC) HB_PARWH( 1 ),hb_parni( 2 ), hb_parni( 3 ), &pt ) )
   {
       aPoint = Point2Array( &pt );
       hb_itemReturn( aPoint );
       hb_itemRelease( aPoint );

   }
}
whtview.c135
whtwnd.c
TypeFunctionSourceLine
HB_FUNCVWN_ISICONIC(void)
HB_FUNC( VWN_ISICONIC )
{
   hb_retl( IsIconic( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c26
HB_FUNCVWN_ISWINDOWVISIBLE(void)
HB_FUNC( VWN_ISWINDOWVISIBLE )
{
   hb_retl( IsWindowVisible( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c33
HB_FUNCVWN_ISZOOMED(void)
HB_FUNC( VWN_ISZOOMED )
{
   hb_retl( IsZoomed( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c40
HB_FUNCVWN_ISWINDOWUNICODE(void)
HB_FUNC( VWN_ISWINDOWUNICODE )
{
   hb_retl( IsWindowUnicode( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c49
HB_FUNCVWN_CLOSEWINDOW(void)
HB_FUNC( VWN_CLOSEWINDOW )
{
   hb_retl( CloseWindow( (HWND) HB_PARWH(1) ) );
}
whtwnd.c58
HB_FUNCVWN_FINDWINDOW(void)
HB_FUNC( VWN_FINDWINDOW )
{

   HB_RETWH( FindWindow( (LPCSTR) hb_parcx(1), ISCHAR(2) ? hb_parcx(2):NULL ) );
}
whtwnd.c65
HB_FUNCVWN_FINDWINDOWEX(void)
HB_FUNC( VWN_FINDWINDOWEX )
{
   HB_RETWH( FindWindowEx( (HWND) HB_PARWH( 1 ) ,
                                  (HWND) HB_PARWH( 2 ) ,
                                  (LPCSTR) hb_parcx( 3 ),
                                  (LPCSTR) hb_parcx( 4 )
                                ) );
}
whtwnd.c75
HB_FUNCVWN_ISCHILD(void)
HB_FUNC( VWN_ISCHILD )
{
   hb_retl( ( BOOL ) IsChild( (HWND) HB_PARWH(1), (HWND) HB_PARWH(2) ) );
}
whtwnd.c87
HB_FUNCVWN_UPDATEWINDOW(void)
HB_FUNC( VWN_UPDATEWINDOW )
{
  hb_retl( UpdateWindow( (HWND) HB_PARWH(1)) );
}
whtwnd.c94
HB_FUNCVWN_GETWINDOWLONG(void)
HB_FUNC( VWN_GETWINDOWLONG )
{
   hb_retnl( GetWindowLong( (HWND) HB_PARWH(1), hb_parni(2) ));
}
whtwnd.c101
HB_FUNCVWN_SETWINDOWLONG(void)
HB_FUNC( VWN_SETWINDOWLONG )
{
   hb_retnl( SetWindowLong( (HWND) HB_PARWH(1), hb_parni(2), hb_parnl(3) ));
}
whtwnd.c108
HB_FUNCVWN_ENABLEWINDOW(void)
HB_FUNC( VWN_ENABLEWINDOW )
{
   EnableWindow( (HWND) HB_PARWH(1), hb_parl(2) );
}
whtwnd.c116
HB_FUNCVWN_ISWINDOWENABLED(void)
HB_FUNC( VWN_ISWINDOWENABLED )
{
   hb_retl( IsWindowEnabled( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c125
HB_FUNCVWN_DESTROYWINDOW(void)
HB_FUNC( VWN_DESTROYWINDOW )
{
   hb_retl( DestroyWindow( (HWND) HB_PARWH( 1 )) );
}
whtwnd.c132
HB_FUNCVWN_ISWINDOW(void)
HB_FUNC( VWN_ISWINDOW )
{
    hb_retl( IsWindow( (HWND) HB_PARWH( 1 )) );
}
whtwnd.c139
HB_FUNCVWN_SHOWWINDOW(void)
HB_FUNC( VWN_SHOWWINDOW )
{
   hb_retl( ShowWindow( (HWND) HB_PARWH( 1 ), hb_parni(2) ));
}
whtwnd.c146
HB_FUNCVWN_MOVEWINDOW(void)
HB_FUNC( VWN_MOVEWINDOW )
{
  hb_retl( MoveWindow(
                       (HWND) HB_PARWH(1),
                       hb_parni(2),
                       hb_parni(3),
                       hb_parni(4),
                       hb_parni(5),
                       (ISNIL(6) ? TRUE : hb_parl(6))
                      ));
}
whtwnd.c151
HB_FUNCVWN_DEFWINDOWPROC(void)
HB_FUNC( VWN_DEFWINDOWPROC )
{
  HB_RETWI( DefWindowProc( (HWND) HB_PARWH(1), hb_parnl(2), hb_parnl(3), hb_parnl(4)));
}
whtwnd.c166
HB_FUNCVWN_DEFDLGPROC(void)
HB_FUNC( VWN_DEFDLGPROC )
{
  HB_RETWI( DefDlgProc( (HWND) HB_PARWH(1), hb_parnl(2), hb_parnl(3), hb_parnl(4)));
}
whtwnd.c173
HB_FUNCVWN_DEFMDICHILDPROC(void)
HB_FUNC( VWN_DEFMDICHILDPROC )
{
  HB_RETWI( DefMDIChildProc( (HWND) HB_PARWH(1), hb_parnl(2), hb_parnl(3), hb_parnl(4)));
}
whtwnd.c180
HB_FUNCVWN_DEFFRAMEPROC(void)
HB_FUNC( VWN_DEFFRAMEPROC )
{
  HB_RETWI( DefFrameProc( (HWND) HB_PARWH(1), (HWND) HB_PARWH(2), hb_parnl(3), hb_parnl(4), hb_parnl(5)));
}
whtwnd.c187
HB_FUNCVWN_CALLWINDOWPROC(void)
HB_FUNC( VWN_CALLWINDOWPROC )
{
  HB_RETWI( CallWindowProc( (WNDPROC) HB_PARWH(1), (HWND) HB_PARWH(2), hb_parni(3), hb_parnl(4), hb_parnl(5)));
}
whtwnd.c195
HB_FUNCVWN_INVALIDATERECT(void)
HB_FUNC( VWN_INVALIDATERECT )
{
   RECT rc;
   BOOL bRectOk ;

   bRectOk = ( ISARRAY( 2 )  &&   Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ) );

   hb_retl( InvalidateRect(
                           ISNIL(1) ? NULL : (HWND) HB_PARWH( 1 )    ,  // handle of window with changed update region
                           bRectOk ? &rc : NULL ,  // address of rectangle coordinates
                           ISLOG(3) ? hb_parl( 3 ) : TRUE         // erase-background flag
                          ) );
}
whtwnd.c205
HB_FUNCVWN_REDRAWWINDOW(void)
HB_FUNC( VWN_REDRAWWINDOW )
{
   RECT rc ;
   BOOL bRectOk ;

   bRectOk = ( ISARRAY(2) && Array2Rect( hb_param(2,HB_IT_ARRAY), &rc ) );

   hb_retl( RedrawWindow(
                          (HWND) HB_PARWH( 1 )                     ,   // handle of window
                          bRectOk ? &rc : NULL                     ,   // address of structure with update rectangle
                          ISNIL( 3 ) ? NULL : (HRGN) HB_PARWH( 3 ) ,   // handle of update region
                          hb_parni( 4 )                                // array of redraw flags
                         ) );

}
whtwnd.c223
HB_FUNCVWN_GETCLIENTRECT(void)
HB_FUNC( VWN_GETCLIENTRECT )
{
   RECT rc;

   PHB_ITEM aMetr ;
   GetClientRect( (HWND) HB_PARWH( 1 ), &rc );

   aMetr = Rect2Array( &rc  );

   hb_itemReturn( aMetr );
   hb_itemRelease( aMetr );
}
whtwnd.c244
HB_FUNCVWN_GETWINDOWRECT(void)
HB_FUNC( VWN_GETWINDOWRECT )
{
   RECT rc;
   PHB_ITEM aMetr ;

   GetWindowRect( (HWND) HB_PARWH( 1 ),   &rc );
   aMetr = Rect2Array( &rc  );

   hb_itemReturn( aMetr );
   hb_itemRelease( aMetr );
}
whtwnd.c262
HB_FUNCVWN_SHOWOWNEDPOPUPS(void)
HB_FUNC( VWN_SHOWOWNEDPOPUPS )
{
   hb_retl( ShowOwnedPopups( (HWND) HB_PARWH( 1 ), hb_parl( 2 ) ) );
}
whtwnd.c279
HB_FUNCVWN_OPENICON(void)
HB_FUNC( VWN_OPENICON )
{
   hb_retl( OpenIcon( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c288
HB_FUNCVWN_BEGINDEFERWINDOWPOS(void)
HB_FUNC( VWN_BEGINDEFERWINDOWPOS )
{
   HB_RETWH( BeginDeferWindowPos( hb_parni( 1 ) ) );
}
whtwnd.c298
HB_FUNCVWN_DEFERWINDOWPOS(void)
HB_FUNC( VWN_DEFERWINDOWPOS )
{
   HB_RETWH( DeferWindowPos( (HDWP) HB_PARWH( 1 ),
                                    (HWND) HB_PARWH( 2 ),
                                    (HWND) HB_PARWH( 3 ),
                                    hb_parni( 4 )       ,
                                    hb_parni( 5 )       ,
                                    hb_parni( 6 )       ,
                                    hb_parni( 7 )       ,
                                    (UINT) hb_parni( 8 )
                                  ) );
}
whtwnd.c307
HB_FUNCVWN_ENDDEFERWINDOWPOS(void)
HB_FUNC( VWN_ENDDEFERWINDOWPOS )
{
   hb_retl( EndDeferWindowPos( (HDWP) HB_PARWH( 1 ) ) );
}
whtwnd.c324
HB_FUNCVWN_SETWINDOWPOS(void)
HB_FUNC( VWN_SETWINDOWPOS )
{
   hb_retl( SetWindowPos( (HWND) HB_PARWH( 1 ),
                          (HWND) HB_PARWH( 2 ),
                          hb_parni( 3 )       ,
                          hb_parni( 4 )       ,
                          hb_parni( 5 )       ,
                          hb_parni( 6 )       ,
                          (UINT) hb_parni( 7 )
                        ) );
}
whtwnd.c334
HB_FUNCVWN_SETFOCUS(void)
HB_FUNC( VWN_SETFOCUS )
{
   HB_RETWH( SetFocus( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c351
HB_FUNCVWN_GETACTIVEWINDOW(void)
HB_FUNC( VWN_GETACTIVEWINDOW )
{
   HB_RETWH( GetActiveWindow(  ) );
}
whtwnd.c360
HB_FUNCVWN_SETACTIVEWINDOW(void)
HB_FUNC( VWN_SETACTIVEWINDOW )
{
   HB_RETWH( SetActiveWindow( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c370
HB_FUNCVWN_GETFOREGROUNDWINDOW(void)
HB_FUNC( VWN_GETFOREGROUNDWINDOW )
{
   HB_RETWH( GetForegroundWindow(  ) );
}
whtwnd.c380
HB_FUNCVWN_GETFOCUS(void)
HB_FUNC( VWN_GETFOCUS )
{
   HB_RETWH( GetFocus(  ) );
}
whtwnd.c390
HB_FUNCVWN_SETFOREGROUNDWINDOW(void)
HB_FUNC( VWN_SETFOREGROUNDWINDOW )
{
   hb_retl( SetForegroundWindow( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c400
HB_FUNCVWN_ANYPOPUP(void)
HB_FUNC( VWN_ANYPOPUP )
{
   hb_retl( AnyPopup(  ) );
}
whtwnd.c410
HB_FUNCVWN_BRINGWINDOWTOTOP(void)
HB_FUNC( VWN_BRINGWINDOWTOTOP )
{
   hb_retl( BringWindowToTop( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c419
HB_FUNCVWN_GETCLASSNAME(void)
HB_FUNC( VWN_GETCLASSNAME )
{
   char *cText= (char*) hb_xgrab( MAX_PATH+1 );

   GetClassName( (HWND) HB_PARWH( 1 ),
                 (LPSTR) cText ,
                 MAX_PATH
                );

   hb_retc( cText);
   hb_xfree( cText );
}
whtwnd.c429
HB_FUNCVWN_GETTOPWINDOW(void)
HB_FUNC( VWN_GETTOPWINDOW )
{
   HB_RETWH( GetTopWindow( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c448
HB_FUNCVWN_SCROLLWINDOW(void)
HB_FUNC( VWN_SCROLLWINDOW )
{
   RECT lpRect     ;
   RECT lpClipRect ;
   Array2Rect( hb_param( 4 , HB_IT_ARRAY ) , &lpRect );
   Array2Rect( hb_param( 5 , HB_IT_ARRAY ) , &lpClipRect );

   hb_retl( ScrollWindow( (HWND) HB_PARWH( 1 ),
                          hb_parni( 2 )       ,
                          hb_parni( 3 )       ,
                          &lpRect             ,
                          &lpClipRect
                        ) );
}
whtwnd.c458
HB_FUNCVWN_SETWINDOWTEXT(void)
HB_FUNC( VWN_SETWINDOWTEXT )
{
   hb_retl( SetWindowText( (HWND) HB_PARWH( 1 ), (LPSTR) hb_parcx( 2 ) ) );
}
whtwnd.c478
HB_FUNCVWN_GETWINDOWTEXT(void)
HB_FUNC( VWN_GETWINDOWTEXT )
{
   int iLen = GetWindowTextLength( (HWND) HB_PARWH( 1 ) )  ;
   char *cText = (char*) hb_xgrab( iLen+1 );
   int iRet = GetWindowText( (HWND) HB_PARWH( 1 ) ,
                            (LPSTR) cText       ,
                             iLen+1
                           );

   hb_retclen( cText, iRet );
   hb_xfree( cText );
}
whtwnd.c488
HB_FUNCVWN_GETWINDOWTEXTLENGTH(void)
HB_FUNC( VWN_GETWINDOWTEXTLENGTH )
{
   hb_retni( GetWindowTextLength( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c505
HB_FUNCVWN_SETWINDOWCONTEXTHELPID(void)
HB_FUNC( VWN_SETWINDOWCONTEXTHELPID )
{
   hb_retl( SetWindowContextHelpId( (HWND) HB_PARWH( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtwnd.c515
HB_FUNCVWN_GETWINDOWCONTEXTHELPID(void)
HB_FUNC( VWN_GETWINDOWCONTEXTHELPID )
{
   hb_retnl( (LONG) GetWindowContextHelpId( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c524
HB_FUNCVWN_SETMENUCONTEXTHELPID(void)
HB_FUNC( VWN_SETMENUCONTEXTHELPID )
{
   hb_retl( SetMenuContextHelpId( (HMENU) HB_PARWH( 1 ), (DWORD) hb_parnl( 2 ) ) );
}
whtwnd.c533
HB_FUNCVWN_GETMENUCONTEXTHELPID(void)
HB_FUNC( VWN_GETMENUCONTEXTHELPID )
{
   hb_retnl( (LONG) GetMenuContextHelpId( (HMENU) HB_PARWH( 1 ) ) );
}
whtwnd.c542
HB_FUNCVWN_GETWINDOW(void)
HB_FUNC( VWN_GETWINDOW )
{
   HB_RETWH( GetWindow( (HWND)HB_PARWH(1), (UINT) hb_parni( 2 ) ) );
}
whtwnd.c551
HB_FUNCVWN_CLIENTTOSCREEN(void)
HB_FUNC( VWN_CLIENTTOSCREEN )
{
   POINT Point ;
   PHB_ITEM pArray;
   pArray=  hb_param( 2 , HB_IT_ARRAY );
   if (Array2Point( pArray ,&Point  ) )
   {
      if (ClientToScreen( (HWND) HB_PARWH( 1 ), &Point ))
      {
          Point2ArrayEx( &Point   , pArray );
          hb_retl( TRUE );
      }
      else
         hb_retl( FALSE );
   }
      else
         hb_retl( FALSE );

}
whtwnd.c566
HB_FUNCVWN_SCREENTOCLIENT(void)
HB_FUNC( VWN_SCREENTOCLIENT )
{
   POINT Point ;
   PHB_ITEM pArray = hb_param( 2 , HB_IT_ARRAY );

   if (Array2Point(pArray, &Point ) )
   {
      if( ScreenToClient( (HWND) HB_PARWH( 1 ), &Point ) >0)
      {
          Point2ArrayEx( &Point   , pArray );
          hb_retl( TRUE );
      }
      else
         hb_retl( FALSE );
   }
      else
         hb_retl( FALSE );


}
whtwnd.c596
HB_FUNCVWN_MAPWINDOWPOINTS(void)
HB_FUNC( VWN_MAPWINDOWPOINTS )
{
   POINT lpPoints ;
   PHB_ITEM pArray =hb_param( 3 , HB_IT_ARRAY );
   Array2Point( pArray ,&lpPoints );

   hb_retni( MapWindowPoints( (HWND) HB_PARWH( 1 ),
                              (HWND) HB_PARWH( 2 ),
                               &lpPoints            ,
                              (UINT) hb_parni( 4 )
                            ) );
          Point2ArrayEx( &lpPoints   , pArray );

}
whtwnd.c623
HB_FUNCVWN_WINDOWFROMPOINT(void)
HB_FUNC( VWN_WINDOWFROMPOINT )
{
   POINT Point ;
   Array2Point( hb_param( 1 , HB_IT_ARRAY ), &Point );

   HB_RETWH( WindowFromPoint( Point ) );
}
whtwnd.c645
HB_FUNCVWN_CHILDWINDOWFROMPOINT(void)
HB_FUNC( VWN_CHILDWINDOWFROMPOINT )
{
   POINT Point      ;

   Array2Point( hb_param( 2 , HB_IT_ARRAY ) ,&Point);

   HB_RETWH( ChildWindowFromPoint( (HWND) HB_PARWH( 1 ), Point ) );
}
whtwnd.c660
HB_FUNCVWN_CHILDWINDOWFROMPOINTEX(void)
HB_FUNC( VWN_CHILDWINDOWFROMPOINTEX )
{
   POINT PoInt ;

   Array2Point( hb_param( 2 , HB_IT_ARRAY ) ,&PoInt);

   HB_RETWH( ChildWindowFromPointEx( (HWND) HB_PARWH( 1 ),
                                            PoInt               ,
                                            (UINT) hb_parni( 3 )
                                          ) );
}
whtwnd.c675
HB_FUNCVWN_GETWINDOWWORD(void)
HB_FUNC( VWN_GETWINDOWWORD )
{
   hb_retni( GetWindowWord( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c692
HB_FUNCVWN_SETWINDOWWORD(void)
HB_FUNC( VWN_SETWINDOWWORD )
{

   hb_retni( SetWindowWord( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), (WORD) hb_parni(3) ) );
}
whtwnd.c700
HB_FUNCVWN_GETDESKTOPWINDOW(void)
HB_FUNC( VWN_GETDESKTOPWINDOW )
{
   HB_RETWH( GetDesktopWindow(  ) );
}
whtwnd.c710
HB_FUNCVWN_GETPARENT(void)
HB_FUNC( VWN_GETPARENT )
{
   HB_RETWH( GetParent( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c718
HB_FUNCVWN_SETPARENT(void)
HB_FUNC( VWN_SETPARENT )
{
   HB_RETWH( SetParent( (HWND) HB_PARWH( 1 ), (HWND) HB_PARWH( 2 ) ) );
}
whtwnd.c726
HB_FUNCVWN_GETCLASSWORD(void)
HB_FUNC( VWN_GETCLASSWORD )
{
   hb_retni( GetClassWord( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c736
HB_FUNCVWN_SETCLASSWORD(void)
HB_FUNC( VWN_SETCLASSWORD )
{

   hb_retni( SetClassWord( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), (WORD) hb_parni( 3 ) ) );
}
whtwnd.c744
HB_FUNCVWN_GETCLASSLONG(void)
HB_FUNC( VWN_GETCLASSLONG )
{
   hb_retnl( (LONG) GetClassLong( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c754
HB_FUNCVWN_SETCLASSLONG(void)
HB_FUNC( VWN_SETCLASSLONG )
{
   hb_retnl( (LONG) SetClassLong( (HWND) HB_PARWH( 1 ),
                                  hb_parni( 2 )       ,
                                  hb_parnl( 3 )
                                ) );
}
whtwnd.c762
HB_FUNCVWN_GETANCESTOR(void)
HB_FUNC( VWN_GETANCESTOR )
{
   HB_RETWH( GetAncestor( (HWND) HB_PARWH( 1 ), (UINT) hb_parni( 2 ) ) );
}
whtwnd.c774
HB_FUNCVWN_SHOWWINDOWASYNC(void)
HB_FUNC( VWN_SHOWWINDOWASYNC )
{
   hb_retl( ShowWindowAsync( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c785
HB_FUNCVWN_FLASHWINDOW(void)
HB_FUNC( VWN_FLASHWINDOW )
{
   hb_retl( FlashWindow( (HWND) HB_PARWH( 1 ), hb_parl( 2 ) ) );
}
whtwnd.c808
HB_FUNCVWN_ANIMATEWINDOW(void)
HB_FUNC( VWN_ANIMATEWINDOW )
{
   hb_retl( AnimateWindow( (HWND) HB_PARWH( 1 ) ,
                           (DWORD) hb_parnl( 2 ),
                           (DWORD) hb_parnl( 3 )
                         ) );
}
whtwnd.c817
HB_FUNCVWN_GETWINDOWPLACEMENT(void)
HB_FUNC( VWN_GETWINDOWPLACEMENT )
{
   WINDOWPLACEMENT wndpl ;
   wndpl.length=sizeof(WINDOWPLACEMENT);
   if ( GetWindowPlacement( (HWND) HB_PARWH( 1 ), &wndpl ) )
      hb_retclen( ( char *) &wndpl, sizeof(WINDOWPLACEMENT) );

}
whtwnd.c828
HB_FUNCVWN_SETWINDOWPLACEMENT(void)
HB_FUNC( VWN_SETWINDOWPLACEMENT )
{
   WINDOWPLACEMENT * lpwndpl = (WINDOWPLACEMENT *) hb_parc( 2 ); //hb_param( 2,HB_IT_STRING )->item.asString.value;


   hb_retl( SetWindowPlacement( (HWND) HB_PARWH( 1 ), lpwndpl ) );
}
whtwnd.c842
HB_FUNCVWN_SETWINDOWRGN(void)
HB_FUNC( VWN_SETWINDOWRGN )
{
   hb_retni( SetWindowRgn( (HWND) HB_PARWH( 1 ),
                           (HRGN) HB_PARWH( 2 ),
                           hb_parl( 3 )
                         ) );
}
whtwnd.c854
HB_FUNCVWN_GETWINDOWRGN(void)
HB_FUNC( VWN_GETWINDOWRGN )
{
   hb_retni( GetWindowRgn( (HWND) HB_PARWH( 1 ), (HRGN) HB_PARWH( 2 ) ) );
}
whtwnd.c865
HB_FUNCVWN_SETPROP(void)
HB_FUNC( VWN_SETPROP )
{
   hb_retl( SetProp( (HWND) HB_PARWH( 1 )  ,
                     (LPCSTR) hb_parcx( 2 ) ,
                     (HANDLE) HB_PARWH( 3 )
                   ) );
}
whtwnd.c875
HB_FUNCVWN_GETPROP(void)
HB_FUNC( VWN_GETPROP )
{
   HB_RETWH( GetProp( (HWND) HB_PARWH( 1 ), (LPCSTR) hb_parcx( 2 ) ) );
}
whtwnd.c886
HB_FUNCVWN_REMOVEPROP(void)
HB_FUNC( VWN_REMOVEPROP )
{
   HB_RETWH( RemoveProp( (HWND) HB_PARWH( 1 ), (LPCSTR) hb_parcx( 2 ) ) );
}

//-----------------------------------------------------------------------------
// WINUSERAPI int WINAPI EnumPropsExA( IN HWND hWnd, IN PROPENUMPROCEXA lpEnumFunc, IN LPARAM lParam);


//T.B.D.

/*

HB_FUNC( VWN_ENUMPROPSEX )
{
   PROPENUMPROCEXA lpEnumFunc ;

   // Your code goes here

   hb_retni( EnumPropsEx( (HWND) HB_PARWH( 1 )  ,
                          lpEnumFunc            ,
                          (LPARAM) hb_parnint( 3 )
                        ) );
}

*/


//-----------------------------------------------------------------------------
// WINUSERAPI int WINAPI EnumPropsA( IN HWND hWnd, IN PROPENUMPROCA lpEnumFunc);

whtwnd.c894
HB_FUNCVWN_ADJUSTWINDOWRECT(void)
HB_FUNC( VWN_ADJUSTWINDOWRECT )
{
   RECT lpRect  ;

   PHB_ITEM pArray=hb_param(1,HB_IT_ARRAY);
   //PHB_ITEM pItem =hb_stackItemFromBase( 1 );

   if(Array2Rect(pArray,&lpRect))
   {
      if( AdjustWindowRect( &lpRect, (DWORD) hb_parnl( 2 ), hb_parl( 3 ) ) >0)
      {
         Rect2ArrayEx(&lpRect,pArray);
         hb_retl(TRUE);
      }
      else
         hb_retl(FALSE);
   }
      else
         hb_retl(FALSE);

}
whtwnd.c949
HB_FUNCVWN_ADJUSTWINDOWRECTEX(void)
HB_FUNC( VWN_ADJUSTWINDOWRECTEX )
{
   RECT lpRect    ;
   BOOL bAjust;
   PHB_ITEM pArray=hb_param(1,HB_IT_ARRAY);
   //PHB_ITEM pItem =hb_stackItemFromBase( 1 );

   Array2Rect(pArray,&lpRect);

   bAjust = AdjustWindowRectEx( &lpRect               ,
                                (DWORD) hb_parnl( 2 ),
                                hb_parl( 3 )         ,
                                (DWORD) hb_parnl( 4 )
                              )  ;
   if (bAjust)
            Rect2ArrayEx(&lpRect,pArray );

   hb_retl(bAjust);

}
whtwnd.c982
HB_FUNCVWN_GETWINDOWLONGPTR(void)
HB_FUNC( VWN_GETWINDOWLONGPTR )
{
   hb_retptr( ( void * ) GetWindowLongPtr( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c1008
HB_FUNCVWN_SETWINDOWLONGPTR(void)
HB_FUNC( VWN_SETWINDOWLONGPTR )
{
   hb_retnl( (LONG) SetWindowLongPtr( (HWND) HB_PARWH( 1 ),
                                      hb_parni( 2 )       ,
                                      (LONG_PTR) HB_PARWH( 3 )
                                    ) );
}
whtwnd.c1016
HB_FUNCVWN_GETCLASSLONGPTR(void)
HB_FUNC( VWN_GETCLASSLONGPTR )
{
    HB_RETWI( GetClassLongPtr( (HWND) HB_PARWH( 1 ), hb_parni( 2 ) ) );
}
whtwnd.c1027
HB_FUNCVWN_SETCLASSLONGPTR(void)
HB_FUNC( VWN_SETCLASSLONGPTR )
{
   HB_RETWI( SetClassLongPtr( (HWND) HB_PARWH( 1 ), hb_parni( 2 ), (LONG_PTR) hb_parnl(3) ) );
}
whtwnd.c1035
HB_FUNCVWN_GETWINDOWINFO(void)
HB_FUNC( VWN_GETWINDOWINFO )
{
   WINDOWINFO pwi ;

   if ( GetWindowInfo( (HWND) HB_PARWH( 1 ), &pwi ) )

      hb_retclen( (char *) &pwi, sizeof( WINDOWINFO) );

}
whtwnd.c1046
HB_FUNCVWN_GETTITLEBARINFO(void)
HB_FUNC( VWN_GETTITLEBARINFO )
{
   TITLEBARINFO pti  ;

     if ( GetTitleBarInfo( (HWND) HB_PARWH( 1 ), &pti ) )

         hb_retclen( (char *) &pti, sizeof(TITLEBARINFO) );
}

#endif

//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI EnumChildWindows( IN HWND hWndParent, IN WNDENUMPROC lpEnumFunc, IN LPARAM lParam);

//T.B.D

/*

HB_FUNC( VWN_ENUMCHILDWINDOWS )
{
   WNDENUMPROC lpEnumFunc ;

   // Your code goes here

   hb_retl( EnumChildWindows( (HWND) HB_PARWH( 1 )  ,
                              lpEnumFunc            ,
                              (LPARAM) hb_parnint( 3 )
                            ) );
}

*/

//-----------------------------------------------------------------------------
// WINUSERAPI BOOL WINAPI EnumWindows( IN WNDENUMPROC lpEnumFunc, IN LPARAM lParam);

whtwnd.c1063
HB_FUNCVWN_REALCHILDWINDOWFROMPOINT(void)
HB_FUNC( VWN_REALCHILDWINDOWFROMPOINT )
{
   POINT ptParentClientCoords ;
   Array2Point( hb_param( 2 , HB_IT_ARRAY) , &ptParentClientCoords );

   HB_RETWH( RealChildWindowFromPoint( (HWND) HB_PARWH( 1 ),
                                              ptParentClientCoords
                                            ) );

}
whtwnd.c1132
HB_FUNCVWN_SETWINDOWEXTEX(void)
HB_FUNC( VWN_SETWINDOWEXTEX )
{
   SIZE lpSize ;
   PHB_ITEM pArray;

   if( SetWindowExtEx( (HDC) HB_PARWH( 1 ),
                             hb_parni( 2 ),
                             hb_parni( 3 ),
                             &lpSize
                             ) > 0 )
     {

     pArray = Size2Array(&lpSize);
     hb_itemReturn( pArray );
     hb_itemRelease( pArray );

     }
}
whtwnd.c1152
HB_FUNCVWN_SETWINDOWORGEX(void)
HB_FUNC( VWN_SETWINDOWORGEX )
{
   POINT lpPoint ;
   PHB_ITEM pArray;

   if( SetWindowOrgEx( (HDC) HB_PARWH( 1 ),
                             hb_parni( 2 ),
                             hb_parni( 3 ),
                             &lpPoint
                             ) > 0 )

   {
     pArray = Point2Array(&lpPoint);
     hb_itemReturn( pArray );
     hb_itemRelease( pArray );
   }
}
whtwnd.c1179
HB_FUNCVWN_CREATEMDICLIENT(void)
HB_FUNC( VWN_CREATEMDICLIENT )
{
  HWND hwndClient;
  HWND hFrame = (HWND) HB_PARWH(1);
  CLIENTCREATESTRUCT clientCreate ;
  clientCreate.hWindowMenu  = (HMENU)HB_PARWH(2);
  clientCreate.idFirstChild = (INT)hb_parni(3);
  hwndClient = CreateWindowEx(WS_EX_CLIENTEDGE,"MDICLIENT", NULL,WS_CHILD|WS_CLIPSIBLINGS|WS_VISIBLE,hb_parni(4), hb_parni(5), hb_parni(6), hb_parni(7), (HWND)hFrame,0,GetModuleHandle(NULL),&clientCreate);
  HB_RETWH( hwndClient );
}
whtwnd.c1211
HB_FUNCVWN_SETMINMAXINFO(void)
HB_FUNC( VWN_SETMINMAXINFO )
{
  MINMAXINFO *mmi = (MINMAXINFO *) HB_PARWH(1);
  POINT pt  ;

  pt.x = hb_parni( 3, 1 );
  pt.y = hb_parni( 3, 2 );

  switch (hb_parni(2)) {
    case 2:
      mmi->ptMaxSize = pt ;
      break;

    case 3:
      mmi->ptMaxPosition = pt ;
      break;

    case 4:
      mmi->ptMinTrackSize = pt ;
      break;

    case 5:
      mmi->ptMaxTrackSize = pt ;
      break;

  }

}


//-----------------------------------------------------------------------------
whtwnd.c1226
HB_FUNCVWN_ALLOWSETFOREGROUNDWINDOW(void)
HB_FUNC( VWN_ALLOWSETFOREGROUNDWINDOW )
{

   HINSTANCE h = LoadLibraryEx( "user32.dll", NULL, 0 );
   BOOL bASFWRet = (BOOL) FALSE ;
   DWORD dwProcessId = ISNIL( 1 ) ? ASFW_ANY : (DWORD) hb_parnl( 1 );

   if( h )
   {
      typedef BOOL (WINAPI *xbAllowSetForegroundWindow)( DWORD dwProcessId );
      xbAllowSetForegroundWindow pfnASFW = (xbAllowSetForegroundWindow)
      GetProcAddress( h, "AllowSetForegroundWindow");

      if( pfnASFW )
      {
         bASFWRet = (BOOL) pfnASFW( dwProcessId );
      }

      FreeLibrary( h );
   }

   hb_retl( bASFWRet );
}

//-----------------------------------------------------------------------------
/*
BOOL LockSetForegroundWindow( UINT uLockCode
);
*/
/*
#if (WINVER >= 0X0500)

HB_FUNC( VWN_LOCKSETFOREGROUNDWINDOW )
{
   hb_retl( LockSetForegroundWindow( (UINT) hb_parnl( 1 ) ) );
}
whtwnd.c1285
HB_FUNCVWN_LOCKWINDOWUPDATE(void)
*/
HB_FUNC( VWN_LOCKWINDOWUPDATE )
{
   hb_retl( LockWindowUpdate( (HWND) HB_PARWH( 1 ) ) );
}
whtwnd.c1322
wincorec.c
TypeFunctionSourceLine
STATIC LPWORDlpwAlign( LPWORD lpIn )
static LPWORD lpwAlign( LPWORD lpIn )
{
   HB_PTRDIFF ul = ( HB_PTRDIFF ) lpIn;
   ul += 3;
   ul >>=2;
   ul <<=2;
   return ( LPWORD ) ul;
}
wincorec.c43
STATIC INTnCopyAnsiToWideChar (LPWORD lpWCStr, LPSTR lpAnsiIn)
static int nCopyAnsiToWideChar (LPWORD lpWCStr, LPSTR lpAnsiIn)
{
  int nChar = 0;

  do {
      *lpWCStr++ = (WORD) *lpAnsiIn;
      nChar++;
     } while (*lpAnsiIn++);

  return nChar;
}
wincorec.c56
HB_FUNCWHT__REGISTERCLASS(void)
HB_FUNC( WHT__REGISTERCLASS )
{
   WNDCLASS *wndclass = ( WNDCLASS *) hb_parc( 1 ); //hb_param( 1, HB_IT_STRING )->item.asString.value ;
   wndclass->lpfnWndProc   = __WndProc ;

   /*
   wndclass.style         = (ISNIL(1) ? (CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_DBLCLKS)  : hb_parni(1) );
   wndclass.lpfnWndProc   = __WndProc ;
   wndclass.cbClsExtra    = ( ISNIL(2)  ? 0 : hb_parni(2));
   wndclass.cbWndExtra    = ( ISNIL(3)  ? 0 : hb_parni(3));
   wndclass.hInstance     = ( ISNIL(4)  ? GetModuleHandle(NULL) : (HANDLE) HB_PARWH(4) );
   wndclass.hIcon         = ( ISNIL(5)  ? LoadIcon(GetModuleHandle(NULL),"") : (HICON) HB_PARWH(5) );
   wndclass.hCursor       = ( ISNIL(6)  ? LoadCursor (NULL, IDC_ARROW) : (HCURSOR) HB_PARWH(6) );
   wndclass.hbrBackground = ( ISNIL(7)  ? (INT) COLOR_WINDOW  + 1 :  (HBRUSH) HB_PARWH(7) );
   wndclass.lpszMenuName  = (LPCSTR) ( !ISNIL(8) ? hb_parc(8) : NULL );
   wndclass.lpszClassName = (LPCSTR) hb_parc(9);
   */

   hb_retl( RegisterClass (wndclass));
}
wincorec.c91
HB_FUNCWHT__UNREGISTERCLASS(void)
HB_FUNC( WHT__UNREGISTERCLASS )
{
   HANDLE hInst = ( ISNIL(2) ? GetModuleHandle(NULL) : (HANDLE) HB_PARWH(2) );

   hb_retl( UnregisterClass( hb_parc(1), (HINSTANCE) hInst ) );
}
wincorec.c111
HB_FUNCWHT__CREATEWINDOWEX(void)
HB_FUNC( WHT__CREATEWINDOWEX )
{
   DWORD  dwExStyle  = (ISNIL(1)  ? 0 : hb_parnl(1));
   LPCSTR cClass     = (LPCSTR) hb_parc(2);
   LPCSTR cTitle     = (LPCSTR) hb_parc(3);
   DWORD  nStyle     = (ISNIL(4)  ? 0 : (DWORD) hb_parnd(4) );
   int    x          = (ISNIL(5)  ? ( int ) CW_USEDEFAULT : hb_parni(5));
   int    y          = (ISNIL(6)  ? ( int ) CW_USEDEFAULT : hb_parni(6));
   int    nWidth     = (ISNIL(7)  ? ( int ) CW_USEDEFAULT : hb_parni(7));
   int    nHeight    = (ISNIL(8)  ? ( int ) CW_USEDEFAULT : hb_parni(8));
   HWND   hWndParent = (ISNIL(9)  ? (HWND) NULL : (HWND) HB_PARWH(9));
   HMENU  hMenu      = (ISNIL(10) ? (HMENU) NULL : (HMENU) HB_PARWH(10));
   HANDLE hInstance  = (ISNIL(11) ? GetModuleHandle( NULL ) : (HANDLE) HB_PARWH(11));
   LPVOID lParam     = (ISNIL(12) ? NULL : (LPVOID) HB_PARWH(12));

   HWND hWnd = CreateWindowEx( dwExStyle, cClass, cTitle,
                               nStyle, x, y, nWidth, nHeight,
                               hWndParent, hMenu, (HINSTANCE) hInstance, lParam )  ;

   HB_RETWH( hWnd );
}
wincorec.c118
HB_FUNCWHT__CREATEMDIWINDOW(void)
HB_FUNC( WHT__CREATEMDIWINDOW )
{
   LPCSTR cClass     = (LPCSTR) hb_parc(1);
   LPCSTR cTitle     = (LPCSTR) hb_parc(2);
   DWORD  nStyle     = (ISNIL(3)  ? WS_MAXIMIZE : (DWORD) hb_parnd(3) );
   int    x          = (ISNIL(4)  ? ( int ) CW_USEDEFAULT : hb_parni(4));
   int    y          = (ISNIL(5)  ? ( int ) CW_USEDEFAULT : hb_parni(5));
   int    nWidth     = (ISNIL(6)  ? ( int ) CW_USEDEFAULT : hb_parni(6));
   int    nHeight    = (ISNIL(7)  ? ( int ) CW_USEDEFAULT : hb_parni(7));
   HWND   hWndParent = (ISNIL(8)  ? (HWND) NULL : (HWND) HB_PARWH(8));
   HANDLE hInstance  = (ISNIL(9)  ? GetModuleHandle( NULL ) : (HANDLE) HB_PARWH(9));
   LPARAM lParam     = (ISNIL(10) ? 0 : (LPARAM) hb_parnint(10));

#if defined(__DMC__)
   HWND hWnd = CreateMDIWindow( ( LPSTR ) cClass, ( LPSTR ) cTitle, nStyle,
                                x, y, nWidth, nHeight,
                                hWndParent, (HINSTANCE) hInstance, lParam );
#else
   HWND hWnd = CreateMDIWindow( cClass, cTitle,nStyle,
                                x, y, nWidth, nHeight,
                                hWndParent, (HINSTANCE) hInstance, lParam );
#endif

   HB_RETWH( hWnd );
}
wincorec.c143
LRESULT CALLBACK__WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 1 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c171
LRESULT CALLBACK__WndProc2( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc2( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 2 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c197
LRESULT CALLBACK__WndProc3( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc3( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 3 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c223
LRESULT CALLBACK__WndProc4( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc4( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 4 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c249
LRESULT CALLBACK__WndProc5( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc5( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 5 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c275
LRESULT CALLBACK__WndProc6( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK __WndProc6( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 6 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c301
LRESULT CALLBACK__WndProc7( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc7( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 7 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c327
LRESULT CALLBACK__WndProc8( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc8( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 8 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c353
LRESULT CALLBACK__WndProc9( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc9( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 9 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c379
LRESULT CALLBACK__WndProc10( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK __WndProc10( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static PHB_DYNS pSymTest = 0 ;
   long int res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushNumInt( ( HB_PTRDIFF ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushNumInt( ( HB_LONG ) wParam );
      hb_vmPushNumInt( ( HB_LONG ) lParam );
      hb_vmPushLong( 10 );
      hb_vmDo( 5 );
      res = hb_itemGetNL( hb_param( -1, HB_IT_ANY ) );

      return res;
   }
   else // shouldn't happen
      return( DefWindowProc( hWnd, message, wParam, lParam ));
}
wincorec.c405
HB_FUNCWHT_GETWNDPROC(void)
HB_FUNC( WHT_GETWNDPROC )
{
   switch ( hb_parni(1) )
   {
      case 10:
        HB_RETWI( __WndProc10 );
        return ;

      case 9:
        HB_RETWI( __WndProc9 );
        return ;

      case 8:
        HB_RETWI( __WndProc8 );
        return ;

      case 7:
        HB_RETWI( __WndProc7 );
        return ;

      case 6:
        HB_RETWI( __WndProc6 );
        return ;

      case 5:
        HB_RETWI( __WndProc5 );
        return ;

      case 4:
        HB_RETWI( __WndProc4 );
        return ;

      case 3:
        HB_RETWI( __WndProc3 );
        return ;

      case 2:
        HB_RETWI( __WndProc2 );
        return ;

      case 1:
        HB_RETWI( __WndProc );
        return ;

      default:
        HB_RETWI( NULL );
        return ;

   }
}
wincorec.c431
HB_FUNCWHT__GETDLGPROC(void)
HB_FUNC( WHT__GETDLGPROC )
{
   HB_RETWI( __DlgProc );
}
wincorec.c484
BOOL CALLBACK__DlgProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
BOOL CALLBACK __DlgProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
   static PHB_DYNS pSymTest = 0 ;
   BOOL res;

   if ( !pSymTest )
     pSymTest = hb_dynsymFind( "WHT__PROCESSDLGMSG" );

   if ( pSymTest )
   {
      hb_vmPushDynSym( pSymTest );
      hb_vmPushNil();
      hb_vmPushLong( (LONG ) hWnd );
      hb_vmPushLong( (LONG ) message );
      hb_vmPushLong( (LONG ) wParam );
      hb_vmPushLong( (LONG ) lParam );
      hb_vmDo( 4 );
      res = hb_itemGetNL( hb_stackReturnItem() );

      return res;
   }
   else // shouldn't happen
      return FALSE ;
}
wincorec.c489
HB_FUNCWHT__DIALOGBOX(void)
HB_FUNC( WHT__DIALOGBOX )
{
  HB_RETWI( DialogBox( (ISNIL(1)  ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH(1) )  ,
                       (hb_parinfo(2)==HB_IT_STRING ? hb_parc(2) : MAKEINTRESOURCE( (WORD) hb_parni(2))) ,
                       (ISNIL(3) ?  NULL : (HWND) HB_PARWH(3) )        ,
                       (DLGPROC) HB_PARWH(4)
                     ));
}
wincorec.c514
HB_FUNCWHT__DIALOGBOXINDIRECT(void)
HB_FUNC( WHT__DIALOGBOXINDIRECT )
{
   HB_RETWI( DialogBoxIndirect( (ISNIL(1)  ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH(1) ),
                               (LPDLGTEMPLATE) hb_parc(2),
                               (ISNIL(3) ?  NULL : (HWND) HB_PARWH(3) ),
                               (DLGPROC) HB_PARWH(4)
                             ));
}
wincorec.c524
HB_FUNCWHT__CREATEDIALOG(void)
HB_FUNC( WHT__CREATEDIALOG )
{
  HB_RETWH( CreateDialog( (ISNIL(1)  ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH(1) ),
                                  (hb_parinfo(2)==HB_IT_STRING ? hb_parc(2) : MAKEINTRESOURCE( (WORD) hb_parni(2))),
                                  (ISNIL(3) ?  NULL : (HWND) HB_PARWH(3) ),
                                  (DLGPROC) HB_PARWH(4)
                                ) );
}
wincorec.c533
HB_FUNCWHT__CREATEDIALOGINDIRECT(void)
HB_FUNC( WHT__CREATEDIALOGINDIRECT )
{
  HB_RETWH( CreateDialogIndirect(
            (ISNIL(1)  ? GetModuleHandle(NULL) : (HINSTANCE) HB_PARWH(1) ),
            (LPDLGTEMPLATE) hb_parc(2),
            (ISNIL(3) ?  NULL : (HWND) HB_PARWH(3) ),
            (DLGPROC) HB_PARWH(4)
          ));
}
//----------------------------------------------------------------------//
//
// Create dynamic dialog from the Harbour array
//
HB_FUNC( WHT__MAKEDLGTEMPLATE )
wincorec.c542
HB_FUNCWHT__MAKEDLGTEMPLATE(void)
{
   WORD *p, *pdlgtemplate;
   WORD  nItems = ( WORD ) hb_parni( 1, 4 );
   int   i, nchar;
   DWORD lStyle;

   // Parameters: 12 arrays
   // 1 for DLG template
   // 11 for item properties

   pdlgtemplate = p = (PWORD) LocalAlloc(LPTR, 65534)  ; // 64k allow to build up to 255 items on the dialog

   //---------------

    lStyle = hb_parnl(1,3);

    // start to fill in the dlgtemplate information.  addressing by WORDs

    *p++ = 1                   ; // version
    *p++ = 0xFFFF                   ; // signature
    *p++ = LOWORD ( hb_parnl(1,1) ); // Help Id
    *p++ = HIWORD ( hb_parnl(1,1) );

    *p++ = LOWORD ( hb_parnl(1,2) ); // ext. style
    *p++ = HIWORD ( hb_parnl(1,2) );

    *p++ = LOWORD (lStyle);
    *p++ = HIWORD (lStyle);

    *p++ = (WORD)   nItems;  // NumberOfItems
    *p++ = (short)  hb_parni(1,5);  // x
    *p++ = (short)  hb_parni(1,6);  // y
    *p++ = (short)  hb_parni(1,7);  // cx
    *p++ = (short)  hb_parni(1,8);  // cy
    *p++ = (short)  0;  // Menu (ignored for now.)
    *p++ = (short)  0x00;  // Class also ignored

    if ( hb_parinfa(1,11) == HB_IT_STRING )
    {
        nchar = nCopyAnsiToWideChar( p, ( LPSTR ) hb_parc(1,11) );
        p += nchar;
    }
    else
      *p++ =0 ;

    // add in the wPointSize and szFontName here iff the DS_SETFONT bit on

    if ( (lStyle & DS_SETFONT ) ) {
      *p++ = (short) hb_parni(1,12);
      *p++ = (short) hb_parni(1,13);
      *p++ = (short) hb_parni(1,14);

      nchar = nCopyAnsiToWideChar( p, ( LPSTR ) hb_parc(1,15) );
      p += nchar ;

    } ;

    //---------------
    // Now, for the items

   for ( i = 1 ; i <= nItems ; i++ ) {

      // make sure each item starts on a DWORD boundary
      p = lpwAlign (p);


      *p++ = LOWORD ( hb_parnl(2,i) );    // help id
      *p++ = HIWORD ( hb_parnl(2,i) );

      *p++ = LOWORD ( hb_parnl(3,i) ); // ext. style
      *p++ = HIWORD ( hb_parnl(3,i) );

      *p++ = LOWORD ( hb_parnl(4,i) ); // style
      *p++ = HIWORD ( hb_parnl(4,i) );

      *p++ = (short)  hb_parni(5,i);  // x
      *p++ = (short)  hb_parni(6,i);  // y
      *p++ = (short)  hb_parni(7,i);  // cx
      *p++ = (short)  hb_parni(8,i);  // cy

      *p++ = LOWORD( hb_parnl(9,i) );  // id
      *p++ = HIWORD( hb_parnl(9,i) );  // id   // 0;

      if( hb_parinfa(10,i) == HB_IT_STRING )
      {
          nchar = nCopyAnsiToWideChar(p, ( LPSTR ) hb_parc(10,i) ); // class
          p += nchar;
      }
      else
      {
         *p++ = 0xFFFF;
         *p++ = (WORD) hb_parni(10,i);
      }

      if ( hb_parinfa(11,i) == HB_IT_STRING )
      {
         nchar = nCopyAnsiToWideChar(p, ( LPSTR ) hb_parc(11,i) );  // text
         p += nchar;
      }
      else
      {
         *p++ = 0xFFFF ;
         *p++ = (WORD) hb_parni(11,i);
      }

      *p++ = 0x00 ;  // extras ( in array 12 )
    } ;
    p = lpwAlign (p)  ;

    hb_retclen( (LPSTR) pdlgtemplate, ( ( HB_PTRDIFF ) p - ( HB_PTRDIFF ) pdlgtemplate ) );

    LocalFree (LocalHandle (pdlgtemplate) );
}
wincorec.c558
whatutil.prg
TypeFunctionSourceLine
FUNCTIONWHT_toUnicode( cString )
function WHT_toUnicode( cString )
   local i, cTemp := ""
   for i := 1 to len(cString)
      cTemp += substr(cString, i, 1) + chr(0)
   next
   return cTemp + chr(0)

*-----------------------------------------------------------------------------*
whatutil.prg64
FUNCTIONWHT_fromUnicode( cString )
function WHT_fromUnicode( cString )
   local i, cTemp := ""
   for i := 1 to len(cString) Step 2
      cTemp += substr(cString, i, 1)
   next
   return cTemp

*-----------------------------------------------------------------------------*
whatutil.prg74
FUNCTIONWHT_Alert( cMsg, aChoices )
Function WHT_Alert( cMsg, aChoices )

   Local aDlg, i, n, aChoose, amSG
   Local hWnd, hDC
   Local lErr := .F., w , h, t := 0, cTitle, msgh, butwidth
   Local crpos := 0, txth := 0, atm := { }
   LOCAL hFont:= VWN_CreateFont( { 8, 0, 0, 0, 700, 0, 0, 0, 0, 1, 2, 1, 34, "MS Sans Serif" } )
   LOCAL hOldFont
   LOCAL xBase

   If !ISCHARACTER( cMsg )
      IF ISARRAY( cMsg )
         cMsg:=WHT_A2Str(cMsg,";")
      Else
         cMsg := WHT_AsString( cMsg )
      Endif
   EndIf

   cTitle := "Alert"

   If aChoices == NIL
      aChoices := { "&Ok" }
   EndIf

   cMsg := StrTran( cMsg, ";", CR )

   If ( crpos := at( CR, cMsg ) ) > 0
      cTitle := Left( cMsg, crpos - 1 )
      cMsg := SubStr( cMsg, crpos + 1 )
   EndIf

   hDC := VWN_GetDC( 0 )
   hOldFont := VWN_SelectObject( hDC, hFont )

* ------------- total width without buttons

   w := VWN_GetTextExtentPoint32( hDC, AllTrim( cTitle ) ) [ 1 ]

   amSG := WHT_Str2A( cMsg, CR )

   AEVAL( amSG, { | X | w := Max( w, VWN_GetTextExtentPoint32( hDC, AllTrim( X ) ) [ 1 ] ) } )
   w += 20

* --------- total width of choices, also add "&" to the choices (if needed)

   n := Len( aChoices )
   aChoose := array( n )

   txth := 8 //ATM[TM_Height]
   msgh := Len( amSG ) * txth
   For i := 1 To n
      butwidth := Max( 20, VWN_GetTextExtentPoint32( hDC, aChoices[ i ] ) [ 1 ] + 20 )
      t := Max( t, butwidth )
      aChoose[ i ] := iif( at( "&", aChoices[ i ] ) == 0, "&" + aChoices[ i ] , aChoices[ i ] )
   Next i

   VWN_SelectObject( hDC, hOldFont )
   VWN_ReleaseDC( 0, hDC )
   VWN_DeleteObject( hFont )


   butwidth := t
   t *= ( n + 1 )
   w := Max( w+40, t )
   h := msgh + 33
   //w /= 2
   xBase:=VWN_LOWORD( VWN_GetDialogBaseUnits() )
   w:=(w*4)/xBase


* ---------- get space between choices
   butwidth:=(butwidth*4)/xBase
   t := Max( Int( ( w - butwidth * n ) / ( n + 1 ) ) , 0 )

* ----------- create dialog

   hWnd := VWN_GetFocus( ) // default parent

   aDlg := WHT_MakeDlgTemplate( cTitle, ;
                           WS_CAPTION + DS_MODALFRAME + WS_VISIBLE + 4 + WS_POPUP + DS_SETFONT, ;
                           0, 0, w, h, 8, "MS Sans Serif" )

   For i := 1 To n
      aDlg := WHT_AddDlgItem( aDlg, i, "BUTTON", ;
                         BS_PUSHBUTTON + WS_TABSTOP + WS_CHILD + WS_VISIBLE, ;
                         i * ( butwidth + t ) - butwidth, h - 16, butwidth, 14, ;
                         aChoose[ i ] )
   Next i


   aDlg := WHT_AddDlgItem( aDlg, "", "STATIC", ;
                      WS_BORDER + WS_CHILD + WS_VISIBLE, ;
                      0, 0, w , msgh + 14, ;
                      "" )

   aDlg := WHT_AddDlgItem( aDlg, "", "STATIC", ;
                      SS_CENTER + WS_CHILD + WS_VISIBLE, ;
                      2, 8, w - 4, msgh, ;
                      cMsg )

   VWN_MessageBeep( MB_OK )

   i := WHT_DialogBox( ,aDlg, hWnd, { | hDlg, nMsg, nwParam, nlParam | HB_SYMBOL_UNUSED( nlParam ), AlertProc( hDlg, nMsg, nwParam, nlParam ) } )

   VWN_SetFocus( hWnd )

   Return i
whatutil.prg82
STATIC FUNCTIONAlertProc( hDlg, nMsg, nwParam, nlParam )
STATIC FUNCTION AlertProc( hDlg, nMsg, nwParam, nlParam )

   HB_SYMBOL_UNUSED( nlParam )

   Do Case
   Case nMsg == WM_INITDIALOG
      WHT_CenterWindow( hDlg )
      Return( 1 )

   Case nMsg == WM_COMMAND
      VWN_EndDialog( hDlg, nwParam )

   EndCase

   Return( 0 )
whatutil.prg191
FUNCTIONWHT_Ceiling( x )
Function WHT_Ceiling( x )

   Return( iif( x - Int( x ) > 0, Int( x ) + 1, x ) )
whatutil.prg210
FUNCTIONWHT_SetIcon( hDlg,id,hicon )
Function WHT_SetIcon( hDlg,id,hicon )

  Return( VWN_SendDlgItemMessage( hDlg,id,STM_SETICON,hicon,0 ) )
whatutil.prg218
FUNCTIONWHT_GetIcon(hDlg,id)
Function WHT_GetIcon(hDlg,id)

  Return( VWN_SendDlgItemMessage(hDlg,id,STM_GETICON,0,0))

//----------------------------------------------------------------------//
* uses current hDC and hFont
* returns array of lines, the cText was broken into
* assumes presence of spaces in the text !
whatutil.prg226
FUNCTIONWHT_WrapText(cText,nMaxSize,hFont)
Function WHT_WrapText(cText,nMaxSize,hFont)

  Local a:={Trim(cText)}
  Local i
  Local n
  Local c

  For i:=1 To Len(a)
    c:=""
    Do While WHT_UnMapDialogRect(a[i],hFont)[1] > nMaxSize
      If (n:=rat(" ",a[i])) > 0
        c:=SubStr(a[i],n+1)+" "+c
        a[i]:=Left(a[i],n-1)
      Else
        Exit
      EndIf
    EndDo
    If Len(c) > 0
      aAdd(a,Trim(c))
    EndIf
  Next

  Return(a)
whatutil.prg235
FUNCTIONWHT_UnMapDialogRect(cText,hfont)
Function WHT_UnMapDialogRect(cText,hfont)
  Local nX,nY,nW,nH
  Local hDC      := VWN_GetDC( 0 )
  Local hOldFont := VWN_SelectObject( hDC,hFont )
  Local aTextExt := VWN_GetTextExtentPoint32( hDC,;
                             "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")

  Local arect := { 0,0,100,100 }

  nW:=aTextExt[ 1 ]
  nH:=aTextExt[ 2 ]

  // Looks like this is what it should be (?)

  nW := Int( ( Int( nW / 26 ) + 1 ) / 2 )
  nX := VWN_GetTextExtentPoint32( hDC,cText )[ 1 ]
  nY := nH

  VWN_SelectObject( hDC,hOldFont )
  VWN_ReleaseDC( 0, hDC )

  Return( { WHT_Ceiling( nX*4/nW ), WHT_Ceiling( nY*8/nY ) } )

//----------------------------------------------------------------------//
*  CenterWindow() - Courtesy of Gerald Barber
*  Centers a window in it's parent window's client area
*  AJ modified to center within another  nominated window
whatutil.prg261
FUNCTIONWHT_CenterWindow( hWnd, NewX, NewY, hParent )
Function WHT_CenterWindow( hWnd, NewX, NewY, hParent )
   Local aChild_[ 4 ]
   Local iCWidth
   Local iCHeight
   Local aParent_[ 4 ]
   Local aPoint_[ 2 ]

   aChild_ := VWN_GetWindowRect( hWnd )
   iCWidth := aChild_[ 3 ] - aChild_[ 1 ]
   iCHeight := aChild_[ 4 ] - aChild_[ 2 ]

   IF hparent == NIL
      hParent := VWN_GetWindow( hWnd, GW_OWNER )

      IF hParent == 0
         hParent := VWN_GetDesktopWindow()
      ENDIF
   ENDIF

   aParent_ := VWN_GetClientRect( hParent )
   aPoint_ := { ( aParent_[ 3 ] / 2 ) , ( aParent_[ 4 ] / 2 ) }
   VWN_ClientToScreen( hParent, aPoint_ )
   aPoint_[ 1 ] -= ( iCWidth / 2 )
   aPoint_[ 2 ] -= ( iCHeight / 2 )
   VWN_ScreenToClient( hParent, aPoint_ )
   aPoint_[ 1 ] := Max( 0, aPoint_[ 1 ] )
   aPoint_[ 2 ] := Max( 0, aPoint_[ 2 ] )
   VWN_ClientToScreen( hParent, aPoint_ )

   If NewX # NIL .AND. NewY # NIL
      VWN_MoveWindow( hWnd, NewX, NewY, iCWidth, iCHeight, .F. )
   Else
      VWN_MoveWindow( hWnd, aPoint_[ 1 ] , aPoint_[ 2 ] , iCWidth, iCHeight, .F. )
   EndIf

   Return( NIL )
whatutil.prg290
FUNCTIONWHT_SetOnTop( hDlg, nmode )
Function WHT_SetOnTop( hDlg, nmode )
   Local arect := VWN_GetWindowRect( hDlg )

   Return VWN_SetWindowPos( hDlg, nmode, ;
                            arect[ 1 ] , ;
                            arect[ 2 ] , ;
                            0, ;
                            0, ;
                            SWP_NOSIZE + SWP_NOMOVE + SWP_NOACTIVATE )
whatutil.prg335
FUNCTIONWHT_asString( x )
Function WHT_asString( x )

   Local v := ValType( x )

   Do Case
   Case v == "C"
   Case v == "N"
      Return AllTrim( str( x ) )
   Case v == "L"
      If x
         Return ".T."
      Else
         Return ".F."
      EndIf
   Case v == "D"
      Return dtoc( x )
   Case v == "U"
      Return "NIL"
   Case v == "A"
      Return ""
   Case v == "O"
      Return x:classname()
   Case v == "B"
      Return ""
   Otherwise
      Return ""
   End Case

   Return( x )
whatutil.prg347
FUNCTIONWHT_str2a( string, parser )
Function WHT_str2a( string, parser )
   Local retar    := { }
   Local commapos := 0

   If parser == NIL
      parser := ","
   EndIf

   Do While Len( string ) > 0
      commapos := at( parser, string )
      If commapos > 0
         aAdd( retar, Left( string, commapos - 1 ) )
         string := SubStr( string, commapos + Len( parser ) )
      Else
         aAdd( retar, string )
         string := ""
      EndIf
   EndDo

   Return( retar )
whatutil.prg379
FUNCTIONWHT_a2str( a, parser )
FUNCTION WHT_a2str( a, parser )
  LOCAL retstr := ""
  LOCAL i

  IF parser == NIL
    parser := ","
  ENDIF

  FOR i := 1 TO Len( a )
    IF i # 1
      retstr += parser
    ENDIF
    retstr += WHT_AsString( a[ i ] )
  NEXT

  RETURN( retstr )
whatutil.prg402
STATIC FUNCTIONcTypes2aTypes(cTypes)
STATIC FUNCTION cTypes2aTypes(cTypes)
   LOCAL aTypes:={}
   LOCAL cType
   LOCAL i,j

   ctypes:=strtran(ctypes," ","")
   cTypes:=substr(cTypes,2)
   DO While !EMPTY(cTypes)
      IF LEFT(ctypes,1)=="{"
         AADD(atypes,ctypes2atypes(@ctypes))
         cTypes:=SUBSTR(ctypes,1)
      ELSE
         if (i :=AT( ",", cTypes )) > 0
            ctype:=Left( cTypes, i - 1 )
         else
            ctype:=ctypes
         endif
         IF (j:=AT("}",ctype)) > 0

            // TBD: add multiple arrays!!

             ctype:=LEFT(ctype,j-1)
             IF !EMPTY(ctype)
               AADD(atypes,ctype)
             endif
             cTypes := SubStr( cTypes, j + 1 )
             exit
         Endif
         if !EMPTY(cType)
            AADD(atypes,ctype)
         endif
         cTypes := SubStr( cTypes, i + 1 )
      Endif
   enddo
   RETURN(aTypes)
whatutil.prg421
FUNCTIONWHT_Array2Bin( aValues, aTypes )
Function WHT_Array2Bin( aValues, aTypes )
   Local cRet  := ""
   Local cTempRet
   Local i, j
   Local nLen  := Len( aValues )
   Local nDone := 0
   Local cType
   Local xValue
   Local xType
   Local nQty  := 0

   IF VALTYPE(aTypes)=="C"
     atypes := cTypes2atypes(atypes)
   endif

   For i := 1 To nLen
      cType     := ValType( xValue := aValues[ i ] )

      If nQty == 0
         xType  := aTypes[ i ]
         If valtype( xType ) == "A"
            If cType == "A"
               If ( cTempRet := WHT_Array2Bin( xValue, xType ) ) != NIL
                  cRet += cTempRet
                  nDone ++
                  Loop
               Else
                  Return( NIL )
               EndIf
            Else
               Return( NIL )
            EndIf
         EndIf

         If ( j := AT( "[", xType ) ) > 0
            nQty := VAL( SubStr( xType, j + 1, Len( xType ) - j - 1 ) )
            xType := VAL( Left( xType, j - 1 ) )
         Else
            xType := VAL( xType )
            nQty := 1
         EndIf

      EndIf

      Do Case
      Case xType == CTYPE_SHORT .OR. xType == CTYPE_UNSIGNED_SHORT
         If !( cType == "N" )
            Return NIL
         EndIf
         cRet += W2BIN( xValue )

      Case xType == CTYPE_INT .OR. xType == CTYPE_UNSIGNED_INT
         If !( cType == "N" )
            Return NIL
         EndIf
         cRet += L2BIN( xValue )

      Case xType == CTYPE_CHAR .OR. xType == CTYPE_UNSIGNED_CHAR
         If cType == "N"
            cRet += CHR( xValue )
         ElseIf cType == "C"
            cRet += Left( xValue, nQty )
            nQty := 1
         Else
            Return NIL
         EndIf

      Case xType == CTYPE_LONG
         If cType == "N"
            cRet += L2BIN( xValue )
         ElseIf cType == "L"
            cRet += L2BIN( iif( xValue, 1, 0 ) )
         Else
            Return NIL
         EndIf

      Case xType == CTYPE_UNSIGNED_LONG
         If !( cType == "N" )
            Return NIL
         EndIf
         cRet += U2BIN( xValue )

      Case xType == CTYPE_CHAR_PTR .OR. xType == CTYPE_UNSIGNED_CHAR_PTR
         If !( cType == "C" )
            Return NIL
         EndIf
         cRet += xValue

      Case xType == CTYPE_BOOL
         If cType == "L"
            cRet += U2BIN( iif( xValue, 1, 0 ) )
         ElseIf cType == "N"
            cRet += U2BIN( xValue )
         Else
            Return NIL
         EndIf

      Case xType == CTYPE_FLOAT
         If !( cType == "N" )
            Return NIL
         EndIf
         cRet += WHT_F2BIN( xValue )

      Case xType == CTYPE_DOUBLE
         If !( cType == "N" )
            Return NIL
         EndIf
         cRet += WHT_D2BIN( xValue )

      Otherwise
         Return NIL

      EndCase

      IF --nQty ==0
        nDone ++
      endif

   Next

   Return iif( nDone == nLen, cRet, NIL )
whatutil.prg460
FUNCTIONWHT_BIN2Array( cBin, aTypes )
Function WHT_BIN2Array( cBin, aTypes )
   Local aArr := {}
   Local nLen
   Local xType
   Local nDone := 0
   Local i := 0
   Local j
   Local nQty := 0

   IF VALTYPE(atypes)=="C"
      atypes:= ctypes2atypes(atypes)
   endif

   nLen := Len( aTypes )

   Do While nDone < nLen

      If nQty == 0

         If ++ i > Len( aTypes )
            Return( NIL )
         EndIf
         xType  := aTypes[ i ]
         If valtype( xType ) == "A"
            aAdd( aArr, WHT_BIN2Array( @cBin, xType ) )
            nDone ++
            Loop
         EndIf

         If ( j := AT( "[", xType ) ) > 0
            nQty := VAL( SubStr( xType, j + 1, Len( xType ) - j - 1 ) )
            xType := VAL( Left( xType, j - 1 ) )
         Else
            xType := VAL( xType )
            nQty := 1
         EndIf

      EndIf

      Do Case
      Case xType == CTYPE_INT .OR. xType == CTYPE_UNSIGNED_INT
         aAdd( aArr, Bin2L( cBin ) )
         cBin := SubStr( cBin, 5 )

      Case xType  == CTYPE_SHORT .OR. xType == CTYPE_UNSIGNED_SHORT
         aAdd( aArr, Bin2W( cBin ) )
         cBin := SubStr( cBin, 3 )

      Case xType == CTYPE_CHAR .OR. xType == CTYPE_UNSIGNED_CHAR
         aAdd( aArr, Left( cBin, nQty ) )
         cBin := SubStr( cBin, nQty + 1 )
         nQty := 1

      Case xType == CTYPE_LONG
         aAdd( aArr, Bin2L( cBin ) )
         cBin := SubStr( cBin, 5 )

      Case xType == CTYPE_CHAR_PTR .OR. xType == CTYPE_UNSIGNED_CHAR_PTR  // not sure
         aAdd( aArr, Bin2L( cBin ) )
         cBin := SubStr( cBin, 5 )

         /*
         AADD( aArr, LEFT( cBin, nQty )
         cBin := SUBSTR( cBin, nQty + 1 )
         */

      CASE xType == CTYPE_UNSIGNED_LONG
        aAdd( aArr, Bin2U( cBin ) )
        cBin := SubStr( cBin, 5 )

      Case xType == CTYPE_BOOL
         aAdd( aArr, iif( Bin2U( cBin ) == 0, .F., .T. ) )
         cBin := SubStr( cBin, 5 )

      Case xType == CTYPE_FLOAT
         aAdd( aArr, WHT_BIN2F( cBin ) )
         cBin := SubStr( cBin, 5 )

      Case xType == CTYPE_DOUBLE
         aAdd( aArr, WHT_BIN2D( cBin ) )
         cBin := SubStr( cBin, 9 )

      Otherwise
         Return NIL

      EndCase

      if --nQty == 0
         nDone ++
      endif

   EndDo

   Return iif( nDone == nLen, aArr, NIL )
whatutil.prg585
FUNCTIONWHT_WinColors( nfg, nbg )
FUNCTION WHT_WinColors( nfg, nbg )
  LOCAL acolors := { ; // valueas below are PROBABLY (!) correct.
     { "N" , VWN_RGB( 0, 0, 0 ) } , ;
     { "B" , VWN_RGB( 0, 0, 128 ) } , ;
     { "G" , VWN_RGB( 0, 128, 0 ) } , ;
     { "BG" , VWN_RGB( 0, 128, 128 ) } , ;
     { "GB" , VWN_RGB( 0, 128, 128 ) } , ;
     { "R" , VWN_RGB( 128, 0, 0 ) } , ;
     { "RB" , VWN_RGB( 128, 0, 128 ) } , ;
     { "BR" , VWN_RGB( 128, 0, 128 ) } , ;
     { "GR" , VWN_RGB( 128, 128, 0 ) } , ;
     { "RG" , VWN_RGB( 128, 128, 0 ) } , ;
     { "W" , VWN_RGB( 192, 192, 192 ) } , ;
     { "N+" , VWN_RGB( 128, 128, 128 ) } , ;
     { "B+" , VWN_RGB( 0, 0, 255 ) } , ;
     { "G+" , VWN_RGB( 0, 255, 0 ) } , ;
     { "BG+", VWN_RGB( 0, 255, 255 ) } , ;
     { "GB+", VWN_RGB( 0, 255, 255 ) } , ;
     { "R+" , VWN_RGB( 255, 0, 0 ) } , ;
     { "RB+", VWN_RGB( 255, 0, 255 ) } , ;
     { "BR+", VWN_RGB( 255, 0, 255 ) } , ;
     { "GR+", VWN_RGB( 255, 255, 0 ) } , ;
     { "RG+", VWN_RGB( 255, 255, 0 ) } , ;
     { "W+" , VWN_RGB( 255, 255, 255 ) } }

  LOCAL ccolor := Left( setcolor( ) , at( ",", setcolor( ) ) - 1 )
  LOCAL ishibg := ( "*" $ ccolor )
  LOCAL cfg := Upper(StrTran( Left( ccolor, at( "/", ccolor ) - 1 ) , "*", "" ))
  LOCAL cbg := Upper(StrTran(SubStr( ccolor, at( "/", ccolor ) + 1 ),"*","")) + iif( ishibg, "+", "" )
  LOCAL npos := 0

  nfg := VWN_RGB( 255, 255, 255 )
  nbg := VWN_RGB( 0, 0, 0 )

  IF ( npos := aScan( acolors, { | x | x[ 1 ] == cfg } ) ) > 0
    nfg := acolors[ npos, 2 ]
  ENDIF
  IF ( npos := aScan( acolors, { | x | x[ 1 ] == cbg } ) ) > 0
    nbg := acolors[ npos, 2 ]
  ENDIF

  RETURN( NIL )
whatutil.prg683
FUNCTIONWHT_Proper(cStr)
FUNCTION WHT_Proper(cStr)
   local n,ch,nLen
   local c:=""
   local l:=.T.

   cStr:=strtran(lower(alltrim(cStr)),"_"," ")
   nlen:=len(cStr)

   FOR n:=1 TO nLen
      ch:=substr(cStr,n,1)
      c+=iif(l,upper(ch),ch)
      l:=(ch==" ")
   NEXT

   RETURN(c)
whatutil.prg728
FUNCTIONWHT_FontCreate(cFont,nSize,lBold,lItalic,lVert,lUnder)
Function WHT_FontCreate(cFont,nSize,lBold,lItalic,lVert,lUnder)
   local aFont,hFont,nAngle

   DEFAULT lItalic TO .F.
   DEFAULT lBold   TO .T.
   DEFAULT lUnder  TO .F.
   DEFAULT lVert   TO .F.

   nAngle := IIF(lVert,900,0)
   aFont  := {nSize, 0, nAngle, nAngle, IIF(lBold,700,0), lItalic, lUnder, .F., 1, 1, 0, 0, 0, cFont}
   hFont  := VWN_CreateFont(aFont)

   return hFont
whatutil.prg746
FUNCTIONWHT_GetMessageFont( nWeight )
FUNCTION WHT_GetMessageFont( nWeight ) // retrieves the current font used in MessageBox
   LOCAL cBuff
   LOCAL ncm IS NONCLIENTMETRICS

   ncm:cbSize := ncm:sizeof()
   cBuff := ncm:value

   VWN_SystemParametersInfo( SPI_GETNONCLIENTMETRICS, ncm:sizeof(), @cBuff, 0 )
   ncm:Buffer( cBuff )

   IF nWeight != NIL
      ncm:lfMessageFont:lfWeight := nWeight
   ENDIF

   RETURN VWN_CreateFontIndirect( ncm:lfMessageFont:value )
whatutil.prg762
wincdlg.prg
TypeFunctionSourceLine
FUNCTIONWHT_FindText( hWnd, hInst, nFlags, cFindWhat, bAction)
Function WHT_FindText( hWnd, hInst, nFlags, cFindWhat, bAction)
   LOCAL nIndex
   LOCAL n
   LOCAL aDialog := _Get_aDialog()
   LOCAL aWindow := _Get_aWindow()
   LOCAL hDlg

   // register the dialog

   If  ( nIndex := aScan( aDialog, { | x | x[ 1 ] == NIL } ) ) == 0
      aAdd( aDialog, { 0, bAction, 1 } )
      nIndex := Len( aDialog )
   Else
      aDialog[ nIndex ] := { 0, bAction, 1 }  // 0 means waiting...
   EndIf                                      // 1 means modal

   // we need to add it here too, to QUIT on the last window !!!
   // note type 0

   If ( n := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0
       aAdd( aWindow, { 0, WT_DIALOG, { } } )
       n := Len( aWindow )
   Else
      aWindow[ n ] := { 0, WT_DIALOG, { } }  // window 0 means waiting ...
   EndIf

   // create the dialog
   hDlg := _FindText( hWnd, hInst, nFlags, cFindWhat) //, _GetDlgProc( ) )

   // if failed to create
   If hDlg == 0
      aDialog[ nIndex ] := { NIL , NIL, NIL }
      aWindow[ n ] := { NIL , NIL , { } }
      __KillWindow( )
   EndIf

   Return( hDlg )
wincdlg.prg27
FUNCTIONWHT_ReplaceText( hWnd, hInst, nFlags, cFindWhat, cReplaceWith, bAction)
Function WHT_ReplaceText( hWnd, hInst, nFlags, cFindWhat, cReplaceWith, bAction)
   LOCAL n
   LOCAL nIndex
   LOCAL aDialog := _Get_aDialog()
   LOCAL aWindow := _Get_aWindow()
   LOCAL hDlg

   // register the dialog

   If  ( nIndex := aScan( aDialog, { | x | x[ 1 ] == NIL } ) ) == 0
      aAdd( aDialog, { 0, bAction, 1 } )
      nIndex := Len( aDialog )
   Else
      aDialog[ nIndex ] := { 0, bAction, 1 }  // 0 means waiting...
   EndIf                                      // 1 means modal

   // we need to add it here too, to QUIT on the last window !!!
   // note type 0

   If ( n := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0
       aAdd( aWindow, { 0, WT_DIALOG, { } } )
       n := Len( aWindow )
   Else
      aWindow[ n ] := { 0, WT_DIALOG, { } }  // window 0 means waiting ...
   EndIf

   // create the dialog
   hDlg := _ReplaceText( hWnd, hInst, nFlags, cFindWhat,cReplaceWith ) //, _GetDlgProc( ) )

   // if failed to create
   If hDlg == 0
      aDialog[ nIndex ] := { NIL , NIL, NIL }
      aWindow[ n ] := { NIL , NIL , { } }
      __KillWindow( )
   EndIf

   Return( hDlg )
wincdlg.prg71
FUNCTIONWHT_GetOpenFileName( hWnd, cPath, cTitle, aaFilters, nFlags, cIniDir, cDefExt, nIndex )
FUNCTION WHT_GetOpenFileName( hWnd, cPath, cTitle, aaFilters, nFlags, cIniDir, cDefExt, nIndex )

   LOCAL aFiles, cRet, cFile, x, aFilter, cFilter := "", cItem, nAt, cChar

   IF cPath == NIL
      cPath := ""
   ENDIF

   IF ValType( aaFilters ) == "A"
      FOR EACH aFilter IN aaFilters
          cFilter += aFilter[1] + Chr(0) + aFilter[2] + Chr(0)
      NEXT
   ENDIF

   IF AND(nFlags,OFN_ALLOWMULTISELECT ) > 0
      cFile := Space( 32000 )
   ELSE
      cFile := Padr( Trim( cPath ), 256, Chr(0) )
   ENDIF

   cRet := _GetOpenFileName( hWnd, @cFile, cTitle, cFilter, nFlags, cIniDir, cDefExt, @nIndex )

   IF AND( nFlags, OFN_ALLOWMULTISELECT ) > 0
      nAt := At( Chr(0) + Chr(0), cFile )

      cFile := Left( cFile, nAt )
      aFiles := {}

      IF nAt == 0 // no double chr(0) user must have pressed cancel
         RETURN( aFiles )
      ENDIF

      x := At( Chr(0), cFile ) // fist null
      cPath := Left( cFile, x )

      cFile := StrTran( cFile, cPath, "" )

      IF ! Empty(cFile) // user selected more than 1 file
         cItem := ""

         FOR EACH cChar IN cFile
             IF cChar == 0
                aAdd( aFiles, StrTran( cPath, Chr(0), "" ) + '\' + cItem )
                cItem := ""
                LOOP
             ENDIF

             cItem += cChar
         NEXT
      ELSE
         /*
         cFile:=cPath
         x:=RAT('\',cFile)
         cPath:=LEFT(cFile,x-1)
         */
         aFiles := { StrTran( cPath, CHR(0), "" ) } //STRTRAN(STRTRAN(cFile,cPath),'\')}
      ENDIF

      Return( aFiles )
   ELSE
     //cRet := Left( cRet, At( chr(0), cRet ) -1 )
   ENDIF

   RETURN cRet
wincdlg.prg127
FUNCTIONWHT_GetSaveFileName(hWnd, cFile, cTitle, aFilter, nFlags, cIniDir, cDefExt, nIndex )
FUNCTION WHT_GetSaveFileName(hWnd, cFile, cTitle, aFilter, nFlags, cIniDir, cDefExt, nIndex )
   local n,c:=''

   IF aFilter==nil
      aFilter:={}
   END
   FOR n:=1 TO LEN(aFilter)
       c+=aFilter[n][1]+chr(0)+aFilter[n][2]+chr(0)
   NEXT
   cFile:=_GetSaveFileName(hWnd, cFile, cTitle, c, nFlags, cIniDir, cDefExt, @nIndex )

   Return(cFile)
wincdlg.prg206
wincomm.prg
TypeFunctionSourceLine
FUNCTIONWHT_CreateStatusBar( nStyle, cText, hParent, nId )
FUNCTION WHT_CreateStatusBar( nStyle, cText, hParent, nId  )
   LOCAL hSBWnd
   LOCAL nProc

   IF ( hSBWnd := VWN_CreateStatusWindow( nStyle, cText,hParent, nId )) != 0
      nProc := VWN_SetProcedure( hParent, {|hWnd, nMsg, nwParam, nlParam| ;
             _SBMove( nProc, hWnd, nMsg, nwParam, nlParam, hSBWnd ) }, WM_SIZE )
   ENDIF

   RETURN(hSBWnd)
wincomm.prg15
STATIC FUNCTION_SBMove( nProc, hWnd, nMsg, nwParam, nlParam, hSBWnd )
STATIC FUNCTION  _SBMove( nProc, hWnd, nMsg, nwParam, nlParam, hSBWnd )
   LOCAL aRect

   IF nMsg == WM_SIZE
      If VWN_IsWindow( hSBWnd )
         aRect := VWN_GetWindowRect( hSBWnd )
         VWN_MoveWindow( hSBWnd, 0, VWN_HiWord( nlParam ) - ( aRect[ 4 ] - aRect[ 2 ] ) , ;
                         VWN_LoWord( nlParam ) , aRect[ 4 ] - aRect[ 2 ] , .T. )

      Endif
   EndIf

   RETURN VWN_CallWindowProc( nProc, hWnd, nMsg, nwParam, nlParam )
wincomm.prg27
FUNCTIONWHT_SetStatusBarParts( hSBWnd, aParts )
FUNCTION WHT_SetStatusBarParts( hSBWnd, aParts )
   LOCAL bSizes := ""

   AEVAL(aParts,{|x| bSizes+=L2BIN(x)})

   RETURN VWN_SendMessage( hSBWnd, SB_SETPARTS, LEN( aParts ), bSizes )
wincomm.prg41
FUNCTIONWHT_SetStatusBarText( hSBWnd, nPart, cText, nBorder )
FUNCTION WHT_SetStatusBarText( hSBWnd, nPart, cText, nBorder )

   nBorder := IFNIL( nBorder,0,nBorder )

   RETURN VWN_SendMessage( hSBWnd, SB_SETTEXT + nBorder, nPart, cText )
wincomm.prg48
FUNCTIONWHT_SetStatusBkColor( hSBWnd, nPart, nColor )
FUNCTION WHT_SetStatusBkColor( hSBWnd, nPart, nColor )

   RETURN VWN_SendMessage( hSBWnd, SB_SETBKCOLOR, nPart, nColor )
wincomm.prg54
FUNCTIONWHT_SetStatusIcon( hSBWnd, nPart, hIcon )
FUNCTION WHT_SetStatusIcon( hSBWnd, nPart, hIcon )

   RETURN VWN_SendMessage( hSBWnd, SB_SETICON, nPart, hIcon )
wincomm.prg58
FUNCTIONWHT_SetStatusToolTip( hSBWnd, nPart, cTTip )
FUNCTION WHT_SetStatusToolTip( hSBWnd, nPart, cTTip )

   RETURN VWN_SendMessage( hSBWnd, SB_SETTIPTEXT, nPart, cTTip )
wincomm.prg62
wincore.prg
TypeFunctionSourceLine
FUNCTIONWhatVersion(dDate)
FUNCTION WhatVersion(dDate)

 dDate := stod( "20020821" )

 RETURN ( "0.g" )
wincore.prg53
FUNCTIONWHT_RegisterClass( wndclass, nType, bAction, anWM, oObj, xCargo )
Function WHT_RegisterClass( wndclass, nType, bAction, anWM, oObj, xCargo )
   Local aAction

   // wndclass:cbSize        := LEN( wndclass:value )
   wndclass:lpfnWndProc   := 0
   wndclass:style         := iif( wndclass:style==NIL,(CS_HREDRAW + CS_VREDRAW + CS_OWNDC + CS_DBLCLKS), wndclass:style )
   wndclass:cbClsExtra    := iif( wndclass:cbClsExtra==NIL, 0, wndclass:cbClsExtra )
   wndclass:cbWndExtra    := iif( wndclass:cbWndExtra==NIL, 0, wndclass:cbWndExtra )
   wndclass:hInstance     := iif( wndclass:hInstance==NIL, VWN_GetModuleHandle(), wndclass:hInstance )
   wndclass:hIcon         := iif( wndclass:hIcon==NIL, VWN_LoadIcon( VWN_GetModuleHandle(),""), wndclass:hIcon )
   wndclass:hCursor       := iif( wndclass:hCursor==NIL, VWN_LoadCursor(, IDC_ARROW), wndclass:hCursor)
   wndclass:hbrBackground := iif( wndclass:hbrBackground==NIL, COLOR_WINDOW  + 1, wndclass:hbrBackground )
   wndclass:lpszMenuName  := iif( wndclass:lpszMenuName==NIL, "", wndclass:lpszMenuName ) ;

   IF !ISCHARACTER( wndclass:lpszClassName ) .OR. EMPTY( wndclass:lpszClassName ) .OR. ;
      ! WHT__RegisterClass( wndclass:value )
      Return( .F. )
   ENDIF

   // note : WHT__RegisterClass() function MUST add our
   //        default "C" window procedure address
   //        which will call our  __ProcessMessage() below

   If Empty( anWM )
      anWM := { 0 }
   ElseIf ValType( anWM ) == "N"
      anWM := { anWM }
   EndIf

   If !(ValType( bAction ) $ "BN")
      bAction := NIL
   EndIf

   aAction := { anWM, bAction, WHT_GetWndProc( 1 ) , 0, oObj, xCargo }
   aAdd( aClass, { WNDCLASS:lpszClassName, nType, aAction } )

   Return( .T. )
wincore.prg66
FUNCTIONWHT_UnregisterClass( cClass, hInst )
Function WHT_UnregisterClass( cClass, hInst )
   Local n

   If ! WHT__UnregisterClass( cClass, hInst )
      Return( .F. )
   EndIf

   If ( n := aScan( aClass, { | x | x[ 1 ] == cClass } ) ) > 0
      aDel( aClass, n )
      aSize( aClass, Len( aClass ) - 1 )
   EndIf

   Return( .T. )
wincore.prg106
FUNCTIONWHT_CreateWindowEx( nExStyle, cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, hWndParent, hMenu, hInst , cParam )
Function WHT_CreateWindowEx( nExStyle, cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                             hWndParent, hMenu, hInst , cParam )

   Return WHT_CreateWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                                 hWndParent, hMenu, hInst , cParam, nExStyle )
wincore.prg122
FUNCTIONWHT_CreateWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, hWndParent, hMenu, hInst, cParam, nExStyle )
Function WHT_CreateWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                           hWndParent, hMenu, hInst, cParam, nExStyle )
   Local hWnd
   Local n
   Local nIndex

   // prepare a slot in aWindow array

   If ( nIndex := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0  // waiting
      aAdd( aWindow, )
      nIndex := Len( aWindow )
   EndIf

   // add default class procedure address and block

   If ( n := aScan( aClass, { | x | cClass == x[ 1 ] } ) ) > 0 // own window class
      aWindow[ nIndex ] := { 0, aClass[ n, 2 ] , {} }
      If ! Empty( aClass[ n, 3 ] )                     // if default user codeblock exists
         aAdd( aWindow[ nIndex, 3 ] , aClass[ n, 3 ] )
      EndIf
   Else
      aWindow[ nIndex ] := { 0, WT_WINDOW, {} }         // no default codeblock
   EndIf

   // create a window
   If ( hWnd := WHT__CreateWindowEx( nExStyle, cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                                       hWndParent, hMenu, hInst , cParam ) ) > 0
      If aWindow[ nIndex, 1 ] == 0
         aWindow[ nIndex, 1 ] := hWnd
      EndIf
   Else
      aWindow[ nIndex ] := { NIL, NIL, { } }
      __KillWindow( )
   EndIf

   Return( hWnd )
wincore.prg133
FUNCTIONWHT_CreateMDIWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, hWndParent, hInst , lParam )
Function WHT_CreateMDIWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                       hWndParent, hInst , lParam )
   Local hWnd
   Local n
   Local nIndex

   // prepare a slot in aWindow array
   If ( nIndex := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0  // waiting
      aAdd( aWindow, )
      nIndex := Len( aWindow )
   EndIf

   // add default class procedure address and block
   If ( n := aScan( aClass, { | x | cClass == x[ 1 ] } ) ) > 0 // own window class
      aWindow[ nIndex ] := { 0, aClass[ n, 2 ] , { } }
      If ! Empty( aClass[ n, 3 ] )                     // if default user codeblock exists
         aAdd( aWindow[ nIndex, 3 ] , aClass[ n, 3 ] )
      EndIf
   Else
      aWindow[ nIndex ] := { 0, WT_MDICHILD, { } }         // no default codeblock
   EndIf

   // create a window
   If ( hWnd := WHT__CreateMDIWindow( cClass, cTitle, nStyle, nX, nY, nWidth, nHeight, ;
                                 hWndParent, hInst , lParam ) ) > 0

      If aWindow[ nIndex, 1 ] == 0
         aWindow[ nIndex, 1 ] := hWnd
      EndIf
   Else
      aWindow[ nIndex ] := { NIL, NIL, { } }
      __KillWindow( )
   EndIf

   Return( hWnd )
wincore.prg174
FUNCTIONWHT__ProcessMsg( hWnd, nMsg, nwParam, nlParam, nIndex )
Function WHT__ProcessMsg( hWnd, nMsg, nwParam, nlParam, nIndex )
   Local n
   Local i := 0
   Local anWM
   Local bProc
   Local nType := WT_WINDOW
   Local nRet  := 0
   Local nProc //:=aProc[nIndex]
   Local oObj
   Local xCargo

   // setup list of possible procedures (max 10 per window )

   If aProc == NIL
      aProc := { ;
                 WHT_GetWndProc( 1 ) , ;
                 WHT_GetWndProc( 2 ) , ;
                 WHT_GetWndProc( 3 ) , ;
                 WHT_GetWndProc( 4 ) , ;
                 WHT_GetWndProc( 5 ) , ;
                 WHT_GetWndProc( 6 ) , ;
                 WHT_GetWndProc( 7 ) , ;
                 WHT_GetWndProc( 8 ) , ;
                 WHT_GetWndProc( 9 ) , ;
                 WHT_GetWndProc( 10 ) ;
               }
   EndIf

   // still in creation process ?

   If ( n := aScan( aWindow, { | x | hWnd == x[ 1 ] } ) ) == 0 //find the window
      If ( ( n := aScan( aWindow, { | x | 0 == x[ 1 ] .AND. WT_DIALOG != x[ 2 ] } ) ) > 0 )
         aWindow[ n, 1 ] := hWnd
      EndIf
   EndIf

   // find the procedure corresponding to the subclass index
   // bypass Windows procedure chain, where applicable

   nProc := aProc[ nIndex ]
   If !Empty( n )
      nType := aWindow[ n, 2 ]
      Do While ( i := aScan( aWindow[ n, 3 ] , { | x | nProc == x[ 3 ] } ) ) > 0 // does custom procedure exist ?
         anWM  := aWindow[ n, 3, i, 1 ]
         bProc := aWindow[ n, 3, i, 2 ]
         oObj  := aWindow[ n, 3, i, 5 ]
         xCargo:= aWindow[ n, 3, i, 6 ]
         If ! ( ValType( bProc ) $ "BN" .AND.  ( nMsg >= WM_USER .OR. anWM[ 1 ] == - 1 .OR. aScan( anWM, nMsg ) > 0 ) )
            If ( nProc := aWindow[ n, 3, i, 4 ] ) != 0 // old procedure exists
               If aScan( aProc, nProc ) == 0  // not our procedure
                  Return VWN_CallWindowProc( nProc, hWnd, nMsg, nwParam, nlParam ) // external
               EndIf
            Else
               i := 0 // end of the road, call default
            EndIf
         Else
            Exit  // ok, we got it
         EndIf
      EndDo
   EndIf

   // process message

   If i == 0 // no subclassed proc
      If nType == WT_MDICHILD
         nRet := VWN_DefMDIChildProc( hWnd, nMsg, nwParam, nlParam )
      ElseIf nType == WT_MDIFRAME
         nRet := VWN_DefFrameProc( hWnd, nMsg, nwParam, nlParam )
      ElseIf nType == WT_DIALOG
         nRet := VWN_DefDlgProc( hWnd, nMsg, nwParam, nlParam )
      Else  //WT_WINDOW
         nRet := VWN_DefWindowProc( hWnd, nMsg, nwParam, nlParam )
      EndIf
   Else
      If Valtype( bProc ) == "N"
         nRet := HB_ExecFromArray( bProc, { oObj, hWnd, nMsg, nwParam, nlParam, xCargo } )
      Else
         nRet := Eval( bProc, hWnd, nMsg, nwParam, nlParam )
      Endif
   EndIf

   // remove the window from our internal list

   If nMsg == WM_NCDESTROY // last message to the window
      __KillWindow( hWnd )
   EndIf

   Return( nRet )
wincore.prg212
FUNCTION__KillWindow( hWnd )
Function __KillWindow( hWnd )
   Local n

   If hWnd != NIL .AND. ( n := aScan( aWindow, { | x | hWnd == x[ 1 ] } ) ) > 0
      aWindow[ n ] := { NIL, NIL, { } }
   EndIf

   If aScan( aWindow, { | x | ! Empty( x[ 1 ] ) } ) == 0
      VWN_PostQuitMessage( 0 )
   EndIf

   Return( NIL )
wincore.prg306
FUNCTIONWHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam )
Function WHT__ProcessDlgMsg( hDlg, nMsg, nwParam, nlParam )
   Local nIndex := 0
   Local nResult
   Local n := 0

   If ( ( nIndex := aScan( aDialog, { | x | hDlg == x[ 1 ] } ) ) == 0 )
      If ( ( nIndex := aScan( aDialog, { | x | 0 == x[ 1 ] } ) ) == 0 )
         Return( 0 )
      Else
         aDialog[ nIndex, 1 ] := hDlg
         If ( ( n := aScan( aWindow, { | x | 0 == x[ 1 ] .AND. WT_DIALOG == x[ 2 ] } ) ) > 0 )
            aWindow[ n ] := { hDlg, WT_DIALOG, { } }
         EndIf
      EndIf
   EndIf

   nResult := iif( ValType(aDialog[ nIndex, 2 ]) == "B", ;
                  eval( aDialog[ nIndex, 2 ] , hDlg, nMsg, nwParam, nlParam ),;
                  iif( Valtype( aDialog[ nIndex, 2 ] ) == "N", ;
                     HB_ExecFromArray( aDialog[ nIndex,2 ], { aDialog[ nIndex, 4], hDlg, nMsg, nwParam, nlParam, aDialog[ nIndex, 5 ] } ),;
                     0 );
                )

   If nMsg == WM_NCDESTROY
      aDialog[ nIndex ] := { NIL , NIL , NIL, NIL, NIL }
      If ( n := aScan( aWindow, { | x | hDlg == x[ 1 ] .AND. WT_DIALOG == x[ 2 ] .AND. Empty( x[ 3 ] ) } ) ) > 0
         __KillWindow( hDlg )
      EndIf
   EndIf

   Return( nResult )
wincore.prg324
FUNCTIONWHT_DialogBox( hInst, acnDlg, hWnd, bAction, oObj, xCargo )
Function WHT_DialogBox( hInst, acnDlg, hWnd, bAction, oObj, xCargo )
   Local nResult := 0
   Local nIndex
   Local cTemplate

   If !(ValType( bAction ) $ "BN")
      Return( - 1 )
   EndIf

   // register the dialog

   If  ( nIndex := aScan( aDialog, { | x | x[ 1 ] == NIL } ) ) == 0
      aAdd( aDialog, { 0, bAction, 1, oObj, xCargo } )
      nIndex := Len( aDialog )

   Else
      aDialog[ nIndex ] := { 0, bAction, 1, oObj, xCargo }  // 0 means waiting...
                                                            // 1 means modal
   EndIf

   // create the template from the array
   //
   If ValType( acnDlg ) == "A"
      cTemplate := WHT__MakeDlgTemplate( acnDlg[ 1 ] , acnDlg[ 2 ] , acnDlg[ 3 ] , acnDlg[ 4 ] , ;
                                     acnDlg[ 5 ] , acnDlg[ 6 ] , acnDlg[ 7 ] , acnDlg[ 8 ] , ;
                                     acnDlg[ 9 ] , acnDlg[ 10 ] , acnDlg[ 11 ] , acnDlg[ 12 ] )
      nResult := WHT__DialogBoxIndirect( hInst, cTemplate, hWnd, WHT__GetDlgProc( ) )

   Else
      nResult := WHT__DialogBox( hInst, acnDlg, hWnd, WHT__GetDlgProc( ) )

   EndIf

   aDialog[ nIndex ] := { NIL , NIL , NIL, NIL, NIL }    // unused

   Return( nResult )
wincore.prg358
FUNCTION_Get_aDialog()
FUNCTION _Get_aDialog()

   RETURN(aDialog)
wincore.prg400
FUNCTION_Get_aWindow()
FUNCTION _Get_aWindow()

   RETURN(aWindow)
wincore.prg409
FUNCTIONWHT_MakeDlgTemplate( cTitle, nStyle , x, y, nWidth, nHeight, nPointSize, cFaceName, nWeight, lItalic, nHelpId, nExStyle )
FUNCTION WHT_MakeDlgTemplate( cTitle, nStyle , x, y, nWidth, nHeight, nPointSize, ;
                                   cFaceName, nWeight, lItalic, nHelpId, nExStyle )
   // Prepare the template array
   // Element 1: dialog template
   // Elements 2-12: Properties of an item (each elemet - different property)

   LOCAL aDlg := { { } , { } , { } , { } , { } , { } , { } , { } , { } , { } , { } , { } }

   //aAdd(aDlg[1],1)       // add in C
   //aAdd(aDlg[1],0xFFFF)  // add in C

   // style
   If !ISNUMERIC( nStyle ) // nStyle
      nStyle := 0
      //   acnDlg:=DS_SETFONT
      //elseif AND(acnDlg,DS_SETFONT)==0
      //  acnDlg+=DS_SETFONT
   EndIf

   // But the programming interface and the result is the same.

   aAdd( aDlg[ 1 ] , iif( Empty( nHelpId ) , 0, nHelpId ) )   // new
   aAdd( aDlg[ 1 ] , iif( Empty( nExStyle ) , 0, nExStyle ) ) // new
   aAdd( aDlg[ 1 ] , nStyle ) // nStyle
   aAdd( aDlg[ 1 ] , 0 ) // no. of items
   aAdd( aDlg[ 1 ] , x )
   aAdd( aDlg[ 1 ] , y )
   aAdd( aDlg[ 1 ] , nWidth )
   aAdd( aDlg[ 1 ] , nHeight )
   aAdd( aDlg[ 1 ] , 0 ) // no menu ? pity, maybe I'll add later
   aAdd( aDlg[ 1 ] , 0 ) // default windows class
   aAdd( aDlg[ 1 ] , iif( ValType( cTitle ) == "C", cTitle, "" ) )

   If VWN_AND( nStyle, DS_SETFONT ) == DS_SETFONT
      aAdd( aDlg[ 1 ] , iif( ValType( nPointSize ) == "N", nPointSize, 8 ) )
      aAdd( aDlg[ 1 ] , iif( ValType( nWeight    ) == "N", nWeight, 400 ) )
      aAdd( aDlg[ 1 ] , iif( ValType( lItalic    ) == "L", lItalic, .F. ) )
      aAdd( aDlg[ 1 ] , iif( ValType( cFaceName  ) == "C", cFaceName, "MS Sans Serif" ) )
   EndIf

   Return( aDlg )
wincore.prg415
FUNCTIONWHT_CreateDialog( hInst, acnDlg , hWnd, bAction, oObj, xCargo )
Function WHT_CreateDialog( hInst, acnDlg , hWnd, bAction, oObj, xCargo )
   Local nIndex
   Local hDlg
   Local cTemplate
   Local n

   If !( ValType( bAction ) $ "BN" )
      Return( 0 )
   EndIf

   // prepare aDialog entry

   If ( nIndex := aScan( aDialog, { | x | x[ 1 ] == NIL } ) ) == 0
      aAdd( aDialog, { 0 , bAction, 0, oObj, xCargo } )    // must add before CreateDialog
      nIndex := Len( aDialog )
   Else
      aDialog[ nIndex ] := { 0, bAction, 0, oObj, xCargo }  // window 0 means waiting ...
   EndIf                                                    // type 0 means modeless

   // we need to add it here too, to QUIT on the last window !!!
   // note type 0

   If ( n := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0
      aAdd( aWindow, { 0, WT_DIALOG, { } } )
      n := Len( aWindow )
   Else
      aWindow[ n ] := { 0, WT_DIALOG, { } }  // window 0 means waiting ...
   EndIf

   // create the dialog

   If ValType( acnDlg ) == "A"
      // create the template from the array
      cTemplate := WHT__MakeDlgTemplate( acnDlg[ 1 ] , acnDlg[ 2 ] , acnDlg[ 3 ] , acnDlg[ 4 ] , ;
                                     acnDlg[ 5 ] , acnDlg[ 6 ] , acnDlg[ 7 ] , acnDlg[ 8 ] , ;
                                     acnDlg[ 9 ] , acnDlg[ 10 ] , acnDlg[ 11 ] , acnDlg[ 12 ] )

      hDlg := WHT__CreateDialogIndirect( hInst, cTemplate, hWnd, WHT__GetDlgProc() )

   Else
      hDlg := WHT__CreateDialog( hInst, acnDlg, hWnd, WHT__GetDlgProc() )

   EndIf

   // if failed to create
   If hDlg == 0
      aDialog[ nIndex ] := { NIL , NIL, NIL, NIL, NIL }
      aWindow[ n ] := { NIL , NIL , { } }
      __KillWindow( )
   EndIf

   Return( hDlg )
wincore.prg459
FUNCTIONWHT_AddDlgItem( aDlg, cnId, cnDlgClass, nStyle, nX, nY, nWidth, nHeight, cText, nHelpId, nExStyle, cData )
Function WHT_AddDlgItem( aDlg, cnId, cnDlgClass, nStyle, nX, nY, ;
                       nWidth, nHeight, cText, nHelpId, nExStyle, cData )

   HB_SYMBOL_UNUSED( cData )

   aDlg[ 1, 4 ] ++ // item count

   aAdd( aDlg[ 2 ] ,  iif( ValType( nHelpId ) == "N", nHelpId, 0 ) )
   aAdd( aDlg[ 3 ] ,  iif( ValType( nExStyle ) == "N", nExStyle, 0 ) )
   aAdd( aDlg[ 4 ] ,  iif( ValType( nStyle ) == "N", nStyle, WS_CHILD + WS_VISIBLE ) )
   aAdd( aDlg[ 5 ] ,  nX )
   aAdd( aDlg[ 6 ] ,  nY )
   aAdd( aDlg[ 7 ] ,  nWidth )
   aAdd( aDlg[ 8 ] ,  nHeight )
   aAdd( aDlg[ 9 ] ,  cnId )
   aAdd( aDlg[ 10 ] , cnDlgClass )
   aAdd( aDlg[ 11 ] , iif( ISCHARACTER( cText ), cText, iif( ISNUMERIC( cText ), cText, "" ) ) )
   aAdd( aDlg[ 12 ] , 0 )    // cData

   Return aDlg
wincore.prg514
FUNCTIONWHT_SetProcedure( hWnd, bAction, anWM, oObj, xCargo )
Function WHT_SetProcedure( hWnd, bAction, anWM, oObj, xCargo )
   Local nProc := 0
   Local i, n
   Local nOldProc := 0

   // setup list of possible procedures (max 10 per window )

   If aProc == NIL
      aProc := { ;
                 WHT_GetWndProc( 1 ) , ;
                 WHT_GetWndProc( 2 ) , ;
                 WHT_GetWndProc( 3 ) , ;
                 WHT_GetWndProc( 4 ) , ;
                 WHT_GetWndProc( 5 ) , ;
                 WHT_GetWndProc( 6 ) , ;
                 WHT_GetWndProc( 7 ) , ;
                 WHT_GetWndProc( 8 ) , ;
                 WHT_GetWndProc( 9 ) , ;
                 WHT_GetWndProc( 10 ) ;
               }
   EndIf

   // make sure the window is in the array

   If VWN_IsWindow( hWnd )
      If ( n := aScan( aWindow, { | x | hWnd == x[ 1 ] } ) ) == 0
         If ( n := aScan( aWindow, { | x | x[ 1 ] == NIL } ) ) == 0
            aAdd( aWindow, )
            n := Len( aWindow )
         EndIf
         aWindow[ n ] := { hWnd, WT_WINDOW, { } }
      EndIf

      // get a unique procedure address

      nOldProc := VWN_GetWindowLong( hWnd, GWL_WNDPROC )
      For i := 1 To 10
         If aProc[ i ] != nOldProc
            If aScan( aWindow[ n, 3 ] , { | x | x[ 3 ] == aProc[ i ] .OR. x[ 4 ] == aProc[ i ] } ) == 0
               nProc := aProc[ i ]
               Exit
            EndIf
         EndIf
      Next

      If !Empty( nProc )
         VWN_SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
         If Empty( anWM )
            anWM := { 0 }
         ElseIf ValType( anWM ) == "N"
            anWM := { anWM }
         EndIf

         If !(ValType( bAction ) $ "BN")
            bAction := NIL
         EndIf
         aAdd( aWindow[ n, 3 ] , { anWM, bAction, nProc, nOldProc, oObj, xCargo } )
      EndIf

   EndIf

   Return( nOldProc )
wincore.prg537
FUNCTIONWHT_ResetProcedure( hWnd, nProc )
Function WHT_ResetProcedure( hWnd, nProc )
   Local n, i
   Local lRet := .F.

   If ( n := aScan( aWindow, { | x | hWnd == x[ 1 ] } ) ) > 0 //find the window
      If !ISNUMERIC( nProc ) .OR. nProc == 0  // unsubclass all

         If Len( aWindow[ n, 3 ] ) > 0 // is subclassed
            If aWindow[ n, 3, 1, 4 ] == 0
               nProc := aWindow[ n, 3, 1, 3 ]
               aSize( aWindow[ n, 3 ] , 1 ) // class procedure must stay
            Else
               nProc := aWindow[ n, 3, 1, 4 ]
               aSize( aWindow[ n, 3 ] , 0 )
            EndIf
            If nProc != 0
               VWN_SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
               lRet := .T.
            EndIf
         EndIf

      Else

         If ( i := aScan( aWindow[ n, 3 ] , { | x | x[ 4 ] == nProc } ) ) > 0
            Do While Len( aWindow[ n, 3 ] ) >= i
               aDel( aWindow[ n, 3 ] , i )
               aSize( aWindow[ n, 3 ] , Len( aWindow[ n, 3 ] ) - 1 )
            EndDo
            VWN_SetWindowLongPtr( hWnd, GWL_WNDPROC, nProc )
            lRet := .T.
         EndIf

      EndIf
   EndIf

   Return( lRet )
wincore.prg602
FUNCTIONWHT_WinProcCount( hWnd, nProc )
Function WHT_WinProcCount( hWnd, nProc )
   Local n, i
   Local nRet := 0

   If ( n := aScan( aWindow, { | x | hWnd == x[ 1 ] } ) ) > 0 //find the window
      If !ISNUMERIC( nProc ) .OR. nProc == 0
         nRet := Max( 0, Len( aWindow[ n, 3 ] ) - 1 )
      Else
         If ( i := aScan( aWindow[ n, 3 ] , { | x | x[ 3 ] == nProc } ) ) > 0
            nRet := Max( 0, i - 1 )
         EndIf
      EndIf
   EndIf

   Return( nRet )
wincore.prg641
FUNCTIONWHT_SelectWindow( hNewWnd )
Function WHT_SelectWindow( hNewWnd )

   Local hOldActive := hWndActive

   If hNewWnd != NIL .AND. VWN_IsWindow( hNewWnd )
      hWndActive := hNewWnd
   EndIf

   Return( hOldActive )
wincore.prg659
FUNCTIONWHT_IsDialogMessage( hDlg, cMsg )
Function WHT_IsDialogMessage( hDlg, cMsg )

   If hDlg == NIL
     Return ( aScan( aDialog, {|x| 0 == x[ 3 ] .AND. VWN_IsDialogMessage( x[ 1 ], cMsg ) } ) > 0 )
   Endif

   Return( WHT_IsDialogMessage( hDlg, cMsg ) )
wincore.prg671
windebug.prg
TypeFunctionSourceLine
FUNCTIONWHT__trace(c)
function WHT__trace(c)
   local cn

   if valtype(c)=='C'
     cn:=c //:classname()
   endif

   VWN_OutputDebugString(iif(empty(cn),'',cn+':')+procname(1)+'('+alltrim(str(procline(1)))+')'+;
   ' <- '+procname(2)+'('+alltrim(str(procline(2)))+')'+;
   ' <- '+procname(3)+'('+alltrim(str(procline(3)))+')'+;
   ' <- '+procname(4)+'('+alltrim(str(procline(4)))+')'+;
   ' <- '+procname(5)+'('+alltrim(str(procline(5)))+')'+;
   CRLF)

   return(NIL)
//----------------------------------------------------------------------//
* PARAM is used here on purpose to allow for macro expansion of the
* parameters which are passed here as private !!!!!!!!!
windebug.prg12
FUNCTIONWHT__DVIEW()
FUNCTION WHT__DVIEW()
   PARAM p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18

   LOCAL no_of_param, x, dbg_array, description, half

   no_of_param := PCOUNT( )
   half := no_of_param / 2

   VWN_OutputDebugString( '------------------------------' +CRLF)
   BEGIN SEQUENCE
      FOR x := 1 TO half
         dbg_array := "p" + lTrim( STR( x, 2, 0 ) )
         description := "p" + lTrim( STR( x + half, 2, 0 ) )
         DLIST( &dbg_array, &description )
      NEXT
   END

   RETURN NIL
windebug.prg31
STATIC FUNCTIONDLIST( dbg_array, description )
STATIC FUNCTION DLIST( dbg_array, description )
   LOCAL heading, x, a_len, data_type, value

   IF ValType( dbg_array ) $ 'AOS'
      a_len := Len( dbg_array )
      DQOUT( '     Array:', description, '', iif( a_len == 0, '', dbg_array ) , Len( dbg_array ) )
      FOR x := 1 TO a_len
         heading := description + "[" + STR( x, 3, 0 ) + "]"
         data_type := ValType( dbg_array[ x ] )
         value := dbg_array[ x ]
         DSINGLE_VIEW( heading, data_type, value )
      NEXT
   ELSE
      heading := description
      data_type := ValType( dbg_array )
      value := dbg_array
      DSINGLE_VIEW( heading, data_type, value )
   ENDIF
   RETURN NIL
windebug.prg50
STATIC FUNCTIONDSINGLE_VIEW( heading, data_type, value )
STATIC FUNCTION DSINGLE_VIEW( heading, data_type, value )

   DO CASE
   CASE data_type == "A"
      DLIST( value, heading )
   CASE data_type == "B"
      DQOUT( "Code Block:", heading, " => ", value )
   CASE data_type == "C"
      DQOUT( " Character:", heading, " => ", value, .T. )
   CASE data_type == "D"
      DQOUT( "      Date:", heading, " => ", value )
   CASE data_type == "L"
      DQOUT( "   Logical:", heading, " => ", value )
   CASE data_type == "M"
      DQOUT( "      Memo:", heading, " => ", value )
   CASE data_type == "N"
      DQOUT( "   Numeric:", heading, " => ", value )
   CASE data_type == "O"
      VWN_OutputDebugString( "  Object vv" +CRLF) // arrows don't show in Windows
      DLIST( value, heading )
      VWN_OutputDebugString( "  Object ^^" +CRLF) // arrows don't show in windows
   CASE data_type == "N"
      DQOUT( "   Numeric:", heading, " => ", value )
   CASE data_type == "U"
      DQOUT( "Undefinded:", heading, " => ", value )
   OTHERWISE
      VWN_OutputDebugString( "Unknown data type returned by VALTYPE()" +CRLF)
   ENDCASE
   RETURN NIL
windebug.prg70
STATIC FUNCTIONDQOUT( a, b, c, d, show_len )
STATIC FUNCTION DQOUT( a, b, c, d, show_len )
   LOCAL e := ''

   IF ValType( show_len ) == 'L' .AND. show_len
      e := ' (' + LEFT(ALLTRIM(a),1)+ ALLTRIM(STR( Len( d ) , 4, 0 ))+')'
   ELSEIF ValType( show_len ) == 'N'
         e := ' ('+ LEFT(ALLTRIM(a),1) + AllTrim( STR( show_len, 10, 0 ) )+')'
    //  ENDIF
   ELSE
     e:=' ('+LEFT(ALLTRIM(a),1)+')'
   ENDIF

   e:=""

   VWN_OutputDebugString( b + e + c + asstring( d ) +CRLF)
   RETURN NIL
windebug.prg100
STATIC FUNCTIONasString( x )
STATIC FUNCTION asString( x )
   local v := ValType( x )

   DO CASE
   CASE v == "C"
      RETURN '"' + x + '"'
   CASE v == "N"
      RETURN AllTrim( str( x ) )
   CASE v == "L"
      IF x
         RETURN ".T."
      ELSE
         RETURN ".F."
      ENDIF
   CASE v == "D"
      RETURN dtoc( x )
   CASE v == "U"
      RETURN "NIL"
   CASE v == "A"
      RETURN ""
   CASE v == "O"
      RETURN ""
   CASE v == "B"
      RETURN ""
   OTHERWISE
      RETURN ""
   END CASE

   RETURN( x )
windebug.prg117
winerror.prg
TypeFunctionSourceLine
PROCEDUREWHT_ErrorSys( )
PROCEDURE WHT_ErrorSys( )

   ErrorBlock( { | e | DefError( e ) } )

   RETURN
winerror.prg22
STATIC FUNCTIONDefError( e )
STATIC FUNCTION DefError( e )

   LOCAL cMessage, aOptions, nChoice
   LOCAL cErr
   LOCAL cProcStack := ''
   LOCAL i

   IF e:genCode == EG_PRINT
      RETURN PrintError( )
   ENDIF
   IF ( e:genCode == EG_ZERODIV )
      RETURN ( 0 )
   ENDIF
   IF ( e:genCode == EG_OPEN .AND. e:osCode == 32 .AND. e:canDefault )
      NetErr( .T. )
      RETURN ( .F. ) // NOTE
   ENDIF
   IF ( e:genCode == EG_APPENDLOCK .AND. e:canDefault )
      NetErr( .T. )
      RETURN ( .F. ) // NOTE
   ENDIF

   i := 2
   DO WHILE ( ! Empty( ProcName( i ) ) )
      cProcStack += ( CRLF + ProcFile( i ) + "->" + ProcName( i ) + "(" + NTRIM( ProcLine( i ++ ) ) + ")" )
      IF ProcName( i ) == 'DEFERROR' // Oops, recursive arror, cannot continue !
         VWN_OutputDebugString( "" )
         VWN_OutputDebugString( "===============" + CRLF )
         VWN_OutputDebugString( "RECURSIVE ERROR" + CRLF )
         VWN_OutputDebugString( "===============" + CRLF )
         VWN_OutputDebugString( e:description + CHR( 13 ) + "Procedure Stack Depth:" + ntrim( getprocstack( ) ) + CRLF )
         VWN_OutputDebugString( cProcStack + CRLF )
         VWN_PostQuitMessage( 0 )
         Errorlevel( 1 )
         // quit
         RETURN( .F. )
      ENDIF
   ENDDO

   //OutputDebugString( cProcStack + CRLF )

   cErr := LogError( e, cProcStack )
   VWN_OutputDebugString( cErr )
   cMessage := ErrorMessage( e )

   aOptions := { "Quit" }
   IF ( e:canRetry )
      aAdd( aOptions, "Retry" )
   END
   IF ( e:canDefault )
      aAdd( aOptions, "Default" )
   END

   nChoice := 0

   IF ( Empty( e:osCode ) )
      nChoice := eAlert( cMessage, aOptions, cErr )
   ELSE
      nChoice := eAlert( cMessage + ;
                         ";(OS Error " + NTRIM( e:osCode ) + ")", ;
                         aOptions, cErr )
   END

   IF ( ! Empty( nChoice ) )

      // do as instructed
      IF ( aOptions[ nChoice ] == "Break" )
         SET DELETED ON
         BREAK( e )
         RETURN( .F. )
      ELSEIF ( aOptions[ nChoice ] == "Retry" )
         RETURN ( .T. )
      ELSEIF ( aOptions[ nChoice ] == "Default" )
         SET DELETED ON
         RETURN ( .F. )
      END

   END

   VWN_PostQuitMessage( 0 )
   ErrorLevel( 1 )
   Quit
   //CLOSE ALL
   //PGMEXIT()

   RETURN ( .F. )
winerror.prg28
STATIC FUNCTIONErrorMessage( e )
STATIC FUNCTION ErrorMessage( e )
   LOCAL cMessage

   // start error message
   cMessage := iif( e:severity > ES_WARNING, "Error", "Warning" )

   // add error description if available
   IF ( ValType( e:description ) == "C" )
      cMessage += ';' + e:description
   END

   // add either filename or operation
   IF ( ! Empty( e:filename ) )
      cMessage += ( ';' + e:filename )
   ELSEIF ( ! Empty( e:operation ) )
      cMessage += ( ';' + e:operation )
   END

   // add subsystem name if available
   IF ( ValType( e:subsystem ) == "C" )
      cMessage += ';ERROR: ' + e:subsystem( ) + ' '
   ELSE
      cMessage += ";ERROR: ??? "
   END

   // add subsystem's error code if available
   IF ( ValType( e:subCode ) == "N" )
      cMessage += ( NTRIM( e:subCode ) )
   END
   cMessage += ';Called from ' + ProcFile(3) + "->" + procname( 3 ) + ' (' + AllTrim( Str( procline( 3 ) ) ) + '),  ' + ;
               + ProcFile(4) + "->" + procname( 4 ) + ' (' + AllTrim( Str( procline( 4 ) ) ) + ')'
   cMessage += ';Error logged in file '+ VWN_GetModuleFileName()+'\error.log'

   RETURN ( cMessage )
winerror.prg115
STATIC FUNCTIONLogError( e, cProcStack )
STATIC FUNCTION LogError( e, cProcStack )
   LOCAL Args := ConvertArgs( e:args )
   LOCAL i    := 3
   LOCAL cErr := ''
   LOCAL dVer

   cErr += 'SYSTEM'
   cErr += ( CRLF + '------' )
   cErr += ( CRLF + 'Error date:' + dtoc( date( ) ) + ' time:' + time( ) )
   cErr += ( CRLF + 'Application: ' + VWN_GetModuleFileName( ) )
   cErr += ( CRLF + 'hbwhat library ver.' + WhatVersion( @dVer ) + ", " + DTOC( dVer ) )

   // T.B.D.:
   // add here  Windows version, memory info, diskspace info, free resources info
   // add computer name and operator name

   cErr += ( CRLF )
   cErr += ( CRLF + "ERROR INFORMATION" )
   cErr += ( CRLF + "-----------------" )
   cErr += ( CRLF + "Arguments     " + Args )
   cErr += ( CRLF + "Description   " + e:description )
   cErr += ( CRLF + "Filename      " + IfEmpty( e:filename ) )
   cErr += ( CRLF + "GenCode       " + gencodetext( e:genCode ) )
   cErr += ( CRLF + "Operation     " + IfEmpty( e:operation ) )
   cErr += ( CRLF + "Severity      " + NTRIM( e:severity ) )
   cErr += ( CRLF + "SubCode       " + NTRIM( e:subCode ) )
   cErr += ( CRLF + "SubSystem     " + e:subSystem )
   cErr += ( CRLF + "Tries         " + NTRIM( e:tries ) )
   cErr += ( CRLF + "Alias()       " + IfEmpty( ALIAS( ) ) )
   cErr += ( CRLF + "Open DBFs     " + ntrim( GetAliasCount( ) ) )
   cErr += ( CRLF + "DOS Error     " + DosErrCode( e ) )
   cErr += ( CRLF + "Windows Error " + NTRIM( GetLastError( ) ) )
   cErr += ( CRLF )
   cErr += ( CRLF )
   cErr += ( CRLF + "PROCEDURE STACK" )
   cErr += ( CRLF + "---------------" )

   cErr += cProcStack

   SET PRINTER TO  "error.log" ADDITIVE
   SET CONSOLE OFF
   SET PRINTER ON

   QOut( "        Please mail or fax this error report to:" )
   /*
   ? '             +---------------------------+'
   ? '             |  YOUR BUSINESS NAME HERE  |'
   ? '             |        P.O.Box 123        |'
   ? '             |Some Prestigeous Town, 1234|'
   ? '             |    Fax: (01) 1234 1234    |'
   */
   QOut( "             +---------------------------+" )
   QOut( cErr )

   QOut(Replicate( "=", 70 ))

   EJECT
   SET PRINTER OFF
   SET PRINTER TO
   SET CONSOLE ON

   RETURN cErr
winerror.prg150
STATIC FUNCTIONIfEmpty( Msg )
STATIC FUNCTION IfEmpty( Msg )
   LOCAL Ret_Val := ""

   IF ! Empty( msg )
      Ret_Val := Left( msg, 68 )
   ENDIF

   RETURN Ret_Val
winerror.prg213
STATIC PROCEDUREPrintError
STATIC PROCEDURE PrintError

   BREAK
winerror.prg222
STATIC FUNCTIONConvertArgs( a )
STATIC FUNCTION ConvertArgs( a )
   LOCAL Ret_Val
   LOCAL x, cType
   LOCAL NumArgs := iif( ValType( a ) == "A", Len( a ) , iif( ValType( a ) == "C", ( a := { a } , 1 ) , 0 ) )

   IF NumArgs > 0
      Ret_Val := '{ '
      FOR x := 1 TO NumArgs
         cType := ValType( a[ x ] )
         DO CASE
         CASE cType == "C"
            Ret_Val += a[ x ]
         CASE cType == "N"
            Ret_Val += NTRIM( a[ x ] )
         CASE cType == "D"
            Ret_Val += dtoc( a[ x ] )
         CASE cType == "L"
            Ret_Val += iif( a[ x ] , ".T.", ".F." )
         CASE cType == "O"
            Ret_Val += a[ x ] :className + " Object"
         CASE cType == "U"
            Ret_Val += "NIL"
         ENDCASE
         //ÄÄÄÄÄ Next block added 1/8/92 To separate arguments
         IF x < NumArgs
            Ret_Val += ', '
         ENDIF
      NEXT
      Ret_Val += ' }'
   ENDIF

   RETURN ifempty( Ret_Val )
winerror.prg228
STATIC FUNCTIONGetAliasCount()
STATIC FUNCTION GetAliasCount()
   LOCAL Counter  := 0
   LOCAL nCounter := 0

   FOR Counter := 1 TO 255
      IF !Empty( alias( Counter ) )
         nCounter++
      ENDIF
   NEXT

   RETURN( nCounter )
winerror.prg261
STATIC FUNCTIONGetProcStack( )
STATIC FUNCTION GetProcStack( )
   LOCAL i := 2

   DO WHILE ! Empty( ProcName( i ) )
      i ++
   ENDDO

   RETURN( i - 3 )
winerror.prg273
STATIC FUNCTIONDosErrCode( e )
STATIC FUNCTION DosErrCode( e )
   LOCAL Msg

   IF e:osCode > 0
      Msg := NTRIM( e:osCode ) + ": " + Left( DosErrText( e:osCode ) , 37 )
   ELSE
      Msg := "(not an operating system error)"
   ENDIF

   RETURN Msg
winerror.prg282
STATIC FUNCTIONDosErrText( n )
STATIC FUNCTION DosErrText( n )

   LOCAL desc_ := { "Invalid function number"                 , ; // 1
                    "File not found"                          , ; // 2
                    "Path not found"                          , ; // 3
                    "Too many files open (no handles left)"   , ; // 4
                    "Access denied"                           , ; // 5
                    "Invalid handle"                          , ; // 6
                    "Memory control blocks destroyed (oh, my)", ; // 7
                    "Insufficient memory"                     , ; // 8
                    "Invalid memory block address"            , ; // 9
                    "Invalid environment"                     , ; // 10
                    "Invalid format"                          , ; // 11
                    "Invalid access code"                     , ; // 12
                    "Invalid data"                            , ; // 13
                    , ; // 14
                    "Invalid drive was specified"             , ; // 15
                    "Attempt to remove the current directory" , ; // 16
                    "Not same device"                         , ; // 17
                    "No more files"                           , ; // 18
                    "Attempt to write on write-protected diskette", ; // 19
                    "Unknown unit"                            , ; // 20
                    "Drive not ready"                         , ; // 21
                    "Unknown command"                         , ; // 22
                    "Data error (CRC)"                        , ; // 23
                    "Bad request structure length"            , ; // 24
                    "Seek error"                              , ; // 25
                    "Unknown media type"                      , ; // 26
                    "Sector not found"                        , ; // 27
                    "Printer out of paper"                    , ; // 28
                    "Write fault"                             , ; // 29
                    "Read fault"                              , ; // 30
                    "General failure"                         , ; // 31
                    "Sharing violation"                       , ; // 32
                    "Lock violation"                          , ; // 33
                    "Invalid disk change"                     , ; // 34
                    "FCB unavailable"                         , ; // 35
                    "Sharing buffer overflow"                 , ; // 36
                    , , , , , , , , , , , , ,                   ; // 37-49
                    "Network request not supported"           , ; // 50
                    "Remote computer not listening"           , ; // 51
                    "Duplicate name on network"               , ; // 52
                    "Network name not found"                  , ; // 53
                    "Network busy"                            , ; // 54
                    "Network device no longer exists"         , ; // 55
                    "Network BIOS command limit exceeded"     , ; // 56
                    "Network adapter hardware error"          , ; // 57
                    "Incorrect response from network"         , ; // 58
                    "Unexpected network error"                , ; // 59
                    "Incompatible remote adapter"             , ; // 60
                    "Print queue full"                        , ; // 61
                    "Not enough space for print file"         , ; // 62
                    "Print file deleted (not enough space)"   , ; // 63
                    "Network name deleted"                    , ; // 64
                    "Access denied"                           , ; // 65
                    "Network device type incorrect"           , ; // 66
                    "Network name not found"                  , ; // 67
                    "Network name limit exceeded"             , ; // 68
                    "Network BIOS session limit exceeded"     , ; // 69
                    "Temporarily paused"                      , ; // 70
                    "Network request not accepted"            , ; // 71
                    "Print or disk redirection paused"        , ; // 72
                    , , , , , , ,                               ; // 73-79
                    "File already exists"                     , ; // 80
                    , ; // 81
                    "Cannot make directory entry"             , ; // 82
                    "Fail on INT 24h"                         , ; // 83
                    "Too many redirections"                   , ; // 84
                    "Duplicate redirection"                   , ; // 85
                    "Invalid password"                        , ; // 86
                    "Invalid parameter"                       , ; // 87
                    "Network device fault"                    , ; // 88
                    ;
                    "Undefined or reserved error code!"         ; // +1
                  }

   /*
     Check that code number is within known upper limit,
     AND that a description is available For it.
   */
/*
   IF ( n > ( Len( desc_ ) - 1 ) ) .OR. ( desc_[ n ] == NIL )
      n := Len( desc_ )
   ENDIF
*/
   IF ( ( n < 1 ) .OR. n > ( Len( desc_ ) - 1 ) ) .OR. ( desc_[ n ] == NIL )
      n := Len( desc_ )
   ENDIF

   RETURN desc_[ n ]
winerror.prg300
STATIC FUNCTIONGenCodeText( n )
STATIC FUNCTION GenCodeText( n )

   LOCAL desc_ := { "EG_ARG", ; // 1
                    "EG_BOUND"               , ; // 2
                    "EG_STROVERFLOW"         , ; // 3
                    "EG_NUMOVERFLOW"         , ; // 4
                    "EG_ZERODIV"             , ; // 5
                    "EG_NUMERR"              , ; // 6
                    "EG_SYNTAX"              , ; // 7
                    "EG_COMPLEXITY"          , ; // 8
                    , ,                        ; // 9-10
                    "EG_MEM"                 , ; // 11
                    "EG_NOFUNC"              , ; // 12
                    "EG_NOMETHOD"            , ; // 13
                    "EG_NOVAR"               , ; // 14
                    "EG_NOALIAS"             , ; // 15
                    "EG_NOVARMETHOD"         , ; // 16
                    "EG_BADALIAS"            , ; // 17 (new w/ 5.01a)
                    "EG_DUPALIAS"            , ; // 18 (new w/ 5.01a)
                    ,                          ; // 19
                    "EG_CREATE"              , ; // 20
                    "EG_OPEN"                , ; // 21
                    "EG_CLOSE"               , ; // 22
                    "EG_READ"                , ; // 23
                    "EG_WRITE"               , ; // 24
                    "EG_PRINT"               , ; // 25
                    , , , ,                    ; // 26-29
                    "EG_UNSUPPORTED"         , ; // 30
                    "EG_LIMIT"               , ; // 31
                    "EG_CORRUPTION"          , ; // 32
                    "EG_DATATYPE"            , ; // 33
                    "EG_DATAWIDTH"           , ; // 34
                    "EG_NOTABLE"             , ; // 35
                    "EG_NOORDER"             , ; // 36
                    "EG_SHARED"              , ; // 37
                    "EG_UNLOCKED"            , ; // 38
                    "EG_READONLY"            , ; // 39
                    "EG_APPENDLOCK"          , ; // 40
                    ;
                    "Unknown or reserved"      ; // +1
                  }

   /*
     Check that code number is within known upper limit,
     AND that a description is available For it.
   */
/*
   IF ( n > ( Len( desc_ ) - 1 ) ) .OR. ( desc_[ n ] == NIL )
      n := Len( desc_ )
   ENDIF
*/
   IF ( ( n < 1 ) .OR. n > ( Len( desc_ ) - 1 ) ) .OR. ( desc_[ n ] == NIL )
      n := Len( desc_ )
   ENDIF

   RETURN NTRIM( n ) + ": " + desc_[ n ]
winerror.prg391
STATIC FUNCTIONeAlert( cMsg, aChoices, cDetail )
STATIC FUNCTION eAlert( cMsg, aChoices, cDetail )

   LOCAL aDlg, i, n, aChoose, aMsg
   LOCAL hWnd, hDC
   LOCAL lErr     := .F., w , h, t := 0, cTitle, Msgh, ButWidth
   LOCAL crPos    := 0, txth := 0, atm := { }
   LOCAL isDetail := .F.

   IF !ISCHARACTER( cMsg )
      cMsg := WHT_asString( cMsg )
   ENDIF
   cTitle := 'Alert'

   IF aChoices == NIL
      aChoices := { "&Ok" }
   ENDIF

   aAdd( achoices, "&Details >>" )

   cMsg := StrTran( cMsg, ";", CR )

   IF ( crPos := at( CR, cMsg ) ) > 0
      cTitle := Left( cMsg, crPos - 1 )
      cMsg := SubStr( cMsg, crPos + 1 )
   ENDIF

   hWnd := VWN_GetDesktopWindow( ) // default parent
   hDC  := VWN_GetDC( hWnd )

   //------------- total width without buttons

   w := VWN_GetTextExtentPoint32( hDC, AllTrim( cTitle ) ) [ 1 ]
   aMsg := WHT_str2a( cMsg, CR )
   AEVAL( aMsg, { | x | w := Max( w, VWN_GetTextExtentPoint32( hDC, AllTrim( x ) ) [ 1 ] ) } )
   w += 20

   //--------- total width of choices, also add "&" to the choices (if needed)

   n := Len( aChoices )
   aChoose := array( n )

   txth := 8 //ATM[TM_Height]
   Msgh := Len( aMsg ) * txth
   FOR i := 1 TO n
      ButWidth := Max( 20, VWN_GetTextExtentpoint32( hDC, aChoices[ i ] ) [ 1 ] + 6 )
      t := Max( t, ButWidth )
      aChoose[ i ] := iif( at( "&", aChoices[ i ] ) == 0, "&" + aChoices[ i ] , aChoices[ i ] )
   NEXT i

   VWN_ReleaseDC( , hDC )

   ButWidth := t / 2
   t *= ( n + 1 )
   w := Max( Max( w, t ) + 40, 500 ) // minimum dlg width
   h := Msgh + 33
   w /= 2

   //----------- create dialog

   aDlg := WHT_MakeDlgTemplate( cTitle, ;
                           WS_CAPTION + DS_MODALFRAME + WS_VISIBLE + 4 + WS_POPUP + DS_SETFONT , ;
                           0, 0, w, h, 8, 'MS Sans Serif' )

   FOR i := 1 TO n
      aDlg := WHT_AddDlgItem( aDlg, i, "BUTTON", ;
                         BS_PUSHBUTTON + WS_TABSTOP + WS_CHILD + WS_VISIBLE, ;
                         w - ( n - i ) * ( ButWidth + 5 ) - ButWidth - 5, h - 18, ButWidth, 14, ;
                         aChoose[ i ] )
   NEXT i

   aDlg := WHT_AddDlgItem( aDlg, - 1, "STATIC", ;
                      SS_CENTER + WS_CHILD + WS_VISIBLE, ;
                      10, 8, w - 20, Msgh, ;
                      cMsg )

   aDlg := WHT_AddDlgItem( aDlg, - 1, "BUTTON", ;
                      BS_GROUPBOX + WS_CHILD + WS_VISIBLE, ;
                      5, 1, w - 10, Msgh + 10, ;
                      "" )

   aDlg := WHT_AddDlgItem( aDlg, 101, "EDIT", ;
                      WS_CHILD + WS_VISIBLE + WS_BORDER + ES_MULTILINE + ES_READONLY + WS_VSCROLL + WS_TABSTOP, ;
                      5, h + 1, w - 10, 115, ;
                      cDetail )

   VWN_MessageBeep( MB_ICONHAND )
   i := WHT_DialogBox( , aDlg, hWnd, { | hDlg, nMsg, nwParam, nlParam | ;
                                  eAlertProc( hDlg, nMsg, nwParam, nlParam, @isDetail, hWnd, n ) } )
   VWN_SetFocus( hWnd )

   RETURN i
winerror.prg448
STATIC FUNCTIONeAlertProc( hDlg, nMsg, nwParam, nlParam, isDetail, hWnd, n )
STATIC FUNCTION eAlertProc( hDlg, nMsg, nwParam, nlParam, isDetail, hWnd, n )
   LOCAL aRect

   HB_SYMBOL_UNUSED( nlParam )

   DO CASE
   CASE nMsg == WM_INITDIALOG
      WHT_CenterWindow( hDlg, , , hWnd )
      WHT_SetOnTop( hDlg, HWND_TOPMOST )
      RETURN( 1 )

   CASE nMsg == WM_COMMAND
      IF 'Detail' $ VWN_GetDlgItemText( hDlg, nwParam )
         aRect := VWN_GetWindowRect( hDlg )
         IF isDetail
            VWN_SetDlgItemText( hDlg, nwParam, '&Detail >>' )
            VWN_MoveWindow( hDlg, aRect[ 1 ] , aRect[ 2 ] , aRect[ 3 ] - aRect[ 1 ] , aRect[ 4 ] - aRect[ 2 ] - 200, .T. )
            isDetail := .F.
         ELSE
            VWN_SetDlgItemText( hDlg, nwParam, '<< &Detail' )
            VWN_MoveWindow( hDlg, aRect[ 1 ] , aRect[ 2 ] , aRect[ 3 ] - aRect[ 1 ] , aRect[ 4 ] - aRect[ 2 ] + 200, .T. )
            isDetail := .T.
         ENDIF
      ELSE
         IF nwParam > 0 .AND. nwParam < n
            VWN_EndDialog( hDlg, nwParam )
         ENDIF
      ENDIF

   ENDCASE

   RETURN 0
winerror.prg540
winini.prg
TypeFunctionSourceLine
FUNCTIONWHT_GetPrivateProfileLog( cSection, cEntry, lDefault, cFile )
FUNCTION WHT_GetPrivateProfileLog( cSection, cEntry, lDefault, cFile )

  LOCAL cDefault:=iif(lDefault,"YES","NO")
  LOCAL cRet := VWN_GetPrivateProfileString(cSection, cEntry, cDefault, cFile )

  RETURN(UPPER(cRet) $ "YESON1")
winini.prg11
FUNCTIONWHT_GetPrivateProfileFloat(cSection, cEntry, nDefault, cFile )
FUNCTION WHT_GetPrivateProfileFloat(cSection, cEntry, nDefault, cFile )

  LOCAL cDefault:=STR(nDefault)
  LOCAL cRet:=VWN_GetPrivateProfileString(cSection, cEntry, cDefault, cFile )

  RETURN(VAL(cRet))
winini.prg18
FUNCTIONWHT_GetPrivateProfileDate( cSection, cEntry, dDefault, cFile )
FUNCTION WHT_GetPrivateProfileDate( cSection, cEntry, dDefault, cFile )

  LOCAL cDefault:=DTOS( dDefault )
  LOCAL cRet:=VWN_GetPrivateProfileString(cSection, cEntry, cDefault, cFile )

  RETURN(STOD( cRet ))
winini.prg25
FUNCTIONWHT_GetProfileLog( cSection, cEntry, lDefault )
FUNCTION WHT_GetProfileLog( cSection, cEntry, lDefault )

  LOCAL cDefault:=iif(lDefault,"YES","NO")
  LOCAL cRet:=VWN_GetProfileString(cSection, cEntry, cDefault )

  RETURN(UPPER(cRet) $ "YESON1")
winini.prg34
FUNCTIONWHT_GetProfileFloat(cSection, cEntry, nDefault )
FUNCTION WHT_GetProfileFloat(cSection, cEntry, nDefault )

  LOCAL cDefault := STR(nDefault)
  LOCAL cRet := VWN_GetProfileString(cSection, cEntry, cDefault )

  RETURN(VAL(cRet))
winini.prg41
FUNCTIONWHT_GetProfileDate( cSection, cEntry, dDefault )
FUNCTION WHT_GetProfileDate( cSection, cEntry, dDefault )

  LOCAL cDefault:=DTOS( dDefault )
  LOCAL cRet:=VWN_GetProfileString(cSection, cEntry, cDefault )

  RETURN(STOD( cRet ))
winini.prg48
FUNCTIONWHT_WritePrivateProfileInt( cSection, cEntry, nData, cFile )
FUNCTION WHT_WritePrivateProfileInt( cSection, cEntry, nData, cFile )

  RETURN( VWN_WritePrivateProfileString( cSection, cEntry, STR( INT(nData) ), cFile ) )
winini.prg57
FUNCTIONWHT_WritePrivateProfileLog( cSection, cEntry, lData, cFile )
FUNCTION WHT_WritePrivateProfileLog( cSection, cEntry, lData, cFile )

  RETURN( VWN_WritePrivateProfileString( cSection, cEntry, iif(lData,"Yes","No") , cFile ) )
winini.prg61
FUNCTIONWHT_WritePrivateProfileFloat( cSection, cEntry, nData, cFile )
FUNCTION WHT_WritePrivateProfileFloat( cSection, cEntry, nData, cFile )

  RETURN( VWN_WritePrivateProfileString( cSection, cEntry, STR( nData ) , cFile ) )
winini.prg65
FUNCTIONWHT_WritePrivateProfileDate( cSection, cEntry, dData, cFile )
FUNCTION WHT_WritePrivateProfileDate( cSection, cEntry, dData, cFile )

  RETURN( VWN_WritePrivateProfileString( cSection, cEntry, DTOS( dData ) , cFile ) )
winini.prg69
FUNCTIONWHT_WriteProfileLog( cSection, cEntry, lData )
FUNCTION WHT_WriteProfileLog( cSection, cEntry, lData )

  RETURN( VWN_WriteProfileString( cSection, cEntry, iif(lData,"Yes","No") ) )
winini.prg75
FUNCTIONWHT_WriteProfileFloat( cSection, cEntry, nData )
FUNCTION WHT_WriteProfileFloat( cSection, cEntry, nData )

  RETURN( VWN_WriteProfileString( cSection, cEntry, STR( nData ) ) )
winini.prg79
FUNCTIONWHT_WriteProfileDate( cSection, cEntry, dData )
FUNCTION WHT_WriteProfileDate( cSection, cEntry, dData )

  RETURN( VWN_WriteProfileString( cSection, cEntry, DTOS( dData ) ) )
winini.prg83
FUNCTIONWHT_WriteProfileInt( cSection, cEntry, nData )
FUNCTION WHT_WriteProfileInt( cSection, cEntry, nData )

  RETURN( VWN_WriteProfileString( cSection, cEntry, STR( INT(nData) ) ) )
winini.prg87
winrbar.prg
TypeFunctionSourceLine
CLASSWHT_REBAR
CLASS WHT_REBAR

   DATA hWnd
   DATA hParent
   DATA nStyle
   DATA nProc

   METHOD Init() Constructor
   METHOD Create()
   METHOD AddBand()
   METHOD rbProc()
   METHOD GetHeight()
   ACCESS height INLINE ::GetHeight()

   ENDCLASS
winrbar.prg101
WHT_REBAR:METHODGetHeight()
METHOD GetHeight()
   LOCAL aRect := VWN_GetWindowRect( ::hWnd )

   return aRect[4]-aRect[2]
winrbar.prg117
WHT_REBAR:METHODInit()
METHOD Init()

   VWN_InitCommonControlsEx( ICC_COOL_CLASSES )

   RETURN SELF
winrbar.prg122
WHT_REBAR:METHODCreate( hParent,nStyle )
METHOD Create( hParent,nStyle )

   ::hParent := hParent
   ::nStyle := IFNIL( nStyle,WS_VISIBLE+WS_BORDER+WS_CHILD+WS_CLIPCHILDREN+;
                             WS_CLIPSIBLINGS+RBS_VARHEIGHT+RBS_BANDBORDERS+;
                             CCS_NODIVIDER+CCS_NOPARENTALIGN+CCS_TOP,nStyle )

   ::hWnd := WHT_CreateWindowEx( WS_EX_TOOLWINDOW,;
                                 REBARCLASSNAME,;
                                 "",;
                                 ::nStyle,;
                                 0,0,200,100,;
                                 hParent,;
                                 1,;
                                 VWN_hInstance(),;
                                 0 )


   ::nProc := WHT_SetProcedure( ::hParent,{|hWnd, nMsg,nwParam,nlParam| ;
                HB_SYMBOL_UNUSED( hWnd ), ::rbProc( nMsg,nwParam,nlParam )}, { WM_SIZE } )

   // rbi:cbSize := rbi:sizeof()  // Required when using this struct.
   // rbi:fMask  := 0
   // rbi:himl   := 0

   VWN_SendMessage( ::hWnd, RB_SETBKCOLOR, 0, VWN_GetSysColor( COLOR_BTNFACE ) )
   // view SendMessage(::hWnd, RB_SETBARINFO, 0, rbi:value)

   return self
winrbar.prg128
WHT_REBAR:METHODrbProc( nMsg,nwParam,nlParam )
METHOD rbProc( nMsg,nwParam,nlParam )
   LOCAL acRect
   LOCAL aRect

   DO CASE
   CASE nMsg == WM_SIZE
      acRect := VWN_GetClientRect( ::hParent )
      aRect := VWN_GetWindowRect( ::hWnd )
      VWN_MoveWindow( ::hWnd, 0, 0, acRect[ 3 ], aRect[ 4 ]-aRect[ 2 ], .t. )

   ENDCASE

   RETURN VWN_CallWindowProc( ::nProc,::hParent,nMsg,nwParam,nlParam )
winrbar.prg158
WHT_REBAR:METHODAddBand( nMask,nStyle,hChild,cxMin,cyMin,cx,cText,hBmp,nPos )
METHOD AddBand( nMask,nStyle,hChild,cxMin,cyMin,cx,cText,hBmp,nPos )
   LOCAL rbBand IS REBARBANDINFO
   LOCAL aRect := VWN_GetWindowRect( hChild )

   HB_SYMBOL_UNUSED( nPos )

   rbBand:Reset()

   // Initialize structure members that most bands will share.
   rbBand:cbSize := rbBand:sizeof()  // Required

   rbBand:fMask  := IFNIL(nMask,RBBIM_TEXT +; //RBBIM_BACKGROUND +;
                                RBBIM_STYLE +RBBIM_CHILDSIZE+;
                                RBBIM_SIZE+RBBIM_CHILD,nMask)

   rbBand:fStyle     := IFNIL(nStyle,RBBS_GRIPPERALWAYS+RBBS_NOVERT/*+RBBS_CHILDEDGE*/,nStyle)// + RBBS_FIXEDBMP
   rbBand:hwndChild  := IFNIL(hChild,0,hChild)
   rbBand:cxMinChild := IFNIL(cxMin,aRect[3]-aRect[1],cxMin)
   rbBand:cyMinChild := IFNIL(cyMin,aRect[4]-aRect[2],cyMin)
   rbBand:cx         := IFNIL(cx,VWN_GetClientRect(::hParent)[3],cx)
   rbBand:lpText     := IFNIL(cText,"Test",cText)
   rbBand:hbmBack    := IFNIL(hBmp,0,hBmp) //VWN_LoadBitmap(hInstance(), "IDB_BACKGRND"),hBmp)

   // view rbBand,aRect,LoadBitmap(hInstance(), "IDB_BACKGRND"), rbBand:value

   // Add the band
   RETURN VWN_SendMessage(::hWnd, RB_INSERTBAND, -1, rbBand:value ) != 0
winrbar.prg173
wintabs.prg
TypeFunctionSourceLine
CLASSWHT_TabControl
CLASS WHT_TabControl

   DATA hParent
   DATA hTab   AS  NUMERIC
   DATA Tabs   AS  ARRAY HIDDEN
   DATA Dlgs   AS  ARRAY HIDDEN
   DATA Procs  AS  ARRAY HIDDEN
   DATA nCurSel
   DATA nProc
   DATA nId
   DATA Cargo

   METHOD New() CONSTRUCTOR
   METHOD TabProc()
   METHOD Add()
   METHOD Insert()
   METHOD Delete()
   METHOD Configure()
   METHOD AdjustRect()
   METHOD DeleteAll()
   METHOD DeselectAll()
   METHOD GetCurFocus()
   METHOD GetCurSel()
   METHOD GetExtendedStyle()
   METHOD GetImageList()
   METHOD GetItem()
   METHOD GetItemCount()
   METHOD GetItemRect()
   METHOD GetRowCount()
   METHOD GetToolTips()
   METHOD GetUnicodeFormat()
   METHOD HighlightItem()
   METHOD HitTest()
   METHOD RemoveImage()
   METHOD SetCurFocus()
   METHOD SetCurSel()
   METHOD SetExtendedStyle()
   METHOD SetImageList()
   METHOD SetItem()
   METHOD SetItemExtra()
   METHOD SetItemSize()
   METHOD SetMinTabWidth()
   METHOD SetPadding()
   METHOD SetToolTips()
   METHOD SetUnicodeFormat()

   ENDCLASS
wintabs.prg28
WHT_TABCONTROL:METHODNew( hDlg, nL, nT, nW, nH, nStyle, nSel,nId )
METHOD New( hDlg, nL, nT, nW, nH, nStyle, nSel,nId )
   ::hParent:=hDlg
   ::Tabs:={}
   ::Dlgs:={}
   ::Procs:={}
   ::nId := nId
   ::nCurSel := iif(nSel==NIL,1,nSel)
   ::hTab := VWN_TabCtrl_Create( hDlg, nL, nT, nW, nH, nStyle,nId )
   ::nProc := WHT_SetProcedure( hDlg, {|hDlg,nMsg,nwParam,nlParam|;
                   ::TabProc( hDlg,nMsg,nwParam,nlParam )} , { WM_NOTIFY } )

   RETURN Self
wintabs.prg77
STATIC FUNCTION_TempPageProc( nMsg )
STATIC FUNCTION _TempPageProc( nMsg )

   IF nMsg==WM_CTLCOLORDLG
      return( VWN_GetStockObject( NULL_BRUSH ) )
   END

   RETURN(0)
wintabs.prg90
WHT_TABCONTROL:METHODTabProc( hDlg, nMsg, nwParam, nlParam )
METHOD TabProc( hDlg, nMsg, nwParam, nlParam )
   LOCAL tnhdr
   LOCAL nSel

   IF nMsg == WM_NOTIFY

      tnhdr IS NMHDR
      tnhdr:Buffer( WHT_Peek( nlParam,tnhdr:sizeof() ) )

      IF tnhdr:code == 0//TCN_SELCHANGE

        nSel := VWN_TabCtrl_GetCurSel( ::hTab )+1
        IF ::nCursel != nSel
           VWN_ShowWindow(::Tabs[::nCurSel], SW_HIDE)
           ::nCurSel:=nSel
           VWN_ShowWindow(::Tabs[::nCurSel], SW_SHOW)
           /*
           IF ::nCurSel > 0

              //nLen:=len(::Tabs[::nCurSel])
              nLen:=iif(EMPTY(::Tabs[::nCurSel]),0,len(::Tabs[::nCurSel]))
              FOR n:=1 TO nLen
                 ::Tabs[::nCurSel,n,2]:=isWindowEnabled(::Tabs[::nCurSel,n,1])
                 ::Tabs[::nCurSel,n,3]:=isWindowVisible(::Tabs[::nCurSel,n,1])
                 ShowWindow(::Tabs[::nCurSel,n,1],SW_HIDE)
                 EnableWindow(::Tabs[::nCurSel,n,1],.F.)
              NEXT
           ENDIF

           ::nCurSel:=nSel
           nLen:=iif(EMPTY(::Tabs[::nCurSel]),0,len(::Tabs[::nCurSel]))

           FOR n:=1 TO nLen
              IF ::Tabs[::nCurSel,n,2]
                 EnableWindow(::Tabs[::nCurSel,n,1],.T.)
              ENDIF
              IF ::Tabs[::nCurSel,n,3]
                 ShowWindow(::Tabs[::nCurSel,n,1],SW_SHOW)
              ENDIF
           NEXT
           */

        ENDIF
      ENDIF
   ENDIF

   Return( VWN_CallWindowProc( ::nProc, hDlg, nMsg, nwParam, nlParam ) )
wintabs.prg101
WHT_TABCONTROL:METHODAdd(cText,cRes,bProc,nImgPos)
METHOD Add(cText,cRes,bProc,nImgPos)
   LOCAL hTab

   IF (hTab:=VWN_TabCtrl_AddItem(::hTab,cText,nImgPos)) > -1
      AADD(::Dlgs,cRes)
      AADD(::Tabs,NIL )
      AADD(::Procs,bProc)
   ENDIF

   RETURN(hTab)
wintabs.prg149
WHT_TABCONTROL:METHODInsert(nPos,cText,cRes,bProc,nImgPos)
METHOD Insert(nPos,cText,cRes,bProc,nImgPos)

   if VWN_TabCtrl_InsertItem(::hTab,cText,nPos,nImgpos) > -1
      AINS(::Dlgs,nPos,cRes,.T.)
      aIns(::Tabs,nPos,NIL,.T.)
      AINS(::Procs,nPos,bProc,.T.)
      RETURN(.T.)
   ENDIF

   return(.F.)
wintabs.prg160
WHT_TABCONTROL:METHODDelete(nPos)
METHOD Delete(nPos)
   Local nCount:=LEN(::Tabs)

   if nPos > 0 .and. nPos <= nCount
      IF nPos <= ::nCurSel     // verify !!!!!
        ::nCurSel--
      ENDIF
      VWN_TabCtrl_DeleteItem(nPos-1)
      ADel(::Dlgs,nPos,.t.)
      if VWN_IsWindow(::Tabs[nPos])
         VWN_DestroyWindow(::Tabs[nPos])
      endif
      ADel(::Tabs,nPos,.t.)
      ADEL(::Procs,nPos,.T.)
      return(.T.)
   Endif

   RETURN(.F.)
wintabs.prg171
WHT_TABCONTROL:METHODConfigure()
METHOD Configure()
   LOCAL aTab :=VWN_GetClientRect(::hTab)
   local acRect:={0,0,0,0}
   LOCAL aTemp
   LOCAL aWnd:={}
   LOCAL hCtrl
   LOCAL i
   LOCAL aPt

   aPt:={aTab[1],aTab[2]}
   VWN_ClientToScreen(::hTab   ,aPt)
   VWN_ScreenToClient(::hParent,aPt)
   aTab[1]:=aPt[1]
   aTab[2]:=aPt[2]

   aPt:={aTab[3],aTab[4]}
   VWN_ClientToScreen(::hTab   ,aPt)
   VWN_ScreenToClient(::hParent,aPt)
   aTab[3]:=aPt[1]
   aTab[4]:=aPt[2]


   IF LEN(::Tabs) > 0
      acRect:=VWN_TabCtrl_GetItemRect(::hTab,0)
      FOR i:=1 TO LEN(::Tabs)-1
         aTemp:=VWN_TabCtrl_GetItemRect(::hTab,i)
         acRect[1]:=MIN(acRect[1],aTemp[1])
         acRect[2]:=MIN(acRect[2],aTemp[2])
         acRect[3]:=MAX(acRect[3],aTemp[3])
         acRect[4]:=MAX(acRect[4],aTemp[4])
      NEXT
   ENDIF

   aPt:={acRect[1],acRect[2]}
   VWN_ClientToScreen(::hTab   ,aPt)
   VWN_ScreenToClient(::hParent,aPt)
   acRect[1]:=aPt[1]
   acRect[2]:=aPt[2]
   /*
   aPt:={acRect[3],acRect[4]}
   ClientToScreen(::hTab   ,aPt)
   ScreenToClient(::hParent,aPt)
   acRect[3]:=aPt[1]
   acRect[4]:=aPt[2]
   */
   FOR i:=1 TO LEN(::Dlgs)
      IF ::Dlgs[i] != NIL .AND. EMPTY( ::Tabs[ i ] )

         hCtrl := CreatePage( ::Dlgs[i],::hParent,::Procs, i )
         ::Tabs[i]:=hCtrl
         VWN_MoveWindow( hCtrl, acRect[1]+4, acRect[2]+acRect[4]+4, aTab[3]-aTab[1]-8, aTab[4]-(acRect[4]+acRect[2])- 8, .F. )
         IF i != ::nCurSel
            VWN_ShowWindow(hCtrl,SW_HIDE)
         ENDIF
      ENDIF
   NEXT

   RETURN(self)
wintabs.prg190
STATIC FUNCTIONCreatePage(acRes,hParent,aProcs, i)
Static Function CreatePage(acRes,hParent,aProcs, i)
   Local bBlock := iif(valtype( aProcs[i])== "B", aProcs[i], {|nMsg| _TempPageProc(nMsg)} )

   RETURN WHT_CreateDialog( , acRes, hParent, bBlock )
wintabs.prg249
WHT_TABCONTROL:METHODAdjustRect(lDisplay,aRect)
METHOD AdjustRect(lDisplay,aRect)

   VWN_TabCtrl_AdjustRect(::hTab,lDisplay,@aRect)

   RETURN(aRect)
wintabs.prg254
WHT_TABCONTROL:METHODDeleteAll()
METHOD DeleteAll()
  Local lRet:=VWN_TabCtrl_DeleteAllItems(::hTab)

  AEVAL(::Tabs,{|hWnd| iif(VWN_IsWindow(hWnd),VWN_DestroyWindow(hWnd),)})
  ::Tabs:={}
  ::aDlg:={}
  ::Procs:={}
  ::nCurSel:=0

  RETURN(lRet)
wintabs.prg260
WHT_TABCONTROL:METHODDeselectAll(lExcludeFocus)
METHOD DeselectAll(lExcludeFocus)

   VWN_TabCtrl_DeselectAll(::hTab,lExcludeFocus)

   RETURN(NIL)
wintabs.prg271
WHT_TABCONTROL:METHODGetCurFocus()
METHOD GetCurFocus()

  RETURN VWN_TabCtrl_GetCurFocus(::hTab )+1
wintabs.prg277
WHT_TABCONTROL:METHODGetCurSel()
METHOD GetCurSel()

   RETURN VWN_TabCtrl_GetCurSel(::hTab)+1
wintabs.prg281
WHT_TABCONTROL:METHODGetExtendedStyle()
METHOD GetExtendedStyle()

   RETURN VWN_TabCtrl_GetExtendedStyle(::hTab)
wintabs.prg285
WHT_TABCONTROL:METHODGetImageList()
METHOD GetImageList()

   RETURN NIL //TabCtrl_GetImageList(::hTab)
wintabs.prg289
WHT_TABCONTROL:METHODGetItem(nItem,ptrItem)
METHOD GetItem(nItem,ptrItem)

   RETURN VWN_TabCtrl_GetItem(::hTab,nItem-1,@ptrItem)
wintabs.prg293
WHT_TABCONTROL:METHODGetItemCount()
METHOD GetItemCount()

   RETURN VWN_TabCtrl_GetItemCount(::hTab)
wintabs.prg297
WHT_TABCONTROL:METHODGetItemRect(nItem)
METHOD GetItemRect(nItem)

   RETURN VWN_TabCtrl_GetItemRect(::hTab,nItem-1)
wintabs.prg301
WHT_TABCONTROL:METHODGetRowCount()
METHOD GetRowCount()

   RETURN VWN_TabCtrl_GetRowCount(::hTab)
wintabs.prg305
WHT_TABCONTROL:METHODGetToolTips()
METHOD GetToolTips()

   RETURN VWN_TabCtrl_GetToolTips(::hTab)
wintabs.prg309
WHT_TABCONTROL:METHODGetUnicodeFormat()
METHOD GetUnicodeFormat()

   RETURN VWN_TabCtrl_GetUnicodeFormat(::hTab)
wintabs.prg313
WHT_TABCONTROL:METHODHighlightItem(nItem,nHighlight)
METHOD HighlightItem(nItem,nHighlight)

   RETURN VWN_TabCtrl_HighlightItem(::hTab,nItem-1,nHighlight)
wintabs.prg317
WHT_TABCONTROL:METHODHitTest(nPtrHitTestInfo)
METHOD HitTest(nPtrHitTestInfo)

   RETURN VWN_TabCtrl_HitTest(::hTab,nPtrHitTestInfo) + 1
wintabs.prg321
WHT_TABCONTROL:METHODRemoveImage(nImageIndex)
METHOD RemoveImage(nImageIndex)

   RETURN VWN_TabCtrl_RemoveImage(::hTab, nImageIndex-1)
wintabs.prg325
WHT_TABCONTROL:METHODSetCurFocus(nItem)
METHOD SetCurFocus(nItem)

   VWN_TabCtrl_SetCurFocus( ::hTab, nItem-1 )

   RETURN(NIL)
wintabs.prg329
WHT_TABCONTROL:METHODSetCurSel(nItem)
METHOD SetCurSel(nItem)

   RETURN VWN_TabCtrl_SetCurSel(::hTab, nItem-1) + 1
wintabs.prg335
WHT_TABCONTROL:METHODSetExtendedStyle(nExStyle)
METHOD SetExtendedStyle(nExStyle)

   RETURN VWN_TabCtrl_SetExtendedStyle(::hTab,nExStyle)
wintabs.prg339
WHT_TABCONTROL:METHODSetImageList(hImageList)
METHOD SetImageList(hImageList)

   RETURN VWN_TabCtrl_SetImageList(::hTab, hImageList)
wintabs.prg343
WHT_TABCONTROL:METHODSetItem(nItem, cText)
METHOD SetItem(nItem, cText)

   RETURN VWN_TabCtrl_SetItem(::hTab, nItem-1, cText )
wintabs.prg347
WHT_TABCONTROL:METHODSetItemExtra(nBytes)
METHOD SetItemExtra(nBytes)

   RETURN VWN_TabCtrl_SetItemExtra(::hTab, nBytes)
wintabs.prg351
WHT_TABCONTROL:METHODSetItemSize(x,y)
METHOD SetItemSize(x,y)

   RETURN VWN_TabCtrl_SetItemSize(::hTab, x, y )
wintabs.prg355
WHT_TABCONTROL:METHODSetMinTabWidth(dx)
METHOD SetMinTabWidth(dx)

   RETURN VWN_TabCtrl_SetMinTabWidth( ::hTab, dx )
wintabs.prg359
WHT_TABCONTROL:METHODSetPadding( cx, cy )
METHOD SetPadding( cx, cy )

   VWN_TabCtrl_SetPadding( ::hTab, cx, cy )

   RETURN(NIL)
wintabs.prg363
WHT_TABCONTROL:METHODSetToolTips( hToolTips )
METHOD SetToolTips( hToolTips )

   VWN_TabCtrl_SetToolTips( ::hTab, hToolTips )

   RETURN(NIL)
wintabs.prg369
WHT_TABCONTROL:METHODSetUnicodeFormat( lUnicode )
METHOD SetUnicodeFormat( lUnicode )

   RETURN VWN_TabCtrl_SetUnicodeFormat( ::hTab, lUnicode )
wintabs.prg375
wintbar.prg
TypeFunctionSourceLine
CLASSWHT_TOOLBAR
CLASS WHT_TOOLBAR

   DATA abuttons
   DATA aBitmaps
   DATA hParent
   DATA hWnd
   DATA nId
   DATA nStyle
   DATA Created
   DATA aText
   DATA hBmp
   DATA nProc
   DATA aTips
   DATA nBtn HIDDEN
   DATA aMenus

   METHOD Init() CONSTRUCTOR

   METHOD AddButton
   METHOD AddBitmap
   METHOD AddString
   METHOD Create
   METHOD createbuttons
   METHOD tbProc

   METHOD setsizes(xBtn,yBtn,xImg,yImg )
   METHOD setheight(nHeight )
   METHOD loadbitmap
   METHOD setbitmap
   METHOD setbuttons
   METHOD commandtoindex
   METHOD GetItemId
   METHOD getitemrect
   METHOD getbuttonstyle
   METHOD getbuttoninfo
   METHOD setbuttoninfo
   METHOD getbuttontext
   METHOD setbuttontext
   METHOD gettollbarctrl
   METHOD disable
   METHOD enable
   METHOD disableall
   METHOD enableall
   METHOD CheckButton
   METHOD IsButtonChecked
   METHOD AddMenu

   ENDCLASS
wintbar.prg80
WHT_TOOLBAR:METHODInit()
METHOD Init()

   VWN_InitCommonControlsEx( ICC_BAR_CLASSES )

   ::aButtons:={}
   ::aTips   :={}
   ::nStyle  :=0
   ::nId     :=0
   ::Created := .F.
   ::aText   :={}
   ::aBitmaps:={}
   ::aMenus  :={}

   RETURN(self)
wintbar.prg129
WHT_TOOLBAR:METHODAddBitmap(hInst, nhIdBmp, nButtons)
METHOD AddBitmap(hInst, nhIdBmp, nButtons)
   LOCAL tbab IS TBADDBITMAP

   DEFAULT nButtons TO 1

   tbab:hInst := hInst
   tbab:nId   := nhIdBmp

   AADD(::aBitmaps,{tbab,nButtons})
   IF ::created
     VWN_SendMessage(::hWnd,TB_ADDBITMAP,nButtons,tbab:value)
   ENDIF

   RETURN(1)
wintbar.prg144
WHT_TOOLBAR:METHODAddButton(nIndex, nId, nState, nStyle, ncargo, nString, cText, cToolTip )
METHOD AddButton(nIndex, nId, nState, nStyle, ncargo, nString, cText, cToolTip )
   LOCAL tbb IS TBBUTTON

   HB_SYMBOL_UNUSED( cText )

   tbb:ibitmap   :=IFNIL( nIndex,-1,nIndex )
   tbb:idCommand :=nId // must be supplied
   tbb:fsState   :=IFNIL( nState,TBSTATE_ENABLED,nState )
   tbb:fsStyle   :=IFNIL( nStyle,TBSTYLE_BUTTON,nStyle )
   tbb:dwData    :=IFNIL( ncargo,0,nCargo )
   tbb:iString   :=IFNIL( nString,0,nString )

   AADD( ::aButtons,tbb )
   AADD( ::aTips,cToolTip )
   IF ::Created
      VWN_SendMessage( ::hWnd,TB_ADDBUTTONS,1,tbb:value )
   Endif

   RETURN(self)
wintbar.prg159
WHT_TOOLBAR:METHODAddMenu(nButton, nMenuId, cMenuText )
METHOD AddMenu(nButton, nMenuId, cMenuText )
   AADD( ::aMenus,{nButton, nMenuId, cMenuText })
   return( self )
wintbar.prg179
WHT_TOOLBAR:METHODaddstring( cText )
METHOD addstring( cText )

   IF ::created
      VWN_SendMessage( ::hWnd,TB_ADDSTRING,0,cText )
   Else
      AADD( ::aText,cText )
   Endif

   RETURN( self )
wintbar.prg183
WHT_TOOLBAR:METHODCreate(hParent,nStyle,nId,nImg,hBMInst,nBMId,xBtn,yBtn,xBmp,yBmp)
METHOD Create(hParent,nStyle,nId,nImg,hBMInst,nBMId,xBtn,yBtn,xBmp,yBmp)
   LOCAL cButtons:=""
   LOCAL cStrings:=""
   LOCAL tbb IS TBBUTTON
   LOCAL i


   ::hParent := hParent
   ::nStyle  := IFNIL( nStyle,TBSTYLE_FLAT+WS_CHILD+WS_VISIBLE,nStyle )
   ::nId     := IFNIL( nId,0,nId)

   if ISNIL(hBMInst) .AND. ISNIL(nBMId)
     hBMInst:=HINST_COMMCTRL
     nBMId  :=IDB_STD_LARGE_COLOR
   endif

   FOR i:=1 TO LEN(::aButtons)
      cButtons+=::aButtons[i]:Value
   NEXT

// ::hWnd:=CreateWindowEx(0,TOOLBARCLASSNAME,"",::nStyle,0,0,300,30,::hParent,::nId)


   ::hWnd := VWN_CreateToolBarEx(::hParent,::nStyle,::nId,nImg,hBMInst,nBMId,cButtons,LEN(::aButtons),;
                                  xbtn,yBtn,xBmp,yBmp, tbb:sizeof())

   ::nProc := WHT_SetProcedure( ::hParent,{|hWnd, nMsg,nwParam,nlParam| HB_SYMBOL_UNUSED( hWnd ), ;
                                  ::tbProc(nMsg,nwParam,nlParam)},{WM_NOTIFY})


//   SendMessage(::hWnd,TB_BUTTONSTRUCTSIZE,::aButtons[1]:sizeof,0)

 //  FOR i:=1 TO LEN(::aBitmaps)
 //    SendMessage(::hWnd,TB_ADDBITMAP,::aBitmaps[i,2],::aBitmaps[i,1]:value)
 //  NEXT

   VWN_SendMessage( ::hwnd,TB_SETEXTENDEDSTYLE,0,TBSTYLE_EX_DRAWDDARROWS )

   //SendMessage(::hWnd,TB_ADDBUTTONS,LEN(::aButtons),cButtons)

   FOR i := 1 to LEN( ::aText )
      VWN_SendMessage( ::hWnd,TB_ADDSTRING,0,::aText[ i ] )
   NEXT

   ::Created := .T.

   RETURN( ::hWnd )
wintbar.prg197
WHT_TOOLBAR:METHODtbProc(nMsg,nwParam,nlParam)
METHOD tbProc(nMsg,nwParam,nlParam)
   LOCAL Hdr
   LOCAL Ttt
   LOCAL nmt
   LOCAL hMenu,aRect, aPoint
   LOCAL n,x

   DO CASE
   CASE nMsg == WM_NOTIFY
     Hdr IS NMHDR
     Hdr:Buffer( WHT_Peek(nlParam,Hdr:sizeof))

     DO CASE
     CASE Hdr:code==TBN_DROPDOWN
         Nmt IS NMTOOLBAR
         nmt:buffer( WHT_Peek(nlParam,nmt:sizeof))
         IF (n:=ASCAN( ::aMenus,{|a| a[1]==nmt:iItem})) > 0
            ::nBtn:=nmt:iItem
            hMenu := VWN_CreatePopupMenu()
            FOR x:=1 TO len(::aMenus)
                IF ::aMenus[x][1] == nmt:iItem
                   IF ::aMenus[x][3] == "-".and. ::aMenus[x][2] == 0
                      VWN_AppendMenu( hMenu, MF_SEPARATOR )
                     ELSE
                      VWN_AppendMenu( hMenu, MF_ENABLED + MF_STRING,::aMenus[x][2],::aMenus[x][3])
                   ENDIF
                ENDIF
            NEXT

            x := ASCAN( ::aButtons,{|btn| btn:idCommand==nmt:iItem } )
            aRect := VWN_GetToolBarItemRect( ::hWnd,x-1 )
            aPoint := { aRect[ 1 ],aRect[ 4 ] }
            VWN_ClientToScreen( ::hParent, @aPoint )
            VWN_TrackPopupMenu( hMenu, TPM_LEFTALIGN+TPM_TOPALIGN, aPoint[1]+9, aPoint[2], 0, ::hWnd )
            VWN_DestroyMenu( hMenu )
            RETURN 0
         end
     CASE Hdr:code==TTN_NEEDTEXT
       IF (n := ASCAN(::aButtons,{|btn| btn:idCommand==Hdr:idFrom})) > 0
         Ttt IS TOOLTIPTEXT
         Ttt:Buffer( WHT_Peek(nlParam,Ttt:sizeof))
         Ttt:lpszText:=::aTips[n] //"ID:"+STR(Hdr:IdFrom)
         WHT_Poke(nlParam,Ttt:value,Ttt:sizeof)
       ENDIF

     CASE Hdr:code==TBN_QUERYINSERT
         RETURN(1)
     CASE Hdr:code==TBN_QUERYDELETE
         RETURN(1)
     CASE Hdr:code==TBN_GETBUTTONINFO
         Nmt IS NMTOOLBAR
         nmt:buffer( WHT_Peek(nlParam,nmt:sizeof))
         /*
         int     iItem;      // cmd
         TBBUTTON tbButton;
         int     cchText;    // str len
         LPSTR   pszText;    // btn text
         RECT    rcButton;   // new (!)
         */
         RETURN(1)

     ENDCASE
   ENDCASE

   RETURN( VWN_CallWindowProc( ::nProc,::hParent,nMsg,nwParam,nlParam ) )
wintbar.prg257
WHT_TOOLBAR:METHODCreateButtons()
METHOD CreateButtons()
   LOCAL i

   FOR i:=1 TO LEN( ::aBitmaps )
   NEXT

   RETURN(NIL)
wintbar.prg323
WHT_TOOLBAR:METHODSetSizes( xBtn,yBtn,xImg,yImg )
METHOD SetSizes( xBtn,yBtn,xImg,yImg )

   HB_SYMBOL_UNUSED( xBtn )
   HB_SYMBOL_UNUSED( yBtn )
   HB_SYMBOL_UNUSED( xImg )
   HB_SYMBOL_UNUSED( yImg )

   RETURN(self)
wintbar.prg331
WHT_TOOLBAR:METHODSetHeight(nHeight )
METHOD SetHeight(nHeight )

   HB_SYMBOL_UNUSED( nHeight )

   RETURN(self)
wintbar.prg340
WHT_TOOLBAR:METHODloadbitmap
METHOD loadbitmap
   RETURN(self)
wintbar.prg346
WHT_TOOLBAR:METHODsetbitmap
METHOD setbitmap
   RETURN(self)
wintbar.prg349
WHT_TOOLBAR:METHODsetbuttons
METHOD setbuttons
   RETURN(self)
wintbar.prg352
WHT_TOOLBAR:METHODcommandtoindex
METHOD commandtoindex
   RETURN(self)
wintbar.prg355
WHT_TOOLBAR:METHODGetItemId
METHOD GetItemId
   RETURN(self)
wintbar.prg358
WHT_TOOLBAR:METHODgetitemrect(nIndex)
METHOD getitemrect(nIndex)
   RETURN( VWN_GetToolbarItemRect( ::hWnd,nIndex ) )
wintbar.prg361
WHT_TOOLBAR:METHODgetbuttonstyle
METHOD getbuttonstyle
   RETURN(self)
wintbar.prg364
WHT_TOOLBAR:METHODgetbuttoninfo
METHOD getbuttoninfo
   RETURN(self)
wintbar.prg367
WHT_TOOLBAR:METHODsetbuttoninfo
METHOD setbuttoninfo
   RETURN(self)
wintbar.prg370
WHT_TOOLBAR:METHODgetbuttontext
METHOD getbuttontext
   RETURN(self)
wintbar.prg373
WHT_TOOLBAR:METHODsetbuttontext
METHOD setbuttontext
   RETURN(self)
wintbar.prg376
WHT_TOOLBAR:METHODgettollbarctrl
METHOD gettollbarctrl
   RETURN(self)
wintbar.prg379
WHT_TOOLBAR:METHODdisable(nBtn)
METHOD disable(nBtn)
   VWN_SendMessage( ::hWnd,TB_ENABLEBUTTON,nBtn,0 )
   RETURN( SELF )
wintbar.prg382
WHT_TOOLBAR:METHODenable(nBtn,lFlag)
METHOD enable(nBtn,lFlag)
   DEFAULT lFlag TO .T.
   VWN_SendMessage(::hWnd,TB_ENABLEBUTTON,nBtn,iif(lFlag,1,0))
   RETURN(SELF)
wintbar.prg386
WHT_TOOLBAR:METHODDisableAll()
METHOD DisableAll()
   AEVAL(::aButtons,{|btn| ::disable( btn:idCommand )})
   return(self)
wintbar.prg391
WHT_TOOLBAR:METHODEnableAll()
METHOD EnableAll()
   AEVAL(::aButtons,{|btn| ::enable( btn:idCommand )})
   return(self)
wintbar.prg395
WHT_TOOLBAR:METHODCheckButton(nBtn,lFlag)
METHOD CheckButton(nBtn,lFlag)
   DEFAULT lFlag TO !::IsButtonChecked(nBtn)
   VWN_SendMessage( ::hWnd,TB_CHECKBUTTON,nBtn,iif( lFlag,1,0 ) )
   RETURN(SELF)
wintbar.prg399
WHT_TOOLBAR:METHODIsButtonChecked(nBtn)
METHOD IsButtonChecked(nBtn)
   RETURN( IIF( VWN_SendMessage(::hWnd,TB_ISBUTTONCHECKED,nBtn,0 )==0,.F.,.T. ) )
wintbar.prg404

Page url: http://www.yourdomain.com/help/index.html?hbwhat32.htm