Adding bitmaps to themed rPreview toolbar

Adding bitmaps to themed rPreview toolbar

Postby peterk » Mon Nov 06, 2006 3:18 pm

Hi Antonio

I am trying to add different bitmaps to the themed rPreview toolbar
These bitmaps are contained in my normal RES file (not in Prev32.dll)
I cant get this to work
eg below even though Bmp_Pdf exists in my resources, it wont display

* Code snippet*
::oImageList:AddMasked( TBitmap():Define( ""BMP_Pdf"",, ::oWnd ), nRGB( 192, 192, 192 ) )

Do image lists require special kinds of bmps?
Would appreciate any assistance

Thanks
Peter
Peter
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Postby Silvio » Mon Nov 06, 2006 5:34 pm

How can you converte the preview in pdf file ?
Best Regards, Saludos

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

Postby James Bott » Tue Nov 07, 2006 2:15 am

Peter,

Where are you adding that code? If it is inside the rpreview function then you have to switch to your resources to load your bitmap, then switch back (see getResources() and setResources() near the top of the rpreview function in rpreview.prg). I also note that oImageList and oWnd are locals in this routine but you have them as instance vars.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby reinaldocrespo » Tue Nov 07, 2006 2:43 am

Silvio;

Read here:

[/url]
http://fivetechsoft.com/forums/viewtopic.php?t=4757
[url]


It absolutely works great!

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby peterk » Tue Nov 07, 2006 5:07 am

1) :: is there because we have converted rPreview to a class

2) The pdf utility we are using is www.utilitywarrior.com product

3) I did try "SET RESOURCES TO" before the
"::oImageList:AddMasked( TBitmap():Define( "BMP_Pdf", , ::oWnd ), nRGB( 255, 255, 255 ) )" line, but this does not work

4) I tried putting the bitmap in prev32.dll (using resource builder) - that also did not work

I am thinking that maybe theming requires a special type of bitmap ?
I have run out of ideas

Thanks
Peter
Peter
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Postby Antonio Linares » Tue Nov 07, 2006 4:16 pm

Peter,

Has the bitmap the same dimensions of the other bitmaps ?
regards, saludos

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

Postby James Bott » Tue Nov 07, 2006 4:22 pm

Peter,

>1) :: is there because we have converted rPreview to a class

Then, are you sure this code is getting linked in and used? One way to find out is to put a msgInfo() in it.

>I am thinking that maybe theming requires a special type of bitmap?

Not so, all my apps are themed and all my bitmaps work fine.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Tue Nov 07, 2006 11:18 pm

to converte rpreview to a class is easy... and then ?
Best Regards, Saludos

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

Postby peterk » Wed Nov 08, 2006 9:30 am

Hi All
I have resolved this. The problem was caused because the no of bitmaps in the imagelist is > than the no of btns, and I was assuming the my new pdf btn corresponded to the correct bmp in the imagelist.

I had to add a call to ::oBar:ChangeBitmap() to set my Pdf btn to the correct bmp. All ok now.

Thanks for the assistance
Peter
Peter
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 87 guests