In C++ struct
is (almost) synonymous to a class
(except of different default access level), so yes, you can.
struct A {
// fields are public by default
};
class B: public A {
// fields are private by default
};
I'm not familiar with MFC, but it looks like an attempt to maintain both C and C++ APIs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…