Alphachannel-Bitmaps in Shortcutbar |
Post Reply |
Author | |
RJungmann
Groupie Joined: 05 February 2008 Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 05 February 2008 at 9:58am |
Hi,
I use a shortcutbar inside of a dockinpanel (version 11.2.1).
The bitmaps of the shortcutbar are 32Bit-BMP-Files with alphachannel and they are displayed correct. But if I start the program on a terminal server or by remote desktop connection they are not shown.
PNG-files are never shown. Using 24Bit-BMP-Files without alphachannel and defining the maskcolor for the transparent color works fine (remote, too), but it would be better for me, if I could use alphachannel-bitmaps so I don't have to change all of the bitmaps.
Regards,
Rene
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Attach some sample that has problem.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
RJungmann
Groupie Joined: 05 February 2008 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Hi,
we use DataFlex. It works different than vb.net for example. But I think, you will understand this example.
External_Function LoadImage "LoadImageA" User32.dll ; Integer hInst String sImage Integer iType Integer cx Integer cy Integer iFlags Returns Handle move (LoadImage (GetModuleHandle (0), "SC_NVKUND.BMP", IMAGE_BITMAP,0, 0, 0)) to hBitmap
send ComAddBitmap of hoImageManager hBitmap C_BITMAP_SC_NVKUND xtpImageNormal true
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
LoadImage can fail. Use Icons.LoadBitmap or Icons.LoadBitmapFromResource method to load alpha bitmap instead of
LoadImage.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
RJungmann
Groupie Joined: 05 February 2008 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Ok, I tried it with LoadBitmap, but the bitmap isn't loaded.
send ComLoadBitmap of hoImageManager "h:\xap7\bitmaps\SC_NVKUNDV.BMP" C_BITMAP_SC_NVOBJEKT XTPImageNormal
hoImageManager is a child-object from the shortcutbar from class cCJImageManagerIcons.
Because I haven't a resource, I can't trie LoadBitmapFromResource.
Very interesting is, that LoadImage/AddBitmap works fine, until I start the program from another computer by remote desktop. That's, what confuse me.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Your code "LoadImage (GetModuleHandle (0), "SC_NVKUND.BMP", IMAGE_BITMAP,0, 0, 0)) to hBitmap" seems load image from resource - not from file.
another option is add ImageManager object from CommandBars package, add images in designtime and assign them to ShortcutBar:
.Icons = ImageManager.Icons
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |