New Class: TFolderEx

Re: New Class: TFolderEx

Postby pcordonet » Mon Aug 09, 2010 2:40 pm

Hi Daniel,

I push ALT+ (any key were not in list of Short cut key) have this error:

Code: Select all  Expand view  RUN
Application
===========
   Path and name: C:\Documents and Settings\Pcordonet\Escritorio\testfx\testfx1.exe (32 bits)
   Size: 1,888,768 bytes
   Time from start: 0 hours 0 mins 1 secs
   Error occurred at: 08/09/10, 16:38:05
   Error description: Error BASE/1004  Message not found: TWINDOW:GETHOTPOS
   Args:
     [   1] = O   TWINDOW

Stack Calls
===========
   Called from:  => __ERRRT_SBASE(0)
   Called from: ../../../tobject.prg => TWINDOW:ERROR(0)
   Called from: ../../../tobject.prg => (b)HBOBJECT(0)
   Called from: ../../../tobject.prg => TWINDOW:MSGNOTFOUND(0)
   Called from: ../../../tobject.prg => TWINDOW:GETHOTPOS(0)
   Called from: .\source\classes\CONTROL.PRG => TFOLDEREX:SYSCOMMAND(1028)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1469)
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:HANDLEEVENT(379)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3397)
   Called from:  => WINRUN(0)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(978)
   Called from: C:\prg\class\clases\fldex\test\testfx1.prg => MAIN(88)

System
======
   CPU type: Intel(R) Core(TM)2 CPU         T5500  @ 1.66GHz 1666 Mhz
   Hardware memory: 2048 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Compiler version: Harbour 2.1.0beta2 (Rev. 15011)
   Windows version: 5.1, Build 2600 Service Pack 3

   Windows total applications running: 82
      1 TF_FloatingLangBar_WndTitle
      2 CiceroUIWndFrame
      3 M
      4 Default IME
      5 SysFader
      6 Menú Inicio
      7 TFolderex - Testing -
      8 testfx
      9 FiveTech Software tech support forums • Publicar una respuesta - Google Chrome
     10 Ir para
     11 Lista de Funções
     12 Localizar em Arquivo(s)
     13 Editor
     14 String Editor
     15 HintInfoWindow
     16 Page Setup
     17 Preview de Impressão
     18 Gerenciador de Ajuda
     19 1 - 53
     20 xDev Studio v0.70 -  [G:\Clients\GENERIC\FONTS\DEFTAU_L.PRG]
     21 Ir para Procedure/Function (Shift+Ctrl+G)
     22 Nueva pestaña
     23 GDI+ Window
     24 JetBrains Omea Reader 2.2
     25 Gestió Vendes - Aplitec Informàtica, S.L.
     26 FACTURA
     27 DATOS
     28 Sessió 9
     29 xBuild - I:\CLIENTS\COMERCIAL\FACTURA\factura.exe.xbp
     30 Buscar un contacto
     31 Menú contextual
     32 Bandeja de entrada en software@central.aplitec.com - Microsoft Outlook
     33 TNOTIFThisThreadSink 0x10E4 0x10E8
     34 [***SPAM*** Puntos/Req: 11.5/5.0] [CodeProject] Daily News - The GPL Wins Again - Mensaje (HTML)
     35 Progreso de envío o recepción de Outlook
     36 AutoUpdate de McAfee
     37 McAfeeFrameworkIcons
     38 McTray
     39 Estadísticas del análisis en tiempo real
     40 Estadísticas del análisis en tiempo real - PC-PERE
     41 Monitor de McAfee Agent
     42 Escritorio FortiTray
     43 Demonio FortiTray
     44 eyeBeam
     45 Documento4
     46 MARCOVI - Mensaje (HTML)
     47 Mensajes del análisis en tiempo real
     48 Microsoft Word
     49 Texto
     50 Documento3 - Microsoft Word
     51 MCI command handling window
     52 1 Aviso
     53 AXWIN Frame Window
     54 WindowsFormsParkingWindow
     55 .NET-BroadcastEventWindow.1.0.5000.0.4.0
     56 DDE Server Window
     57 WMS ST Notif Window 000010E4 000010E8
     58 WMS Idle
     59 Microsoft Outlook
     60 FC_SCH_HIDDEN_WINDOW
     61 PMHandler
     62 CAudioManagerMixer Instance 5FEE2CF18EF0468e828A0079BE94678B
     63 CSocketHiddenWindowClassRegisteration6B3D46E5E5E040cdAEB74DEAEA6C36B7
     64 CXsNativeWindowingThreadQueue145263F6B3034e469C18CBE06E556243
     65 Contacts
     66 Video
     67 CXsHookedIntoNativeWindowingQueue93EBD20A40F04960B2378F8D0327B466
     68 {08C34873-717D-419B-BCB4-D0CB1A57BC88}
     69 tcrea
     70 Connections Tray
     71 Property
     72 TouchPad object helper window
     73 HkWndName
     74 PersistWndName
     75 Agere Systems Soft Modem Monitor
     76 Touchpad driver tray icon window
     77 Touchpad driver backward compatibility window
     78 Touchpad driver helper window
     79 Medidor de energía
     80 MS_WebcheckMonitor
     81 BTTrayMainWindow
     82 Program Manager

Variables in use
================
   Procedure     Type   Value
   ==========================
   __ERRRT_SBASE
     Param   1:    O    Class: ERROR
   TWINDOW:ERROR
     Param   1:    N    13
     Param   2:    N    1004
     Param   3:    C    "Message not found"
     Param   4:    C    "TWINDOW:GETHOTPOS"
     Param   5:    N    1
     Param   6:    O    Class: TWINDOW
     Local   1:    U    
     Local   2:    N    0
   (b)HBOBJECT
     Param   1:    C    "Message not found"
     Param   2:    C    "TWINDOW"
     Param   3:    C    "GETHOTPOS"
     Param   4:    N    1004
   TWINDOW:MSGNOTFOUND
     Param   1:    O    Class: TWINDOW
     Param   2:    C    "GETHOTPOS"
     Param   3:    N    102
     Param   4:    N    2755530
   TWINDOW:GETHOTPOS
     Param   1:    C    "GETHOTPOS"
     Param   2:    N    102
     Param   3:    N    2755530
   TFOLDEREX:SYSCOMMAND
     Param   1:    N    102
     Param   2:    N    2755530
   TCONTROL:HANDLEEVENT
     Param   1:    N    61696
     Param   2:    N    102
     Param   3:    N    0
     Local   1:    O    Class: TFOLDEREX
     Local   2:    N    0
     Local   3:    U    
     Local   4:    N    0
   TFOLDEREX:HANDLEEVENT
     Param   1:    N    274
     Param   2:    N    61696
     Param   3:    N    102
     Local   1:    U    
   _FWH
     Param   1:    N    274
     Param   2:    N    61696
     Param   3:    N    102
   WINRUN
     Param   1:    N    102
     Param   2:    N    274
     Param   3:    N    61696
     Param   4:    N    102
     Param   5:    N    34
     Local   1:    O    Class: TFOLDEREX
   TWINDOW:ACTIVATE
     Param   1:    N    2362106
   MAIN
     Param   1:    C    "NORMAL"
     Param   2:    U    
     Param   3:    U    
     Param   4:    U    
     Param   5:    U    
     Param   6:    U    
     Param   7:    U    
     Param   8:    B    {|| ... }
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    U    
     Param  13:    U    
     Param  14:    U    
     Param  15:    U    
     Param  16:    U    
     Param  17:    U    
     Param  18:    U    
     Param  19:    U    
     Local   1:    O    Class: TWINDOW
     Local   2:    U    
     Local   3:    U    

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TWINDOW
     5 TBRUSH
     6 TFONT
     7 TCONTROL
     8 TFOLDEREX
     9 TDIALOG
    10 TXBROWSE
    11 TSCROLLBAR
    12 TXBRWCOLUMN
    13 TBTNBMP
    14 TGIF
    15 TSAY
    16 TREG32

Memory Analysis
===============
      238 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes
 
pcordonet
 
Posts: 111
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Mon Aug 09, 2010 2:58 pm

