Bug Report Q424175
Visible to All Users

The "Declaration terminated incorrectly" error occurs in certain cases when compiling Dxgdiplusapi.hpp in C++Builder due to a redeclared PixelFormat32bppPARGB constant

created 13 years ago

Hello! Every time I download and install a new DevExpress version I get the following error:

[BCC32 Error] Dxgdiplusapi.hpp(453): E2040 Declaration terminated incorrectly

in line

static const int PixelFormat32bppPARGB = 0xe200b;

(line 453 of Dxgdiplusapi.h).

Commenting the line the problem dissapear and nothing bad seems to happen, but I don't like that kind of "solutions".
Maybe you can help me.
Thanks!

Answers approved by DevExpress Support

created 10 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Other Answers

    created 11 years ago (modified 11 years ago)

    This error occurs after installing 13.2.5. The problem apparently has not been solved

      Comments (1)
      DevExpress Support Team 11 years ago

        You are right, the behavior is not changed yet. For now, you can use the solution provided by Jose, which is absolutely correct.

        created 13 years ago (modified 13 years ago)

        Ok, thanks!

          created 13 years ago (modified 13 years ago)

          Hello,
          A similar problem has been already discussed in our Support Center. Please refer to the include Gdiplus.h & dxBar.hpp ticket for the information.

            Comments (2)

              Thanks, Paul, but the solution given in that ticket is to update to the most recent DevExpress library, and I have already done that. In fact, updating to the last buil makes the problem raise again, and this means that it overwrites Dxgdiplusapi.hpp. So the problem is still there.
              Thanls.

              DevExpress Support Team 13 years ago

                Hello,
                It seems you are right, the problem is still there. It looks like the PixelFormat32bppPARGB constant is declared twice when you include the Gdiplus.h unit. I have informed our developers about this scenario, and they will consider the possibility to fix this problem with future versions of our controls. For now, you can use your solution, which is absolutely correct.

                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.