Find Jobs
Hire Freelancers

Simple C++ Builder Interposer class to enhance TSpeedButton to support Alpha channel icons

$10-30 USD

İptal edildi
İlan edilme: 8 yıldan fazla önce

$10-30 USD

Teslimde ödenir
The out-of-the-box C++ Builder (2009) TSpeedButton doesn't handle icons with Alpha Channel well. Especially when I copy icons from a TImageList with ColorDepth = cd32Bit to the Speedbutton, is the Alpha channel data ignored and painted badly. E.g. current code example: Button->Glyph->Assign(NULL) ; // Clear the current bitmap Images->GetBitmap(ImageIndex, Button->Glyph); Various information can be found in questions / posts but I suggest you check this one: [login to view URL] The main issue here is that the TSpeedButton's internally managed ImageList is private and hence simply subclassing and setting FGlyphList->ColorDepth = cd32Bit is not possible. I have a number of SpeedButtons in my existing project and I would like to keep it that way. So I need a good and easy way to 'enhance' those buttons so that they can handle the icons with alpha channel data that I keep in an ImageList. My thought goes to an interposer TSpeedButton class that handles this. Kindly let me know if my thinking is wrong here and if what I ask is not possible. The idea is that the program is fooled to use this interposer class that inherits from VCL's TSpeedButton. The proposed change for the new TSpeedButton is that I assign my TImage instance to it and and an ImageIndex. SpeedButton->Images = Images ; SpeedButton->ImageIndex = xx ; Mentioned article hints on how to do that. The internally kept FGlyphList should not be used anymore. I will change my code then to not copy the bitmap to glyph, but simply assign an ImageIndex. I believe that, for somebody who is used to Delphi / C++ Builder writing / changing components this is a fairly quick and easy job to do. Correct me if I see this wrong. Put the code in a .h and .cpp file, I want to simply include the .h file in my main project .h file and include the .cpp file in my main project .cpp file. The code needs to work correctly in C++ Builder 2009 but enough care should be taken for it to also work in future versions of C++ Builder as I plan to upgrade one of these days.
Proje No: 9599410

Proje hakkında

2 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 8 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir

Müşteri hakkında

   BELGIUM bayrağı
Bilzen, Belgium
5,0
14
Ödeme yöntemi onaylandı
Kas 19, 2008 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.