pcordonet wrote:I push ALT+ (any key were not in list of Short cut key) have this error:


Thanks.. i will fix soon
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Mon Aug 09, 2010 3:43 pm

pcordonet wrote:Hi Daniel,

I push ALT+ (any key were not in list of Short cut key) have this error:

[code=fw]Application
===========
   Path and name: C:\Documents and Settings\Pcordonet\Escritorio\testfx\testfx1.exe (32 bits)
   Size: 1,888,768 bytes
   Time from start: 0 hours 0 mins 1 secs
   Error occurred at: 08/09/10, 16:38:05
   Error description: Error BASE/1004  Message not found: TWINDOW:GETHOTPOS
   Args:
     [   1] = O   TWINDOW


Already fixed and upload the sample again (Same link)
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby pcordonet » Mon Aug 09, 2010 3:52 pm

Ok !!

Thank you!
Pere Cordonet
pcordonet
 
Posts: 111
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: New Class: TFolderEx

Postby richard-service » Mon Aug 09, 2010 4:22 pm

Daniel Garcia-Gil wrote:Richard...

The bitmap position is fine... maybe i should use a more small bitmap, or if you prefer no paint yellow/blue line
Resize bitmap is not acceptable, with windows api method, we lost alpha channel, with own functions:
ResizeImg( hBmp, nWidth, nHeight ) -> hBmp
ResizeImg( hBmp, nPorcent ) -> hBmp
i dont like effect

i did a new data nBmpTopMargin
Image


i thinks, the bitmap used in this samples maybe are so big for you style, my recommendation for you, use more small bitmap or use new data nBmpTopMargin

yes, maybe use small bitmap or new data nBmpTopMargin.
I think better than same WinAPI "SysTabControl32", I put any size bmp or icon in TAB work fine.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: New Class: TFolderEx

Postby ukoenig » Mon Aug 09, 2010 4:28 pm

Hello Daniel,

Is it possible for You, do test Backgrounds including some Controls
like Say, Radio and Checkbox for transparent Tests ?
I finished my Folder-Painter and it works fine, but I would like,
to replace it with Your new Folder-class.

All possible Dlg- and Folder-Background-Combinations :
W_STYLE = selected Dialog-Background
F_STYLE = selected Folder-Background

Code: Select all  Expand view  RUN

...
...
ACTIVATE DIALOG oDlg ;
ON INIT ( oDlg:Move( 50, 45, NIL, NIL, .f. ), ; // Move to Position
      IIF( W_STYLE = 2, W_CBRUSH( oDlg ), NIL ), ;  // Dialog-Color-Brush
      IIF( W_STYLE = 4, W_IBRUSH( oDlg ), NIL ), ;  // Dialog-Image-Brush
      SetImages(oFld), ;
      IIF( F_STYLE = 1, FoldGrad( oFld, hDC, .T. ), NIL ), ; // Folder-Gradient
      IIF( F_STYLE = 2, FoldCol( oFld ), NIL ), ;  // Folder-Color
      IIF( F_STYLE = 3, FoldImage( hDC, oFld ), NIL ), ; // Folder-Image
      IIF( F_STYLE = 4, FoldBrush( hDC, oFld ), NIL ) ) ; // Folder-Brush
ON PAINT ( IIF( W_STYLE = 1, W_GRAD( oDlg, hDC, .T. ), NIL ), ; // Dialog-Gradient
      IIF( W_STYLE = 3, W_IMAGE( oDlg, 0, 0, oDlg:nWidth(), oDlg:nHeight() ), NIL ), ; // Dialog-Image
      oFld:SetOption(1) )
 
RETURN( NIL )

// --------- FOLDER-COLOR -----------------------------------

FUNCTION FoldCol( oFld )
LOCAL n, oDlg, oBrush

DEFINE BRUSH oBrush COLOR  F_COLOR1
 
FOR n = 1 to Len( oFld:aDialogs )
    oDlg = oFld:aDialogs[ n ]    
    SET BRUSH OF oDlg TO oBrush
NEXT

RELEASE BRUSH oBrush

RETURN NIL

// ----------- FOLDER GRADIENT ---------------------------------

