[MFC] [C++] serialization: saving figures' colours

ROG 21 Reputation points
2021-08-29T17:39:11.48+00:00

hey,

I'm working on a 'Paint' project in MFC and I'm trying to save the colours of every figure.

I save the point of the objects like this:
ar << p1;

in the Serialize(CArchive& ar) function

and it works.
so I tried saving the colours the same way:

ar << bkColour;

and it doesn't work. (upon saving and loading the figures are restored just without colours.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,519 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 111.8K Reputation points
    2021-08-29T18:39:55.72+00:00

    Maybe the order and variables of '>>' do not correspond to '<<'?

    0 comments No comments