tabs look 2015

Re: tabs look 2015

Postby MOISES » Tue Dec 31, 2019 6:11 pm

Thank you and happy 2020!
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: tabs look 2015

Postby MOISES » Sat Feb 29, 2020 1:20 pm

Hi,

What is the status? I don´t see it in FWH 20.02.

Thank you.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: tabs look 2015

Postby Antonio Linares » Sun Mar 01, 2020 9:39 am

We haven't got it yet (as far as I remember)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: tabs look 2015

Postby MOISES » Sun Mar 01, 2020 10:05 am

Antonio,

I would need to paint the tabs as the bottom bar of the window with SET MESSAGE OF oWndMain ;
TO ( cMainMsg ) ;
CLOCK ;
DATE ;
KEYBOARD 2015

Here's an earlier version, but I don't know how to make the changes to the painting. Please can you help me?

Code: Select all  Expand view
#include "FiveWin.Ch"
#include "Font.ch"
#include "Constant.ch"

#define COLOR_INACTIVECAPTION 3
#define COLOR_WINDOW          5
#define COLOR_WINDOWTEXT      8
#define COLOR_BTNFACE        15
#define COLOR_BTNSHADOW      16
#define COLOR_BTNHIGHLIGHT   20

#define FD_BORDER             8
#define FD_HEIGHT            22

#define DT_CENTER             1
#define DT_VCENTER            4

#define WINDING               2
#define SC_KEYMENU        61696   // 0xF100

#ifdef __XPP__
   #define Super ::TControl
   #define New   _New
#endif


function Main()

   local oDlg, oTabs

   DEFINE DIALOG oDlg RESOURCE "Test" TITLE "TESTING TABS"

   REDEFINE TABS oTabs ;
            PROMPTS "One", "Two", "Three" ;
            ID 100 ;
            OF oDlg

   oDlg:oTop = oTabs


   ACTIVATE DIALOG oDlg CENTERED

return nil


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

CLASS TTabs FROM TControl

   CLASSDATA lRegistered AS LOGICAL
   CLASSDATA aProperties INIT { "aPrompts", "nAlign", "nClrText", "nClrPane",;
                                "nOption", "nTop", "nLeft", "nWidth",;
                                "nHeight", "Cargo" }

   DATA   aPrompts, aSizes
   DATA   nOption
   DATA   bAction
   DATA   cMode

   METHOD New( nTop, nLeft, aPrompts, bAction, oWnd, nOption, nClrFore,;
               nClrBack, lPixel, lDesign, nWidth, nHeight,;
               cMsg, cMode ) CONSTRUCTOR

   METHOD ReDefine( nId, aPrompts, bAction, oWnd, nOption, nClrFore,;
                    nClrBack ) CONSTRUCTOR

   METHOD Display()
   METHOD Paint()
   METHOD Initiate( hDlg )
   METHOD LButtonDown( nRow, nCol, nFlags )
   METHOD Default()
   METHOD AddItem( cItem )

   METHOD DelItem()

   METHOD SetOption( nOption )

   METHOD SetTabs( aTabs, nOption )

   METHOD GetHotPos( nChar )

   METHOD SysCommand( nType, nLoWord, nHiWord )

   METHOD Inspect( cData )

   METHOD EditPrompts()

ENDCLASS

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

