Ticket Q539448
Visible to All Users

unit dxGDIPlusClasses added even if no dx or cx components are used

created 11 years ago

Hi!
Sometimes the unit dxGDIPlusClasses is automatically included in the uses clause even if no cx or dx component is used.
This problem is probably the same as in Q404266 and Q450460.
I have enclosed a test project. The skin library is not used.
Please open the Splash unit, add a space somewhere in the code and save. The dxGDIPlusClasses will be added to the Splash unit. Or however is what it's happening here.
TIA,
Domenico

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hello,
Thank you very much for your demo, which clearly demonstrates the described behavior. The dxGDIPlusClasses unit is added automatically because of the PNG image used in your project. The behavior is very similar to what happens when you add a JPEG image to the project - the standard VCL Vcl.Imaging.jpeg unit is added immediately. We use the dxGDIPlusClasses unit to render PNG images and substitute standard VCL rendering mechanism with this unit. This behavior was implemented before the Delphi IDE started to support PNG images and we still use our own mechanism instead of the standard one because it works OK. In other words, once you install our controls, dxGDIPlusClasses is added automatically instead of the standard unit.
If you wish to avoid this behavior, please follow the suggestion provided in the RAD Studio 2009 and later - Make TdxPNGImage class registration optional for loading PNG images ticket. However, I do not see an obvious reason for doing so.

    Comments (2)
    DM DM
    Domenico Mammola 11 years ago

      Thanks for your answer Paulo!
      Sometimes it could be preferable to have a complete control of the unit included in the source. For instance (from my real experience): I'm developing an application which uses the DevExp components and which must include an extra library. This library is shared between my project (with DevExp comps) and a project of a collegue (who doesn't use DevExp components).
      If I edit a unit of the common library by adding a png image, I don't want to add any DevExp unit.
      Obviously I can disable the DevExp packages for my project, then edit the unit and then re-enable the DevExp packages. Not a big trouble, only quite annoying if repeated more than a few times.
      However thanks for the suggestion S34199.
      Domenico

      DevExpress Support Team 11 years ago

        Thank you for your feedback. I hope that the RAD Studio 2009 and later - Make TdxPNGImage class registration optional for loading PNG images information will help you simplify the development.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.