Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Shortcut Bar
  New Posts New Posts RSS Feed - Alphachannel-Bitmaps in Shortcutbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Alphachannel-Bitmaps in Shortcutbar

 Post Reply Post Reply
Author
Message
RJungmann View Drop Down
Groupie
Groupie


Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote RJungmann Quote  Post ReplyReply Direct Link To This Post Topic: Alphachannel-Bitmaps in Shortcutbar
    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 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2008 at 1:20pm
Hi,
Attach some sample that has problem.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
RJungmann View Drop Down
Groupie
Groupie


Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote RJungmann Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2008 at 7:41am
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
        
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2008 at 9:24am
Hi,
 
LoadImage can fail. Use Icons.LoadBitmap or Icons.LoadBitmapFromResource method to load alpha bitmap instead of
LoadImage.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
RJungmann View Drop Down
Groupie
Groupie


Joined: 05 February 2008
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote RJungmann Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2008 at 10:03am
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2008 at 1:08am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.