Bitmap-Format of Record-selector in xBrowse ?

Bitmap-Format of Record-selector in xBrowse ?

Postby ukoenig » 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 ).

Code: Select all  Expand view

// 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



Image

A Bitmap size : 9 x 15

Image

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

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

Postby Antonio Linares » Sat Sep 20, 2008 3:33 pm

Uwe,

This is the code for the arrow:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sat Sep 20, 2008 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests