OT: TS.exe ( text find ) utility replacement

OT: TS.exe ( text find ) utility replacement

Postby Rick Lipkin » Thu Jul 30, 2015 12:24 pm

To All

There are some 16 bit tools I truly enjoy and one of them is Ts.Exe from the old Norton utilities. I use it all the time to find snippets of text I wish to find in my *.prg's. I have looked over the internet and can not seem to find a suitable 32 bit replacement.

Anyone have any suggestions ?

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: OT: TS.exe ( text find ) utility replacement

Postby cnavarro » Thu Jul 30, 2015 12:26 pm

Rick, Total Commander?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: OT: TS.exe ( text find ) utility replacement

Postby Rick Lipkin » Thu Jul 30, 2015 12:43 pm

Cristobal

Thank you for your kind suggestion .. Total Commander is a bit too complicated for me .. it was so nice with Ts.exe that it actually showed you the line of text it found with the line number and filename.

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: OT: TS.exe ( text find ) utility replacement

Postby Euclides » Thu Jul 30, 2015 1:41 pm

Hi, I use the DOS Command FINDSTR
Example: FINDSTR /i /n /c:"hello world" *.prg
HTH
Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: OT: TS.exe ( text find ) utility replacement

Postby karinha » Thu Jul 30, 2015 1:51 pm

Hello Rick, use xDevStudio

http://www.vailton.com.br/


Image

Regards,
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7821
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: OT: TS.exe ( text find ) utility replacement

Postby Rick Lipkin » Thu Jul 30, 2015 2:13 pm

To All

Had to bite the bullet and load DosBox .. was hoping for another solution ... Still open to other options.

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: OT: TS.exe ( text find ) utility replacement

Postby Armando » Thu Jul 30, 2015 2:17 pm

Rick:

You've seen MED CX?

http://www.med-editor.com/indexus.html

Menu FIND sub menú FIND IN FILES ...

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3226
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: OT: TS.exe ( text find ) utility replacement

Postby Rick Lipkin » Thu Jul 30, 2015 2:43 pm

Armando

Thank you for your reply .. I am looking for a Command line prompt utility that I can run that will scan all *.filetype for a specific test string within the .prg

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: OT: TS.exe ( text find ) utility replacement

Postby James Bott » Thu Jul 30, 2015 3:15 pm

Rick,

This is not a command line program but it does what you want and very well. I have been using it for years.

Copernic Desktop Search http://www.copernic.com/en/products/desktop-search/features/

There is a free 30 day trial version so you have nothing to loose by trying it.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: OT: TS.exe ( text find ) utility replacement

Postby James Bott » Thu Jul 30, 2015 3:44 pm

Rick,

I forgot to mention that Copernic Search indexes everything when the computer is idle so searches are extremely fast, since it just searches it's own index.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: OT: TS.exe ( text find ) utility replacement

Postby wilsongamboa » Thu Jul 30, 2015 3:54 pm

Rick Good Morning
I Use this little utility i Wrote in harbour for my own use
Code: Select all  Expand view


#define  CRLF  chr(13) + chr(10)

function main( cSearch, cText, cPar )

    local aFiles
    local i
    local j
    local cFile
    local cTextInFile
    local aLines
    local CntLines
    local aResult
    local cResult
    local lBrowse       := .f.

    if empty( cSearch )
        cSearch = '*.*'
    end

    if !empty( cPar )
        cPar = lower ( alltrim( cPar ) )
    else
        cPar = ''
    end

    if !empty( cPar )
        cPar = strtran( cPar, '-', '' )
        do case
            case cPar == 'browse'
                lBrowse = .t.
        end
    end

    if empty( cText )
        help()
        quit
    end

    cText = alltrim( cText )
    if left( cText, 1 ) == '"' .or. left( cText, 1 ) == "'"
        ctext = substr( cText, 2 )
    end

    if right( cText, 1 ) == '"' .or. right( cText, 1 ) == "'"
        ctext = substr( cText, 1, len( ctext ) - 1 )
    end

    //? ctext

    aFiles = directory( cSearch )

    if len( aFiles ) == 0
        ? 'no se hallan archivos con el criterio ' + cSearch
        return nil
    end

    CntLines = 0

    //alert( str( len( aFiles ) ) )
    cls
    cResult = ''
    for i = 1 to len( aFiles )
        cFile       = aFiles[ i, 1 ]
        cTextInFile = memoread( cFile )
        aLines      = hb_aTokens( cTextInFile, CRLF )
        for j = 1 to len( aLines )
            if lower(ctext) $ lower( aLines[ j ] )
                if !lbrowse
                    ? cFile, str( j, 5 ), aLines[ j ]
                end
                cResult += cFile + ' ' + str( j, 5 )+ ' ' + aLines[ j ] + CRLF
                ++CntLines
                if CntLines > 21 .and. !lbrowse
                    inkey( 0)
                    cls
                    CntLines = 0
                end
            end
        next
    next

    if lbrowse
        memoedit( cResult, 0, 0, maxrow(), maxcol() )
    end


return nil


function help()

    ? 'utilitarios para grupo JoseNet'
    ? "Copyright ( c ) Wilson 'W' Gamboa A"
    ? "todos los derechos reservados"
    ? "no se da garantia de su uso  "
    ? "si le es util uselo bajo su propio riesgo"
    ? 'ts buscador de datos dentro de archivos'
    ? 'forma de invocarle'
    ? 'ts *.* "hola" '
    ? 'donde *.* es el patron de archivos a analizar'
    ? 'donde "hola" es el texto a buscar en el archivo'
    ? 'este utilitario solo sirve para archvos de texto'
    ? 'la salida tiene el formato '
    ? 'archivo linea texto de la linea'
    ? 'cada 22 lineas se para y debemos digitar una tecla'
    ? 'para continuar en la siguiente pagina'

return nil
 


Best regards
Wilson
Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
User avatar
wilsongamboa
 
Posts: 593
Joined: Wed Oct 19, 2005 6:41 pm
Location: Quito - Ecuador

Re: OT: TS.exe ( text find ) utility replacement

Postby Rick Lipkin » Thu Jul 30, 2015 5:34 pm

James and Wilson

Thank you both for your suggestions !

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: OT: TS.exe ( text find ) utility replacement

Postby csincuir » Thu Jul 30, 2015 9:25 pm

Also, you can use: fileseek
https://www.fileseek.ca/

It's free.

Best regards.

Carlos.
csincuir
 
Posts: 407
Joined: Sat Feb 03, 2007 6:36 am
Location: Guatemala

Re: OT: TS.exe ( text find ) utility replacement

Postby rhlawek » Fri Jul 31, 2015 12:20 am

Rick,

I don't know ts.exe and have never used it myself, but this utility purports to be a modern remake.

http://gverkade.home.xs4all.nl/ts/

Robb
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: OT: TS.exe ( text find ) utility replacement

Postby pgfdz » Fri Jul 31, 2015 7:00 am

Hi
This code is a sample.

Code: Select all  Expand view

#include "fivewin.ch"
#include "Directry.ch"

#define ODT_MENU        1
#define ODT_LISTBOX     2
#define ODT_COMBOBOX    3
#define ODT_BUTTON      4
#define ODA_DRAWENTIRE  0x0001
#define ODA_SELECT      0x0002
#define ODA_FOCUS       0x0004
#define ODS_SELECTED    0x0001
#define ODS_GRAYED      0x0002
#define ODS_DISABLED    0x0004
#define ODS_CHECKED     0x0008
#define ODS_FOCUS       0x0010
#define ODS_DEFAULT         0x0020
#define ODS_COMBOBOXEDIT    0x1000

#define COLOR_HIGHLIGHTTEXT  14
#define COLOR_HIGHLIGHT      13

#define ETO_OPAQUE                   0x0002
#define ETO_CLIPPED                  0x0004

#define DT_TOP                      0x00000000
#define DT_LEFT                     0x00000000
#define DT_CENTER                   0x00000001
#define DT_RIGHT                    0x00000002
#define DT_VCENTER                  0x00000004
#define DT_BOTTOM                   0x00000008
#define DT_WORDBREAK                0x00000010
#define DT_SINGLELINE               0x00000020
#define DT_EXPANDTABS               0x00000040
#define DT_TABSTOP                  0x00000080
#define DT_NOCLIP                   0x00000100
#define DT_EXTERNALLEADING          0x00000200
#define DT_CALCRECT                 0x00000400
#define DT_NOPREFIX                 0x00000800
#define DT_INTERNAL                 0x00001000


static oWnd := nil
static oLbx
static oFont
static lCancel := .f.
static cBuscando



function main()


local oDlg
local lValid := .f.
local aRect
local oCbxFind, aCbxFind := {}
local oCbxTipos, aCbxTipos := {}
local oCbxRutas, aCbxRutas := {}
local oBtnDir
local oChkMay, lMay := .f.
local oChkRec, lRec := .t.
local oChkExp, lExp := .f.
local cTipos := padr("*.PRG", 255 )  //hb_CurDrive() + ":\" +
local cRutas := padr( GetCurDir(), 255)
local cDir
local aLines := {}
local cVar := ""
local cFind := space(255)

//DEFAULT nShow := 0

DEFINE DIALOG oDlg NAME 1001

       REDEFINE COMBOBOX oCbxFind  VAR cFind  ID 104 ITEMS aCbxFind  OF oDlg
       REDEFINE COMBOBOX oCbxTipos VAR cTipos ID 105 ITEMS aCbxTipos OF oDlg
       REDEFINE COMBOBOX oCbxRutas VAR cRutas ID 106 ITEMS aCbxRutas OF oDlg

       REDEFINE BUTTON oBtnDir ID 108 OF oDlg ACTION ( cDir := cGetDir("Seleccione Ruta", alltrim( cRutas ) ),;
                                                       if( !empty( cDir ),;
                                                           (if(!oCbxRutas:Find(cDir),oCbxRutas:Add( cDir ),),;
                                                                oCbxRutas:oGet:VarPut( cDir ), oCbxRutas:oGet:Refresh()),))

       REDEFINE CHECKBOX oChkMay VAR lMay ID 101 OF oDlg
       REDEFINE CHECKBOX oChkRec VAR lRec ID 102 OF oDlg
       //REDEFINE CHECKBOX oChkExp VAR lExp ID 103 OF oDlg

       REDEFINE BUTTON ID 1 OF oDlg ACTION ( ShowWndFind(), if(!oCbxFind:Find(cFind),oCbxFind:Add( cFind ),),;
                                             Buscar( oCbxFind, oCbxTipos, oCbxRutas, lMay, lRec, lExp))
       REDEFINE BUTTON ID 2 OF oDlg ACTION lCancel := .t., oDlg:End()

ACTIVATE DIALOG oDlg CENTERED ON INIT oCbxFind:SetFocus()//VALID lValid

return nil

function Buscando( c )
if c != nil; cBuscando := c; endif
return cBuscando

function ShowWndFind()
local cVar
local aLines := {}


DEFINE FONT oFont NAME "Courier New" SIZE 0, -12

if oWnd == nil

   DEFINE WINDOW oWnd  ;
          TITLE "Buscar en ficheros" ;
          FROM 150, 150 TO 520, 700 PIXEL ;
          COLOR 0, CLR_WHITE

     @ 0, 0 LISTBOX oLbx VAR cVar ITEMS aLines SIZE 500, 300 PIXEL OF oWnd FONT oFont ON DBLCLICK AbreFichero() ;
            COLOR 0, CLR_WHITE BITMAPS {0}

            oLbx:bRClicked := {| nRow, nCol | Contextual( nRow, nCol ) }

            oLbx:nBmpHeight := 20 //30
            oLbx:bDrawItem := {| hDC, nItem, cText, rc, lFocus, lSelected, hBitmap | PintaItem( hDC, nItem, ctext, rc, lFocus, lSelected, hBitmap ) }

          oWnd:oClient := oLbx

   ACTIVATE WINDOW oWnd VALID ( oWnd := nil, .t. )

else
   oLbx:Reset()
   oWnd:SetFocus()
endif


return nil


static function Buscar( oCbxFind, oCbxTipos, oCbxRutas, lExacto, lRecursivo )
local aLines
local cLine
local cStr := ""
local cBuscar := alltrim(oCbxFind:oGet:VarGet())
local cRuta   := alltrim(oCbxRutas:oGet:VarGet())
local cTipos  := alltrim(oCbxTipos:oGet:VarGet())

if right( cRuta, 1 ) == "\"              
   cRuta := substr( cRuta, 1, len( cRuta )-1 )
endif

if empty( cBuscar )
   MsgAlert( "
Debe especificar busqueda","Atención")
   return nil
endif

AAdd( oLbx:aItems, 'Buscando "
' + cBuscar + '"  en [' + cRuta + "]" )
oLbx:SendMsg( 384, 0, "
Buscando " + cBuscar + "  en [" + cRuta + "]" )
//oLbx:Add("
" )

Buscando( cBuscar )

aLines := FindInFile( cBuscar, cRuta, cTipos, lExacto, lRecursivo  )
oLbx:GoTop()


cBuscar := oCbxFind: oGet:VarGet()
cRuta   := oCbxRutas:oGet:VarGet()
cTipos  := oCbxTipos:oGet:VarGet()

oCbxFind:oGet:VarPut( cBuscar )
oCbxFind:oGet:Refresh()

oCbxRutas:oGet:VarPut( cRuta )
oCbxRutas:oGet:Refresh()

oCbxTipos:oGet:VarPut( cTipos )
oCbxTipos:oGet:Refresh()

if lCancel
   MsgStop( "
Acción cancelada","Atención")
   lCancel := .f.
   return nil
endif


return nil




function FindInFile( cBuscar, cDir, cMask, lExacto, lRecursivo )
local aDir, cFile, cStr, nEn, nLines, nEnLine, cLine, cAux, nLen, cAux2, n, cNewDir
local nLastEn := 0
local aLines := {}
local lPrimera := .t.

DEFAULT lExacto := .f.
DEFAULT lRecursivo := .f.

aDir := Directory( cDir + "
\"+alltrim(cMask), "D" )

sleep(10)

cBuscar := alltrim(cBuscar)

nLen := len(aDir)

for n := 1 to nLen

    cFile := aDir[n]

    nLastEn := 0

    if lCancel
       return .f.
    endif


    if lRecursivo .and. ("
D" $ cFile[F_ATTR]) .and. (cFile[F_NAME] != ".") .AND. (cFile[F_NAME] != "..")
        cNewDir := cDir + "
\" + cFile[F_NAME]
        SysRefresh()
        FindInFile( cBuscar, cNewDir , cMask, lExacto, lRecursivo )
        if lCancel
           return .f.
        endif
    else


       if "
." +lower(cFileExt( cFile[F_NAME])) $ lower(cMask)

          oWnd:cTitle := cDir + "
\" +cFile[F_NAME]

          cStr   := Memoread( cDir + "
\" + cFile[F_NAME] )
          cAux   := Memoread( cDir + "
\" + cFile[F_NAME] )
          lPrimera := .t.
          nLines := 0
          do while ( nEn := at( if( lExacto, cBuscar,lower(cBuscar)), if( lExacto, cStr, lower(cStr)) ) ) != 0

             if lPrimera
                lPrimera := .f.
                AAdd( oLbx:aItems, "
" )
                oLbx:SendMsg( 384, 0, "
" )
                AAdd( oLbx:aItems, cDir + "
\" + cFile[F_NAME] )
                oLbx:SendMsg( 384, 0, cDir + "
\" + cFile[F_NAME] )
             endif

             nLines  += ((len( left( cStr, nEn ) )-len(strtran( left( cStr, nEn ),CRLF,"
")))/2)
             cLine   := memoline( cAux,254,nLines+1 )
             cStr    := substr( cStr, nEn+1 )
             AAdd( oLbx:aItems, str(nLines+1,6) + "
:  " + cLine )
             oLbx:SendMsg( 384, 0, str(nLines+1,6) + "
:  " + cLine )
             SysRefresh()
          enddo

       endif
    endif

next

return nil


function PintaItem( hDC, nItem, ctext, rc, lFocus, lSelected, hBitmap )
local nTop, nLeft, n
local nWidth := 0
local nHeight := 0
local nMode
local hOldFont := SelectObject( hDC, oFont:hFont )
local nEn
local nW
local c1, c2
local cBuscar := alltrim( Buscando() )
rc[2] += 3

nMode := SetBkMode( hDC, 1 )
if lSelected
   FillSolidRect( hDC, rc, CLR_HGRAY )
else
   FillSolidRect( hDC, rc, CLR_WHITE )
endif

SetTextColor( hDC, RGB(0,0,128) )

/*
if hBitmap != 0
   nWidth := nBmpWidth( hBitmap )
   nHeight := nBmpHeight( hBitmap )
   nTop := rc[1] + (rc[3]-rc[1])/2 - nHeight/2
   DrawMasked( hDC, hBitmap, nTop, rc[2]+2 )
endif
*/
nEn := at( lower(cBuscar), lower(cText) )

if nEn > 0
   c1 := substr( cText, 1, nEn-1 )
   nW := GetTextWidth( hDC, c1, oFont:hFont )
   rc[4] := rc[2] + nW
   DrawText( hDC, c1, {rc[1], rc[2], rc[3], rc[4] }, nOr( DT_VCENTER, DT_SINGLELINE ) )

   SetTextColor( hDC, RGB( 0,100,0) )
   rc[2] := rc[4]
   nW := GetTextWidth( hDC, cBuscar, oFont:hFont )
   rc[4] := rc[2] + nW
   DrawText( hDC, substr( cText, nEn, len( cBuscar ) ), {rc[1], rc[2] , rc[3], rc[4] }, nOr( DT_VCENTER, DT_SINGLELINE ) )

   SetTextColor( hDC, RGB(0,0,150) )
   c2 := substr( cText, nEn + len( cBuscar ) )
   rc[2] := rc[4]
   nW := GetTextWidth( hDC, c2, oFont:hFont )
   rc[4] := rc[2] + nW
   DrawText( hDC, c2, {rc[1], rc[2] , rc[3], rc[4] }, nOr( DT_VCENTER, DT_SINGLELINE ) )
else
   SetTextColor( hDC, RGB( 128,0,150) )
   DrawText( hDC, cText, {rc[1], rc[2] , rc[3], rc[4] }, nOr( DT_VCENTER, DT_SINGLELINE ) )
endif

SetBkMode( hDC, nMode )
SelectObject( hDC, hOldFont )

return nil





function LbxDrawItem( nPStruct, aBitmaps, aItems, nBmpWidth, bDrawItem )

local aInfo := GetDrawItemStruct( nPStruct )
local CtlType    := aInfo[1]
local CtlID      := aInfo[2]
local itemID     := aInfo[3]
local itemAction := aInfo[4]
local itemState  := aInfo[5]
local hWndItem   := aInfo[6]
local hDC        := aInfo[7]
local nTop       := aInfo[8]
local nLeft      := aInfo[9]
local nBottom    := aInfo[10]
local nRight     := aInfo[11]
local rgbFore, rgbBack

do case
   case itemAction == ODA_DRAWENTIRE .or. itemAction == ODA_SELECT

        if bDrawItem != nil
           if itemID+1 > len( aItems ); return "
"; endif
           return eval( bDrawItem, hDC, itemID+1, aItems[itemID+1], {nTop, nLeft, nBottom, nRight}, lAnd( itemState, ODS_FOCUS ),lAnd( itemState, ODS_SELECTED )) //, if( len( abitmaps ) > 0, aBitmaps[itemID+1],0) )
        endif

        if lAnd( itemState, ODS_FOCUS )
           DrawFocusRect( hDC, nTop,nLeft,nBottom,nRight )
        endif
        if lAnd( itemState, ODS_SELECTED )
           rgbFore := SetTextColor( hDC, GetSysColor( COLOR_HIGHLIGHTTEXT ) )
           rgbBack := SetBkColor( hDC, GetSysColor( COLOR_HIGHLIGHT ) )
           FillSolidRect( hDC, {nTop, nLeft, nBottom, nRight}, GetSysColor( COLOR_HIGHLIGHT ) )
        else
           FillSolidRect( hDC, {nTop, nLeft, nBottom, nRight}, CLR_WHITE     )
        endif

        DrawText( hDC, aItems[itemID + 1], {nTop, nLeft + 2, nBottom, nRight}, nOr( DT_VCENTER, DT_SINGLELINE ) )

        if lAnd( itemState, ODS_SELECTED )
           SetTextColor( hDC, rgbFore )
           SetBkColor( hDC, rgbBack )
        endif

        if lAnd( itemState, ODS_FOCUS )
           DrawFocusRect( hDC, nTop, nLeft, nBottom, nRight )
        endif

endcase

return 0

static function Abrefichero()

local cLine := oLbx:GetSelText()
local nLine, cFile, n
local oCode
local nIni, nEnd

if substr( cLine, 7, 1 ) == "
:"
   nLine := val( left( cLine, 6 ))
   for n := oLbx:GetPos to 1 step -1
       if left( oLbx:aItems[n], 1 ) != "
"
          cFile := alltrim( oLbx:aItems[n] )
          exit
       endif
   next
endif

? cFile, nLine


return nil




static function contextual( nRow, nCol )
local oMnu


 MENU oMnu POPUP
    MENUITEM "
Limpiar" ACTION ( if( len( oLbx:aItems ) > 0, (oLbx:Reset(), oLbx:Add( " " )),) )
    MENUITEM "
"
    MENUITEM "
"
    MENUITEM "
"
 ENDMENU
 ACTIVATE MENU oMnu AT nRow, nCol OF oLbx

return nil

function OpenCode( cFile )
? "
Llamar al editor para abrir " + cFile
return 0



#pragma BEGINDUMP
#include "
windows.h"
#include "
hbapi.h"


/*typedef struct tagDRAWITEMSTRUCT {
    UINT CtlType;
    UINT CtlID;
    UINT itemID;
    UINT itemAction;
    UINT itemState;
    HWND hwndItem;
    HDC hDC;
    RECT rcItem;
    ULONG_PTR itemData;
}*/

HB_FUNC( GETDRAWITEMSTRUCT )
{
   LPDRAWITEMSTRUCT lp = ( LPDRAWITEMSTRUCT ) hb_parnl( 1 );

   hb_reta( 12 );

   hb_storvni( lp->CtlType      ,    -1, 1  );
   hb_storvni( lp->CtlID        ,    -1, 2  );
   hb_storvni( lp->itemID       ,    -1, 3  );
   hb_storvni( lp->itemAction   ,    -1, 4  );
   hb_storvni( lp->itemState    ,    -1, 5  );
   hb_storvni( ( LONG ) lp->hwndItem     ,    -1, 6  );
   hb_storvni( ( LONG ) lp->hDC          ,    -1, 7  );
   hb_storvni( lp->rcItem.top   ,    -1, 8  );
   hb_storvni( lp->rcItem.left  ,    -1, 9  );
   hb_storvni( lp->rcItem.bottom,    -1, 10 );
   hb_storvni( lp->rcItem.right ,    -1, 11 );
   hb_storvnd( lp->itemData     ,    -1, 12 );

}
HB_FUNC( FILLSOLIDRECT )
{
    RECT rct;
    COLORREF nColor;
    HPEN hPen, hOldPen;
    HDC hDC = ( HDC ) hb_parnl( 1 );
    rct.top    = hb_parvni( 2, 1 );
    rct.left   = hb_parvni( 2, 2 );
    rct.bottom = hb_parvni( 2, 3 );
    rct.right  = hb_parvni( 2, 4 );

    nColor = SetBkColor( hDC, hb_parnl( 3 ) );
    ExtTextOut( hDC, 0, 0, ETO_OPAQUE, &rct, NULL, 0, NULL);
    SetBkColor( hDC, nColor );

}






#pragma ENDDUMP



Code: Select all  Expand view


1001 DIALOG 6, 18, 210, 142
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
{
 COMBOBOX 104, 2, 11, 136, 40, WS_BORDER |CBS_DROPDOWN |CBS_SORT |WS_VSCROLL |WS_TABSTOP
 COMBOBOX 105, 2, 36, 136, 40, WS_BORDER |CBS_DROPDOWN |CBS_SORT |WS_VSCROLL |WS_TABSTOP
 COMBOBOX 106, 2, 60, 136, 40, WS_BORDER |CBS_DROPDOWN |CBS_SORT |WS_VSCROLL |WS_TABSTOP
 PUSHBUTTON "...", 108, 143, 60, 12, 13
 CONTROL "Ignorar May/min", 101, "Button", BS_AUTOCHECKBOX |WS_TABSTOP, 2, 76, 64, 10
 CONTROL "Recursivo", 102, "Button", BS_AUTOCHECKBOX |WS_TABSTOP, 74, 76, 48, 10
 DEFPUSHBUTTON "&OK", IDOK, 2, 92, 45, 15
 PUSHBUTTON "&Cancel", IDCANCEL, 2, 108, 45, 15
 LTEXT "Texto:", 4001, 2, 2, 40, 8
 LTEXT "En ficheros:", -1, 2, 26, 40, 8
 LTEXT "Carpeta:", -1, 2, 51, 40, 8
}

 


https://drive.google.com/file/d/0B4835CHHvPURZ3NzYWxfZnQtMjQ/view?usp=sharing

A greeting.
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 21 guests