FUNCTION FoldGrad( oFld, hDC, lDir )
LOCAL n, oDlg
Local aGrad := { { F_MOVE, F_COLOR1, F_COLOR2 }, { F_MOVE, F_COLOR2, F_COLOR1 } }
  
FOR n = 1 to Len( oFld:aDialogs )
      oDlg = oFld:aDialogs[ n ]    
      oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, lDir ) }
NEXT

RETURN NIL

// ------- FOLDER BRUSH Tiled ( calculated ) using JPG-Format --------------

FUNCTION FoldBrush( hDC, oFld )
LOCAL n, oDlg
 
FOR n = 1 to Len( oFld:aDialogs )
      oDlg = oFld:aDialogs[ n ]    
      oDlg:bPainted = { | hDC | F_TILED1(  hDC, oDlg ) }
NEXT

RETURN NIL

// --------

FUNCTION F_TILED1(  hDC, oDlg )
LOCAL oImage3, nRow := 0, nCol := 0, n

DEFINE IMAGE oImage3 FILENAME c_path + "\SYSTEM\" + F_BRUSH
aRect := GETCLIENTRECT( oDlg:hWnd )
nHeight := oImage3:nHeight
nWidth := oImage3:nWidth
IF aRect[3] > 0
      DO WHILE nRow < aRect[3]
            nCol = 0
            DO WHILE nCol < aRect[4]
                  PalBmpDraw( hDC, nRow, nCol, oImage3:hBitmap, , nWidth, nHeight, , .T. )
                  nCol += nWidth
           ENDDO
           nRow += nHeight
      ENDDO
ENDIF

DeleteObject( oImage3 )

RETURN( NIL )

// -------- FOLDER Image ------------------------------------

FUNCTION FoldImage( hDC, oFld )
LOCAL n, oDlg
 
FOR n = 1 to Len( oFld:aDialogs )
      oDlg = oFld:aDialogs[ n ]    
      oDlg:bPainted = { | hDC | F_FULL1(  hDC, oDlg ) }
NEXT

RETURN NIL

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

FUNCTION F_FULL1(  hDC, oDlg )
LOCAL oImage3
LOCAL aRect := GETCLIENTRECT( oDlg:hWnd )

DEFINE IMAGE oImage3 FILENAME c_path + "
\SYSTEM\" + F_IMAGE
aRect := GETCLIENTRECT( oDlg:hWnd )
PalBmpDraw( hDC, 0, 0, oImage3:hBitmap, , aRect[4], aRect[3], , .T. )
DeleteObject( oImage3 )

RETURN( NIL )


Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Tue Aug 10, 2010 2:10 am

Uwe...

check this sample
Download Here


Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Tue Aug 10, 2010 10:49 am

Now we can decide stretch tabs or not

Stretch
Image

No Stretch
Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby anserkk » Tue Aug 10, 2010 12:08 pm

Dear Daniel,

Good work !!!!.

Regards
Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Tue Aug 10, 2010 1:01 pm

Working from resource


Image

Code: Select all  Expand view  RUN

   REDEFINE FOLDEREX oFld ID 110 PROMPT "New", "Open";
            BITMAPS "new", "open";
            DIALOGS "sub1", "sub2" ;
            ROUND 5
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Tue Aug 10, 2010 4:05 pm

Using right tech we can do a great job

Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby Massimo Linossi » Tue Aug 10, 2010 4:16 pm

Daniel, this is really fantastic !!!
Many compliments. :D :D :D
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: New Class: TFolderEx

Postby Maurizio » Wed Aug 11, 2010 6:56 am

Daniel,
beautiful

it is possible in vertical style to ?

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Wed Aug 11, 2010 10:28 am

Maurizio wrote:Daniel,
beautiful

it is possible in vertical style to ?

Maurizio


no :(
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New Class: TFolderEx

Postby Daniel Garcia-Gil » Thu Aug 12, 2010 7:09 pm

Hello...

i'm still working in the class...

thanks to Maurizio's post, i think we can set different layout, for now is ready TOP and BOTTOM.... i'm working LEFT, RIGHT

Download here
For better result, launch from fivewin samples folder

TOP
Image

BOTTOM
Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests