Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: function access in base and derived classes Pin
Tim Craig22-Dec-09 17:06
Tim Craig22-Dec-09 17:06 
QuestionRe: function access in base and derived classes Pin
Avi Berger22-Dec-09 18:49
Avi Berger22-Dec-09 18:49 
AnswerRe: function access in base and derived classes Pin
Tim Craig22-Dec-09 18:58
Tim Craig22-Dec-09 18:58 
GeneralRe: function access in base and derived classes [modified] Pin
Avi Berger22-Dec-09 19:21
Avi Berger22-Dec-09 19:21 
GeneralRe: function access in base and derived classes Pin
Tim Craig22-Dec-09 21:36
Tim Craig22-Dec-09 21:36 
GeneralRe: function access in base and derived classes Pin
JudyL_MD23-Dec-09 2:20
JudyL_MD23-Dec-09 2:20 
GeneralRe: function access in base and derived classes Pin
Tim Craig23-Dec-09 9:31
Tim Craig23-Dec-09 9:31 
GeneralRe: function access in base and derived classes Pin
JudyL_MD23-Dec-09 10:08
JudyL_MD23-Dec-09 10:08 
We're taking a different philosophical approach (a pointer to a class versus deriving from a class) to the same domain but it still won't work. Or I can't find a way to finesse the compiler to make it work which is why I asked the question in the first place. Whether the "derived" class inherits from the base class (my way) or is its own class with a pointer to the "base" class (your way), the problem will always exist if I try to put the data items that are modified by the OS callbacks in the "base" class. In order for the callbacks to access the data items in the class, the data must be public. Data hiding dictates that the items are not public since no user / derivative of the class should manipulate them. Hence the conflict.

I've worked around it be making the items static at the module-level in the compilation unit that contains only the "base" class. As I said, I wasn't expecting a solution, but I asked just in case I had missed something.

Judy

Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein

Questionfatal error RC1015: cannot open include file 'res\Test.rc2' Pin
iwt.dev22-Dec-09 7:39
iwt.dev22-Dec-09 7:39 
AnswerRe: fatal error RC1015: cannot open include file 'res\Test.rc2' Pin
dxlee22-Dec-09 8:46
dxlee22-Dec-09 8:46 
AnswerRe: fatal error RC1015: cannot open include file 'res\Test.rc2' Pin
Abhi Lahare22-Dec-09 18:16
Abhi Lahare22-Dec-09 18:16 
Question[Message Deleted] Pin
transoft22-Dec-09 5:45
transoft22-Dec-09 5:45 
AnswerRe: .NET and COM PinPopular
Rajesh R Subramanian22-Dec-09 6:00
professionalRajesh R Subramanian22-Dec-09 6:00 
General[Message Deleted] Pin
transoft22-Dec-09 6:40
transoft22-Dec-09 6:40 
GeneralRe: .NET and COM PinPopular
Rajesh R Subramanian22-Dec-09 6:50
professionalRajesh R Subramanian22-Dec-09 6:50 
GeneralRe: .NET and COM Pin
Maximilien22-Dec-09 7:42
Maximilien22-Dec-09 7:42 
GeneralRe: .NET and COM PinPopular
Rajesh R Subramanian22-Dec-09 7:46
professionalRajesh R Subramanian22-Dec-09 7:46 
QuestionLife span of a Object???? Pin
ForNow22-Dec-09 4:29
ForNow22-Dec-09 4:29 
AnswerRe: Life span of a Object???? Pin
Maximilien22-Dec-09 4:37
Maximilien22-Dec-09 4:37 
GeneralRe: Life span of a Object???? Pin
ForNow22-Dec-09 5:44
ForNow22-Dec-09 5:44 
AnswerRe: Life span of a Object???? Pin
Rajesh R Subramanian22-Dec-09 4:45
professionalRajesh R Subramanian22-Dec-09 4:45 
GeneralRe: Life span of a Object???? Pin
LunaticFringe22-Dec-09 5:27
LunaticFringe22-Dec-09 5:27 
GeneralRe: Life span of a Object???? Pin
Rajesh R Subramanian22-Dec-09 6:02
professionalRajesh R Subramanian22-Dec-09 6:02 
GeneralRe: Life span of a Object???? Pin
LunaticFringe22-Dec-09 6:14
LunaticFringe22-Dec-09 6:14 
AnswerRe: Life span of a Object???? [modified] Pin
Nelek22-Dec-09 4:48
protectorNelek22-Dec-09 4:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.