Page 3 of 3

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sat Sep 05, 2009 9:35 am
by Antonio Linares

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 6:28 am
by Otto
Hello Antonio,

I changed the way I will print the IDs on the dialog.
I add extra controls which print the IDs.

This is what I did:

Code: Select all  Expand view
case cFirst == "CONTROL"
              cResource += ParseControl( cLine )
              nControls++
     cResource += Beschriftung( cLine )
              nControls++

Code: Select all  Expand view
function Beschriftung( cLine )

   local nTop, nLeft, nWidth, nHeight, nId, nAt
   local cClassName, cStyle, nStyle := nOr( WS_VISIBLE, WS_CHILD, WS_TABSTOP ), cCaption, cToken
   local cId

   cCaption = StrToken( cLine, 2, '"' )
   cLine = StrToken( cLine, 1, '"' ) + '"-"' + StrToken( cLine, 3, '"' ) + '"' + ;
           StrToken( cLine, 4, '"' ) + '"' + StrToken( cLine, 5, '"' )
   nId     = Val( StrToken( cLine, 1, "," ) )
   nLeft   = Val( StrToken( cLine, 5, "," ) )
   nTop    = Val( StrToken( cLine, 6, "," ) )
   nWidth  = Val( StrToken( cLine, 7, "," ) )
   nHeight = Val( StrToken( cLine, 8, "," ) )
   cClassName = StrToken( cLine, 4, '"' )
   cStyle  = StrToken( cLine, 4, "," )

   cId := STRTRAN(StrToken( cLine, 3, '"' ),",")
 
cClassName = "edit"

nHeight := 2
nWidth := 20
nStyle:= 1342373888
return cCtrl2Chr( nTop, nLeft, nTop + nHeight, nLeft + nWidth, nId, nStyle,;
                  cClassName,  + cId + "#")

Do you think I could print these controls in a certain font easily?
Thanks in advance
Otto
Image

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 8:16 am
by Antonio Linares
Otto,

Wouldn't be simpler to have the IDs as tooltips ? :-)

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 8:42 am
by Antonio Linares
Otto,

With these changes in RE.prg:
http://wiki.fivetechsoft.com/doku.php?id=fivewin_resources_editor&rev=1252143398&do=diff

and these changes in Class TControl:
Image

then tooltips are shown even in design mode :-)

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 8:53 am
by Antonio Linares

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 4:58 pm
by Otto
Hello Antonio,

your exe is working but if I compile the prg-file tooltip is not working.
Do I need some changed in a class?

Thanks in advance
Otto

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 7:23 pm
by Antonio Linares
Otto,

Yes, see my posted changes for Class TControl above

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 8:48 pm
by Otto
Hello Antonio,

tooltip is working. But how can I get the nID on dbClick event?
I tried:
Code: Select all  Expand view
oCtrl:bLDblClick = { || msginfo( AllTrim( Str( GetWindowLong( oCtrl:hWnd, GWL_ID ) ) ))}
     

but this does not work.

Best regards,
Otto

Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated

PostPosted: Sun Sep 06, 2009 9:45 pm
by Antonio Linares