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
Adding bitmaps to themed rPreview toolbar
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Silvio;
Read here:
[/url]
http://fivetechsoft.com/forums/viewtopic.php?t=4757
[url]
It absolutely works great!
Reinaldo.
Read here:
[/url]
http://fivetechsoft.com/forums/viewtopic.php?t=4757
[url]
It absolutely works great!
Reinaldo.
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
>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
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
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