vcl

Load Jpg/Gif/Bitmap and convert to Bitmap

♀尐吖头ヾ 提交于 2019-11-26 10:34:36
问题 I have to load an image from an XML file. There is no information in the XML file about whether the image is JPG/GIF/BMP. After loading the image, I need to convert it to Bitmap. Does anyone have any clue how to convert images to Bitmap without knowing the actual file format? I\'m using Delphi 2007/2009 Thank you. 回答1: Delphi 2009 comes with built in support for JPEG, BMP, GIF and PNG. For earlier versions of Delphi you may need to find third party implementations for PNG and GIF, but in

How to add mouse wheel support to a component descended from TGraphicControl?

a 夏天 提交于 2019-11-26 08:33:48
问题 I have created a delphi component which descends from TGraphicControl. Is it possible to add support for mouse wheels? --- Edit --- I\'ve exposed the MouseWheel events as shown below but they aren\'t called. TMyComponent = class(TGraphicControl) published property OnMouseWheel; property OnMouseWheelDown; property OnMouseWheelUp; end; --- Edit --- As suggested below, I\'ve tried to trap the WM_MOUSEWHEEL and CM_MOUSEWHEEL messages, but it doesn\'t seem to work. However I\'ve managed to trap