Adding bitmaps to themed rPreview toolbar

Post Reply
peterk
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Adding bitmaps to themed rPreview toolbar

Post by peterk »

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
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

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

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

Post by James Bott »

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
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

Silvio;

Read here:

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


It absolutely works great!

Reinaldo.
peterk
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Post by peterk »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Peter,

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

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

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

Falconi Silvio
peterk
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Post by peterk »

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
Post Reply