FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bitmap-Format of Record-selector in xBrowse ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Bitmap-Format of Record-selector in xBrowse ?
Posted: Mon Sep 15, 2008 12:33 PM
Hello,

There are still some little problems in the new
xbrowse-tools, i couldn't fix.

It is possible now, to have a real big preview with a database
of all used settings.
Because i can change the color of the RECORD-SELECTOR,
i have to add a new BITMAP for the pointer as well.
I couldn't find out, what format and colors for the bitmap i have to use.
I tested everything, Bitmaps are not shown transparent.
It is the same NON-transparent effect like Cellbitmaps on Brushes.
In this sample, the best result would be a white Arrow.
The xBrowse-class uses :

::hBmpRecSel := FwRArrow()

I think, FwRArrow() does the handling of the background.
I couldn't find the function ( is not included in the source ).

// BRSELECT2 = Bitmap
// SELCOLOR2 = Color of Rec-Selector

IF !EMPTY( BRSELECT2 )
   oBmp := ReadBitmap( 0, BRSELECT2 )
   oBrw:hBmpRecSel( oBmp )
ENDIF
DEFINE BRUSH oBrush COLOR SELCOLOR2 
oBrw:hBrushRecSel( oBrush )
RELEASE BRUSH oBrush




A Bitmap size : 9 x 15



How can i get a transparent symbol ?
It is not the same, like the bitmaps in cells.

Regards
Uwe :-)
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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bitmap-Format of Record-selector in xBrowse ?
Posted: Sat Sep 20, 2008 03:33 PM
Uwe,

This is the code for the arrow:
static far BYTE rarrow[] = {
0x42, 0x4D, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x70, 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, 0x80, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xFF,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00,
0x00, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00,
0x00, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xFF,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00 };

CLIPPER FWRARROW( PARAMS )  // --> hBitmap
{
   _retnl( ( LONG ) CreateMemBitmap( ( HDC ) 0, rarrow ) );
}

We get that array of bytes using Borland Resources Workshop (reviewing a bitmap as an array of bytes)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bitmap-Format of Record-selector in xBrowse ?
Posted: Sat Sep 20, 2008 03:34 PM

You can create your own FWRARROW() that just loads a bitmap from your resources or from a bitmap file.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion