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. Yow can I serialize Color object (GDI+)

Yow can I serialize Color object (GDI+)

Scheduled Pinned Locked Moved C / C++ / MFC
winformsgraphics
7 Posts 2 Posters 0 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.
  • N Offline
    N Offline
    NoName II
    wrote on last edited by
    #1

    the subj.

    N 1 Reply Last reply
    0
    • N NoName II

      the subj.

      N Offline
      N Offline
      NiceNaidu fo
      wrote on last edited by
      #2

      Check this link http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarmfc/html/msdn_mfcclip.asp[^] Appu.. "If you judge people, you have no time to love them."

      N 1 Reply Last reply
      0
      • N NiceNaidu fo

        Check this link http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarmfc/html/msdn_mfcclip.asp[^] Appu.. "If you judge people, you have no time to love them."

        N Offline
        N Offline
        NoName II
        wrote on last edited by
        #3

        can't brouse the page...are u sure about the link?

        N 1 Reply Last reply
        0
        • N NoName II

          can't brouse the page...are u sure about the link?

          N Offline
          N Offline
          NiceNaidu fo
          wrote on last edited by
          #4

          Yes..It is getting opened here. Appu.. "If you judge people, you have no time to love them."

          N 1 Reply Last reply
          0
          • N NiceNaidu fo

            Yes..It is getting opened here. Appu.. "If you judge people, you have no time to love them."

            N Offline
            N Offline
            NoName II
            wrote on last edited by
            #5

            I can't.... mybe the priblem is couse use Opera?

            N 1 Reply Last reply
            0
            • N NoName II

              I can't.... mybe the priblem is couse use Opera?

              N Offline
              N Offline
              NoName II
              wrote on last edited by
              #6

              Could you post article here...or emai...

              N 1 Reply Last reply
              0
              • N NoName II

                Could you post article here...or emai...

                N Offline
                N Offline
                NiceNaidu fo
                wrote on last edited by
                #7

                Copying Data to the Clipboard Having registered a Clipboard format, we can look at copying data to the Clipboard. Let's first look at the OnUpdate. . . handler for the Edit Copy command: void CClipView::OnUpdateEditCopy(CCmdUI* pCmdUI) { int i = m_wndList.GetSelCount(); pCmdUI->Enable(i > 0 ? TRUE : FALSE); } If no items are selected, the command is disabled. This does two things: It shows the user the command won't do anything (it's grayed out), and it prevents us from getting Copy commands when there is nothing to copy. Let's look at the code for doing the actual copy operation: void CClipView::OnEditCopy() { // Get the number of selected items. int iCount = m_wndList.GetSelCount(); ASSERT(iCount > 0); // Get the list of selection IDs. int* pItems = new int [iCount]; m_wndList.GetSelItems(iCount, pItems); // Create a list. CMyObList ObList; // Add all the items to the list. int i; CMyObj* pObj; for (i=0; i The number of selected items is used to create a temporary array of selection IDs. The IDs are set into the array by calling GetSelItems. A new CMyObList is created and the pointer to each object is added to the list. Note that we are adding a reference to an object that is in use elsewhere, so it's important that we don't delete these objects by mistake when we're done here. Once the new CMyObList object has been built, a CSharedFile is created and an archive is created on top of the shared file. We can now serialize the list to the archive and, hence, to the shared file in memory. Once that's done, the memory of the shared file is detached, ready for sending to the Clipboard. The temporary CMyList object has all its items removed, not destroyed. The list object itself is, of course, destroyed when the function exits. The Clipboard is opened,

                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