Antonio Linares wrote:Willy,
Please email me those bitmaps, thanks.
Sended
By
Antonio Linares wrote:Willy,
Please email me those bitmaps, thanks.
#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
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.
Antonio Linares wrote:Willy,
oBmp1:bPainted = { | hDC | TransBmp( oBmpX:hBitmap, oBmp1:nWidth(), oBmp1:nHeight(), nClrTransparent, hDC, 0, 0, oBmp1:nWidth(), oBmp1:nHeight() }
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.
Antonio, Wich theme use into your pc '
It is very beautifull I'd like to have it ...
Silvio,
Thats Windows Vista (with "Aero"), not XP ![]()