How to paint a Transparent Bitmap on a Gradiant Dialog

User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Hi Mr.Fernando

Thanks for your reply.

As you have noted in my above postings, I am paiting the gradiation effect
through code and please note that I am not using any bitmap brush.

Please use my above code with your classes and test wether the required
effect is achieved or not.

If it is achived, then I can go for your product.

By the way I asked you in your very first posting about noway as under:


A) Can I take the focus on to the required buttons with Keyboard !.
( I did not find it in your demos ). I did not find any effect of Tab
Key on these buttons and there is no any shortcut key. In such
case the mouse is not working, it would a problem to handle the
dialog.

You have replied as under:

>>We have developed only a basic implementation in this version. In >>November build, it will be fully implemented.

May I know that your buttons can be managed through keyboard shortcut
keys or via Tabkey using your latest build ?

Is there any evaluation version of noway library ?

Regards to you and seasons greetings to you and your team.

- Ramesh Babu P
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Mr.Antonio

I could achieve exactly what I wanted, using Drawmasked(....)

Regards to you

- Ramesh Babu P
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ramesh,

Would you mind to post a small sample of how you have done it ? Thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Mr.Antinio

I am pleased to post this:

Code: Select all


#include "FiveWin.ch"

FUNCTION Main()

LOCAL oDlg, oBmp, hDC

DEFINE DIALOG oDlg SIZE 212, 106                                  ;
       COLORS CLR_BLACK, nRGB(224,167,64) TRANSPARENT PIXEL

ACTIVATE DIALOG oDlg CENTERED  ON PAINT                           ;
         ( gradiate_(oDlg, hDC, {CLR_WHITE, nRgb(224,167,64)},      ;
                   2,{0,0,oDlg:nHeight,oDlg:nWidth}), PaintBmp(oDlg,20,20)

RETURN nil

**********

FUNCTION PaintBmp(oDlg,row,col)

LOCAL cFile, aBmpPal, hBitmap

* This Code is for reading bitmap file from disk file
cFile   := "..\BITMAPS\QUESTION.BMP"
aBmpPal := PalBmpRead(oDlg:hDc,cFile)

* This Code is for reading bitmap file from resource
* aBmpPal := PalBmpLoad( "QUESTION" )

hBitmap := aBmpPal[ 1 ]

DrawMasked( oDlg:hDC, hBitmap, row, col )

RETURN nil

*********
And the result is:



Image

I am very happy now, that at the end of the Year I could butify my
application sufficiantly with this function strictly within FWH (without any
third party tool) in themed and non-themed applications.

Once again regards to you personally and your team and
regards to our frieds of the forum.

- Ramesh Babu P[/code]
Last edited by RAMESHBABU on Mon Dec 25, 2006 4:37 pm, edited 2 times in total.
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Mr.Fernando
in the next build we'll implement the other states of a button: pressed, disabled, focus.
I will wait for that build.

Thanks to you,

- Ramesh Babu P
areang
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Post by areang »

Mr. Ramesh

:lol: Good work :lol:

regards
areang
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Mr.Areang

Thank you very much.

Regards

- Ramesh Babu P
Post Reply