METHOD New( nTop, nLeft, aPrompts, bAction, oWnd, nOption, nClrFore,;
            nClrBack, lPixel, lDesign, nWidth, nHeight, cMsg, cMode ) CLASS TTabs

   #ifdef __XPP__
      #undef New
   #endif

   DEFAULT nTop     := 0, nLeft := 0,;
           aPrompts := { "&One", "&Two", "T&hree" },;
           oWnd     := GetWndDefault(),;
           nOption  := 1,;
           nClrFore := oWnd:nClrText,;
           nClrBack := GetSysColor( COLOR_BTNFACE ),;
           lPixel   := .f.,;
           lDesign  := .f.,;
           nWidth   := 200,;
           nHeight  := 24 ,;
           cMode    := "BOTTOM"

   ::nStyle    = nOR( WS_CHILD, WS_VISIBLE,;
                      If( lDesign, WS_CLIPSIBLINGS, 0 ), WS_TABSTOP )
   ::nId       = ::GetNewId()
   ::oWnd      = oWnd
   ::aPrompts  = aPrompts
   ::bAction   = bAction
   ::nOption   = nOption
   ::cMsg      = cMsg
   ::nTop      = If( lPixel, nTop, nTop * SAY_CHARPIX_H )
   ::nLeft     = If( lPixel, nLeft, nLeft * SAY_CHARPIX_W )
   ::nBottom   = ::nTop + nHeight - 1
   ::nRight    = ::nLeft + nWidth - 1
   ::lDrag     = lDesign
   ::lCaptured = .f.
   ::oFont     = TFont():New( "Ms Sans Serif", 0, -9 )
   ::nClrText  = nClrFore
   ::nClrPane  = nClrBack
   ::cMode     = cMode

   DEFINE BRUSH ::oBrush STYLE TABS

   #ifdef __XPP__
      DEFAULT ::lRegistered := .f.
   #endif

   ::Register()

   if ! Empty( oWnd:hWnd )
      ::Create()
      oWnd:AddControl( Self )
   else
      oWnd:DefControl( Self )
   endif

   ::Default()

   if lDesign
      ::CheckDots()
   endif

return Self

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

METHOD ReDefine( nId, aPrompts, bAction, oWnd, nOption, nClrFore,;
                 nClrBack ) CLASS TTabs

   DEFAULT nOption  := 1,;
           nClrFore := oWnd:nClrText,;
           nClrBack := GetSysColor( COLOR_BTNFACE )

   ::nId      = nId
   ::oWnd     = oWnd
   ::aPrompts = aPrompts
   ::bAction  = bAction
   ::nOption  = nOption
   ::oFont    = TFont():New( "Ms Sans Serif", 0, -9 )
   ::nClrText = nClrFore
   ::nClrPane = nClrBack
   ::cMode    = "BOTTOM"

   ::Register()

   oWnd:DefControl( Self )

return Self

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

METHOD Display() CLASS TTabs

   ::BeginPaint()
   ::Paint()
   ::EndPaint()

return 0

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

METHOD Paint() CLASS TTabs

   local n
   local hOldFont
   local hOldBrush
   local hOldPen
   local nCol        := 5
   local hDC         := ::GetDC()
   local hDarkPen    := CreatePen( PS_SOLID, 1, GetSysColor( COLOR_BTNSHADOW ) )
   local hGrayPen    := CreatePen( PS_SOLID, 1, ::nClrPane )
   local hLightPen   := CreatePen( PS_SOLID, 1, GetSysColor( COLOR_BTNHIGHLIGHT ) )
   local hGrayBrush  := CreateSolidBrush( ::nClrPane )
   local hDarkBrush  := CreateSolidBrush( GetSysColor( COLOR_INACTIVECAPTION ) )

   hOldFont  = SelectObject( hDC, ::oFont:hFont )
   hOldPen   = SelectObject( hDC, hDarkPen )
   hOldBrush = SelectObject( hDC, hDarkBrush )

   if Len( ::aSizes ) < Len( ::aPrompts )
      ::Default()
   endif

   if ::cMode == "BOTTOM"

      SelectObject( hDC, hGrayPen )
      MoveTo( hDC, 0, 1 )
      LineTo( hDC, ::nWidth(), 1 )
      MoveTo( hDC, 0, 2 )
      LineTo( hDC, ::nWidth(), 2 )

      SetBlackPen( hDC )
      MoveTo( hDC, 0, 3 )
      LineTo( hDC, ::nWidth(), 3 )

      for n = 1 to Len( ::aPrompts )

         if n == ::nOption

            SelectObject( hDC, hGrayBrush )
            SetBlackPen( hDC )
            PolyPolygon( hDC, {  { nCol, 3 },;
                                 { nCol , 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8 + 17, 3 } } )

            SelectObject( hDC, hLightPen )
            MoveTo( hDC, nCol , 3 )
            LineTo( hDC, nCol , 20 )

            SelectObject( hDC, hGrayPen )
            MoveTo( hDC, nCol , 3 )
            LineTo( hDC, nCol + 4 + ::aSizes[ n ] + 8 + 17, 3 )

            SetTextColor( hDC, ::nClrText )
            SetBkColor( hDC, ::nClrPane )
            DrawText( hDC, ::aPrompts[ n ],;
                   { 5, nCol + 4, 19, nCol + 5 + ::aSizes[ n ] + 5 },;
                   nOr( DT_CENTER, DT_VCENTER ) )

         else

            SelectObject( hDC, hDarkBrush )
            SetBlackPen( hDC )
            PolyPolygon( hDC, {  { nCol, 3 },;
                                 { nCol , 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8 + 17, 3 } } )

            SelectObject( hDC, hGrayPen )
            MoveTo( hDC, nCol , 4 )
            LineTo( hDC, nCol , 20 )

            SetTextColor( hDC, CLR_WHITE )
            SetBkColor( hDC, GetSysColor( COLOR_INACTIVECAPTION ) )
            DrawText( hDC, ::aPrompts[ n ],;
                      { 5, nCol + 3, 19, nCol + 5 + ::aSizes[ n ] + 6 },;
                      nOr( DT_CENTER, DT_VCENTER ) )

         endif

         nCol += 4 + ::aSizes[ n ] + 26

      next

   elseif ::cMode == "TOP"

      MoveTo( hDC, 0, ::nHeight() )
      LineTo( hDC, ::nWidth(), ::nHeight() )

      SetWhitePen( hDC )
      MoveTo( hDC, 0, ::nHeight() -3  )
      LineTo( hDC, ::nWidth(), ::nHeight() - 3 )

      for n = 1 to Len( ::aPrompts )

         if n == ::nOption

            SelectObject( hDC, hGrayBrush )
            SetBlackPen( hDC )
            PolyPolygon( hDC, {  { nCol, ::nHeight() - 3 },;
                                 { nCol , ::nHeight() - 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, ::nHeight() - 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, ::nHeight() - 3 } } )

            SelectObject( hDC, hLightPen )
            MoveTo( hDC, nCol , ::nHeight() - 3 )
            LineTo( hDC, nCol , ::nHeight() - 20 )

            SelectObject( hDC, hGrayPen )
            MoveTo( hDC, nCol , ::nHeight() - 3 )
            LineTo( hDC, nCol + 4 + ::aSizes[ n ] + 8, ::nHeight() - 3 )

            SetTextColor( hDC, CLR_BLACK )
            SetBkColor( hDC, ::nClrPane )
            DrawText( hDC, ::aPrompts[ n ],;
                   { ::nHeight() - 19, nCol + 4, ::nHeight() - 5, nCol + 5 + ::aSizes[ n ] + 5 },;
                   nOr( DT_CENTER, DT_VCENTER ) )

         else
/*
            SelectObject( hDC, hDarkBrush )
            SetBlackPen( hDC )
            PolyPolygon( hDC, {  { nCol , ::nHeight() -  3 },;
                                 { nCol , ::nHeight() - 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, ::nHeight() - 20 },;
                                 { nCol + 4 + ::aSizes[ n ] + 8, ::nHeight() - 3 } } )
*/

            SelectObject( hDC, hGrayPen )
            MoveTo( hDC, nCol , ::nHeight() - 4 )
            LineTo( hDC, nCol , ::nHeight() - 20 )

            SetTextColor( hDC, CLR_WHITE )
            SetBkColor( hDC, ::nClrPane ) //GetSysColor( COLOR_INACTIVECAPTION ) )
            DrawText( hDC, ::aPrompts[ n ],;
                      { ::nHeight() - 19 , nCol + 3, ::nHeight() - 5, nCol + 5 + ::aSizes[ n ] + 6 },;
                      nOr( DT_CENTER, DT_VCENTER ) )


         end if

        nCol += 4 + ::aSizes[ n ] + 26

      next

   end if

   SelectObject( hDC, hOldPen )
   SelectObject( hDC, hOldFont )
   SelectObject( hDC, hOldBrush )

   DeleteObject( hDarkPen )
   DeleteObject( hGrayPen )
   DeleteObject( hLightPen )
   DeleteObject( hDarkBrush )
   DeleteObject( hGrayBrush )

   ::ReleaseDC()

return nil

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

METHOD Initiate( hDlg ) CLASS TTabs

   ::Super:Initiate( hDlg )

   if ::oBrush == nil
      DEFINE BRUSH ::oBrush STYLE TABS
   endif

   ::Default()

return nil

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

METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TTabs

   local n := 1, nPos := 5

   if ::lDrag
      return ::Super:LButtonDown( nRow, nCol, nFlags )
   else
      if nRow <= FD_HEIGHT
         while nCol > nPos + ::aSizes[ n ] + 30 .and. n < Len( ::aPrompts )
            nPos += ::aSizes[ n ] + 30
            n++
         end
         ::SetOption( n )
      endif
   endif

return nil

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

METHOD Default() CLASS TTabs

   local n

   ::aSizes = Array( Len( ::aPrompts ) )

   for n = 1 to Len( ::aPrompts )
      ::aSizes[ n ] = GetTextWidth( 0, StrTran( ::aPrompts[ n ], "&", "" ),;
                                    ::oFont:hFont )
   next

return nil

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

METHOD AddItem( cItem ) CLASS TTabs

   AAdd( ::aPrompts, cItem )
   ::Default()
   ::Refresh()

return nil

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

METHOD DelItem() CLASS TTabs

   if Len( ::aPrompts ) > 1
      ::aPrompts = ADel( ::aPrompts, ::nOption )
      ::aPrompts = ASize( ::aPrompts, Len( ::aPrompts ) - 1 )
   else
      ::aPrompts = { "No Defined" }
   endif
   ::Default()
   ::Refresh()

return nil

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

METHOD SetOption( nOption ) CLASS TTabs

   if nOption != ::nOption
      ::nOption = nOption
      ::Paint()
      if ! Empty( ::bAction )
         Eval( ::bAction, nOption )
      endif
   endif

return nil

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

METHOD GetHotPos( nChar ) CLASS TTabs

   local n := 1
   local nAt

   while n <= Len( ::aPrompts )
     if ( nAt := At( "&", ::aPrompts[ n ] ) ) != 0 .and. ;
        Lower( SubStr( ::aPrompts[ n ], nAt + 1, 1 ) ) == Chr( nChar )
        return n
     endif
     n++
   end

return 0

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

METHOD SysCommand( nType, nLoWord, nHiWord ) CLASS TTabs

   local nItem

   do case
      case nType == SC_KEYMENU      // Alt+... control accelerator pressed
           if ( nItem := ::GetHotPos( nLoWord ) ) > 0
              ::SetOption( nItem )
              return 0
           endif
   endcase

return nil

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

METHOD SetTabs( aTabs, nOption ) CLASS TTabs

   DEFAULT aTabs := { "&One", "&Two", "T&hree" }, nOption := 1

   ::aPrompts = aTabs
   ::nOption  = nOption
   ::Default()
   ::Refresh()

return nil

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

METHOD Inspect( cData ) CLASS TTabs

   if cData == "aPrompts"
      return { || ::EditPrompts() }
   endif

return nil

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

METHOD EditPrompts() CLASS TTabs

   local oDlg, n
   local cPrompts := ""
   local oFont
   local lOk := .f.
   local aPrompts := {}

   for n = 1 to Len( ::aPrompts )
      cPrompts += ::aPrompts[ n ] + CRLF
   next

   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -9

   DEFINE DIALOG oDlg SIZE 300, 178 TITLE "Edit prompts" FONT oFont

   @ 0.2, 0.3 GET cPrompts MEMO SIZE 145, 70

   @ 7.5, 10.1 BUTTON "&Ok"     SIZE 30, 11 ACTION ( lOk := .t., oDlg:End() )
   @ 7.5, 22.1 BUTTON "&Cancel" SIZE 30, 11 ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

   if lOk
      for n = 1 to MLCount( cPrompts )
         AAdd( aPrompts, AllTrim( MemoLine( cPrompts,, n ) ) )
      next
      ::SetTabs( aPrompts, 1 )
   endif

return nil

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


.RC FILE:

Code: Select all  Expand view

test DIALOG 78, 72, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 100, "TTabs", 0 | WS_CHILD | WS_VISIBLE, 0, 1, 193, 17
 DEFPUSHBUTTON "OK", IDOK, 12, 96, 50, 14
 PUSHBUTTON "Cancel", IDCANCEL, 72, 96, 50, 14
 PUSHBUTTON "Help", IDHELP, 132, 96, 50, 14
}
 


Thank you very much.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: tabs look 2015

Postby Antonio Linares » Sun Mar 01, 2020 11:42 am

Moises,

Class TTabs uses bitmaps to paint the tabs. In order to change the look of the tabs you have to implement these functions in your app:

bmp_TabSel()
bmp_TabSelL()
bmp_TabSelR()
bmp_TabUnSel()
bmp_TabUnSL()
bmp_TabUnSR()
bmp_TabSelV()
bmp_TabSelLV()
bmp_TabSelRV()
bmp_TabUnSelV()
bmp_TabUnSLV()
bmp_TabUnSRV()

Each of those functions has to provide the required bitmap. Please review these bitmaps in FWH\bitmaps:

tabsel.bmp, tabsell.bmp, tabselr.bmp, tabunsel.bmp, tabunsl.bmp, tabunsr.bmp, tabselv.bmp, tabselllv.bmp, tabselrv.bmp, tabunselv.bmp, tabunslv.bmp and tabunsrv.bmp

Next is to modify those bitmaps with the look that you want. Once modified use FWH\bmptoc.prg to create the C code for each bitmap.

Finally you have to implement the above functions to replace the FWH equivalent ones. Here you have an example:

moises.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oWnd, oTabs

   DEFINE WINDOW oWnd

   @ 14, 0 TABS oTabs ITEMS "one", "two", "three" OF oWnd SIZE oWnd:nWidth, 10

   SET MESSAGE OF oWnd 2015 TO "Hello"

   ACTIVATE WINDOW oWnd

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <fwh.h>

extern LPSTR DibBits( LPBITMAPINFOHEADER lpBmp );
void RegisterResource( HANDLE hResource, LPSTR szType );

static unsigned char tabsel[] = {
0x42, 0x4D, 0xDE, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00,
0x00, 0x28, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x00, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C,
0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED,
0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24, 0x1C, 0xED, 0x24,
0x1C, 0xED, 0x24, 0x1C, 0xED, 0x00 };

static HBITMAP CreateMemBitmap( LPBITMAPINFO pBitmap )
{
   HBITMAP hBitmap = 0;
   HDC hDC;

   hDC = GetDC( 0 );

   if( pBitmap )
   {
       hBitmap =  CreateDIBitmap( hDC,
                       &pBitmap->bmiHeader,
                       CBM_INIT,
                       DibBits( &pBitmap->bmiHeader ),
                       pBitmap,
                       DIB_RGB_COLORS );
   }

   ReleaseDC( 0, hDC );
   RegisterResource( hBitmap, "BMP" );

   return hBitmap;
}

HB_FUNC( BMP_TABSEL )
{
   fw_retnll( ( HBITMAP ) CreateMemBitmap( ( LPBITMAPINFO ) tabsel ) );
}

#pragma ENDDUMP


Once you complete it, we appreciate if you contribute it to FWH :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: tabs look 2015

Postby Antonio Linares » Sun Mar 01, 2020 12:53 pm

In FWH\samples\bmptoc.prg there is a minor change to do: (BMP bytes to use are from position 15)
Code: Select all  Expand view
// Generates the C language bytes for a bitmap

#include "FiveWin.ch"

function Main( cBmpFile )

   local cBytes, cResult := "static unsigned char ", n, cHex

   DEFAULT cBmpFile := cGetFile( "Bitmap file| *.bmp| ", "Please select a bitmap" )

   cResult += cFileNoExt( cBmpFile )
   cResult += "[] = {" + CRLF

   if File( cBmpFile )
      cBytes = MemoRead( cBmpFile )

      for n = 15 to Len( cBytes )
         cHex = DecToHex( Asc( SubStr( cBytes, n, 1 ) ) )
         cResult += "0x" + If( Len( cHex ) < 2, "0", "" ) + cHex + ", "
         if n % 13 == 0
            cResult += CRLF
         endif  
      next

      cResult = SubStr( cResult, 1, Len( cResult ) - 2 ) + " };"

      MemoEdit( cResult )
   endif

return nil          


This is an enhanced moises.prg with the selected tab already completed:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oWnd, oTabs

   DEFINE WINDOW oWnd

   @ 14, 0 TABS oTabs ITEMS "one", "two", "three" OF oWnd SIZE oWnd:nWidth, 10

   SET MESSAGE OF oWnd 2015 TO "Hello"

   ACTIVATE WINDOW oWnd

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <fwh.h>

extern LPSTR DibBits( LPBITMAPINFOHEADER lpBmp );
void RegisterResource( HANDLE hResource, LPSTR szType );

static unsigned char tabsel[] = {
0x28, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
0xC3, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 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 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00 };

static HBITMAP CreateMemBitmap( LPBITMAPINFO pBitmap )
{
   HBITMAP hBitmap = 0;
   HDC hDC;

   hDC = GetDC( 0 );

   if( pBitmap )
   {
       hBitmap =  CreateDIBitmap( hDC,
                       &pBitmap->bmiHeader,
                       CBM_INIT,
                       DibBits( &pBitmap->bmiHeader ),
                       pBitmap,
                       DIB_RGB_COLORS );
   }

   ReleaseDC( 0, hDC );
   RegisterResource( hBitmap, "BMP" );

   return hBitmap;
}

HB_FUNC( BMP_TABSEL )
{
   fw_retnll( ( HBITMAP ) CreateMemBitmap( ( LPBITMAPINFO ) tabsel ) );
}

HB_FUNC( BMP_TABSELL )
{
   fw_retnll( ( HBITMAP ) CreateMemBitmap( ( LPBITMAPINFO ) tabsell ) );
}

HB_FUNC( BMP_TABSELR )
{
   fw_retnll( ( HBITMAP ) CreateMemBitmap( ( LPBITMAPINFO ) tabselr ) );
}

#pragma ENDDUMP


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: tabs look 2015

Postby Silvio.Falconi » Sun Mar 01, 2020 3:51 pm

Antonio Linares wrote:We haven't got it yet (as far as I remember)


Antonio,
as you wrote me on email I sent all sources to Mr Nages Rao
Tell me if you don't find it, I'll send it back
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: tabs look 2015

Postby Silvio.Falconi » Sun Mar 01, 2020 5:26 pm

Antonio,
I resent you Now a zip file with the ttabs class
but I had a Mail Delivery Subsystem, I resent now another
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: tabs look 2015

Postby Antonio Linares » Mon Mar 02, 2020 7:45 am

Dear Silvio,

I got your file, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests