Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. Direct2d CB 6.0 error

Direct2d CB 6.0 error

Scheduled Pinned Locked Moved Graphics
c++delphigraphicsgame-devhelp
4 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VovaL
    wrote on last edited by
    #1

    Windows XP/Vista/7 Microsoft Directx SDK (February 2010) Borland C++ 6.0 #include #include #include .... Whats the error [C++ Error] d2d1helper.h(193): E2034 Cannot convert 'const D2D_POINT_2F' to 'float'

    L P 2 Replies Last reply
    0
    • V VovaL

      Windows XP/Vista/7 Microsoft Directx SDK (February 2010) Borland C++ 6.0 #include #include #include .... Whats the error [C++ Error] d2d1helper.h(193): E2034 Cannot convert 'const D2D_POINT_2F' to 'float'

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      :confused: :confused: :confused: :confused: I have no idea what you are trying and what kind of help you want, as your message is very cryptic. However this[^] tells me D2D_POINT_2F is a structure holding two numbers. I am not surprised the compiler refuses to magically convert that into one number. :confused: :confused: :confused: :confused:

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      I only read formatted code with indentation, so please use PRE tags for code snippets.


      I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


      V 1 Reply Last reply
      0
      • V VovaL

        Windows XP/Vista/7 Microsoft Directx SDK (February 2010) Borland C++ 6.0 #include #include #include .... Whats the error [C++ Error] d2d1helper.h(193): E2034 Cannot convert 'const D2D_POINT_2F' to 'float'

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        The error here is that you have a point value, and you are trying to cast a single float. A point consists of 2 values, both of which must be supplied. Fill it with

        myD2DRef.x = x;
        myD2DRef.y = y;

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

        My blog | My articles | MoXAML PowerToys | Onyx

        1 Reply Last reply
        0
        • L Luc Pattyn

          :confused: :confused: :confused: :confused: I have no idea what you are trying and what kind of help you want, as your message is very cryptic. However this[^] tells me D2D_POINT_2F is a structure holding two numbers. I am not surprised the compiler refuses to magically convert that into one number. :confused: :confused: :confused: :confused:

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read formatted code with indentation, so please use PRE tags for code snippets.


          I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


          V Offline
          V Offline
          VovaL
          wrote on last edited by
          #4

          There are no other kods - 3 #include lines only. D2DBaseType.h : typedef struct D2D_POINT_2F { FLOAT x; FLOAT y; } D2D_POINT_2F; --- d2d1.h : typedef D2D_POINT_2F D2D1_POINT_2F; typedef struct { D2D1_POINT_2F point; D2D1_SIZE_F size; FLOAT rotationAngle; D2D1_SWEEP_DIRECTION sweepDirection; D2D1_ARC_SIZE arcSize; } D2D1_ARC_SEGMENT; --- d2d1helper.h : D2D1FORCEINLINE D2D1_ARC_SEGMENT ArcSegment( __in CONST D2D1_POINT_2F &point, __in CONST D2D1_SIZE_F &size, __in FLOAT rotationAngle, __in D2D1_SWEEP_DIRECTION sweepDirection, __in D2D1_ARC_SIZE arcSize ) { D2D1_ARC_SEGMENT arcSegment = { point, size, rotationAngle, sweepDirection, arcSize }; return arcSegment; } The main difference in structure D2D1_ARC_SEGMENT -> D2D1_POINT_2F point; and ArcSegment( __in CONST D2D1_POINT_2F &point, ... It should be critical -> point and &point :confused:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups