FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dental program
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
Dental program
Posted: Sun Sep 10, 2006 08:03 AM
Antonio Linares wrote:Willy,

Please email me those bitmaps, thanks.


Sended

By
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dental program
Posted: Sun Sep 10, 2006 08:35 AM
Willy,

Do it this way: (warning: don't use ADJUST clause)
#include "FiveWin.ch"

Function Test() 

   Local oDlg, oBmpColor , oBmpBlackWhite 

   Local cTitle := "Testing" 

   DEFINE DIALOG oDlg FROM 0,0 TO 320, 280 TITLE cTitle Pixel // 500 Width 

   @ 0, 0 Bitmap oBmpBlackWhite Filename "01-01.Bmp" Of oDlg Pixel // 100 High 

   @ 0, 110 Bitmap oBmpColor Filename "01-00.Bmp" Of oDlg Pixel // 100 High 

   oBmpBlackWhite:bLClicked := {|nRow,nCol|GetZone(nRow,nCol,oBmpColor,oDlg)} 

   ACTIVATE DIALOG oDlg CENTERED On Init oBmpColor:Hide() 

Return Nil 

************************************************************** 
Static Function GetZone(nRow,nCol,oBmpColor,oDlg) 

local hDC := CreateCompatibleDC( oDlg:GetDC() )
local hOldObj := SelectObject( hDC, oBmpColor:hBitmap )
Local nColor := GetPixel( hDC, nCol,nRow ) 

   SelectObject( hDC, hOldObj )

   oDlg:ReleaseDC() 
   DeleteDC( hDC )

   ? "Kleur : " + AllTrim(Str(nColor)) , "Col : " + AllTrim(Str(nCol)) , "Row : " + AllTrim(Str(nRow)) 

Return Nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
Dental program
Posted: Tue Sep 12, 2006 05:41 AM

Hello,

I had some version problems between FWH and xHB. Now they are solved.

So I could restart testing.

The example you gave is working fine now.

So I can start with the next point.

Thanks Antonio.

Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
Dental program
Posted: Tue Sep 12, 2006 06:44 AM
Antonio Linares wrote:Willy,

oBmp1:bPainted = { | hDC | TransBmp( oBmpX:hBitmap, oBmp1:nWidth(), oBmp1:nHeight(), nClrTransparent, hDC, 0, 0, oBmp1:nWidth(), oBmp1:nHeight() }


Hello,

This gaves also some problems.

Is there a working example of TransBmp() or a description. I do'nt find anything in the manual.

Has it to be called from inside the object by a method.

Is oBmpX simply a bmp that can be loaded via LoadBmp()

Sorry for the trouble. But I think this is very undocumented and it can be very usefull for a lot of users.

Greetings
Willy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dental program
Posted: Tue Sep 12, 2006 07:48 AM

Willy,

> This gaves also some problems.

What problems are them ?

>
Is there a working example of TransBmp() or a description. I do'nt find anything in the manual.
>

No, it is not documented yet as it was recently added and modified.

> Has it to be called from inside the object by a method.

You can call it everywhere as far as you provide it the right parameters.

> Is oBmpX simply a bmp that can be loaded via LoadBmp()

You may use LoadBitmap( GetResources(), cResName ) --> hBitmap

warning: it returns a bitmap handle, not a Class TBitmap object.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Dental program
Posted: Tue Sep 12, 2006 08:57 AM

Antonio, Wich theme use into your pc '
It is very beautifull I'd like to have it ...

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dental program
Posted: Tue Sep 12, 2006 11:45 AM

Silvio,

Thats Windows Vista (with "Aero"), not XP :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion