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. C / C++ / MFC
  4. Problem in displaying image through CPictureHolder

Problem in displaying image through CPictureHolder

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 2 Posters 1 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.
  • G Offline
    G Offline
    Gopal_Kanchana
    wrote on last edited by
    #1

    Hi we are using CPictureHolder in order to display image through data. This data nothing but CString. we are doing the dcode(converting into byte) and creating the byte into CMemfile object. The problem is few image data not displaying the image. i am using below code. hr = ::OleLoadPicture(lpStream, maxLen, FALSE, IID_IPicture, (LPVOID*)&m_pPict); hr return as E_FAIL for some image data. please let me know what could be reason. Regards Gopal

    CPalliniC 1 Reply Last reply
    0
    • G Gopal_Kanchana

      Hi we are using CPictureHolder in order to display image through data. This data nothing but CString. we are doing the dcode(converting into byte) and creating the byte into CMemfile object. The problem is few image data not displaying the image. i am using below code. hr = ::OleLoadPicture(lpStream, maxLen, FALSE, IID_IPicture, (LPVOID*)&m_pPict); hr return as E_FAIL for some image data. please let me know what could be reason. Regards Gopal

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      From documentation:

      This function returns S_OK on success. Other possible values include the following.

      Return code

      description

      E_NOINTERFACE

      The object does not support the specified interface.

      E_POINTER

      The stream is not valid. For example, it may be NULL.

      So what's the actual return value you got? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      G 1 Reply Last reply
      0
      • CPalliniC CPallini

        From documentation:

        This function returns S_OK on success. Other possible values include the following.

        Return code

        description

        E_NOINTERFACE

        The object does not support the specified interface.

        E_POINTER

        The stream is not valid. For example, it may be NULL.

        So what's the actual return value you got? :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        G Offline
        G Offline
        Gopal_Kanchana
        wrote on last edited by
        #3

        Hi Returning as E_FAIL. but same image datai have used in C# using xmlreader it works fine.

        CPalliniC 1 Reply Last reply
        0
        • G Gopal_Kanchana

          Hi Returning as E_FAIL. but same image datai have used in C# using xmlreader it works fine.

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          That's in sharp contrast with the documentation. What is the numerical value?

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          In testa che avete, signor di Ceprano?

          G 1 Reply Last reply
          0
          • CPalliniC CPallini

            That's in sharp contrast with the documentation. What is the numerical value?

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            G Offline
            G Offline
            Gopal_Kanchana
            wrote on last edited by
            #5

            Hi Numerical value means is it hr return value. if not how do i get it numerical value

            G CPalliniC 2 Replies Last reply
            0
            • G Gopal_Kanchana

              Hi Numerical value means is it hr return value. if not how do i get it numerical value

              G Offline
              G Offline
              Gopal_Kanchana
              wrote on last edited by
              #6

              Hi I am using DWORD to fine numerical value. I getting this value (2147500037) conver into Hex(80004005). it says that (#define OLE_E_NOTRUNNING _HRESULT_TYPEDEF_(0x80040005L));

              1 Reply Last reply
              0
              • G Gopal_Kanchana

                Hi Numerical value means is it hr return value. if not how do i get it numerical value

                CPalliniC Offline
                CPalliniC Offline
                CPallini
                wrote on last edited by
                #7

                Gopal_Kanchana wrote:

                Numerical value means is it hr return value

                Yes I would like to know hr numerical value. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                In testa che avete, signor di Ceprano?

                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