Dental program

Postby Willy » Sun Sep 10, 2006 8:03 am

Antonio Linares wrote:Willy,

Please email me those bitmaps, thanks.


Sended

By
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Sun Sep 10, 2006 8:35 am

Willy,

Do it this way: (warning: don't use ADJUST clause)
Code: Select all  Expand view
#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

Image
regards, saludos

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

Postby Willy » Tue Sep 12, 2006 5: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.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Tue Sep 12, 2006 6: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
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Tue Sep 12, 2006 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Tue Sep 12, 2006 8:57 am

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

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Tue Sep 12, 2006 11:45 am

Silvio,

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

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 35 guests