#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
//----------------------------------------------------------------------------//
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
}
#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,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x1C, 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
// 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
#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, 0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, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0xFF, 0x00, 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
Antonio Linares wrote:We haven't got it yet (as far as I remember)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 75 guests