Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAccessing the parent's data members Pin
Vancouver10-Jun-07 15:26
Vancouver10-Jun-07 15:26 
AnswerRe: Accessing the parent's data members Pin
Christian Graus10-Jun-07 16:29
protectorChristian Graus10-Jun-07 16:29 
GeneralRe: Accessing the parent's data members Pin
Vancouver10-Jun-07 18:01
Vancouver10-Jun-07 18:01 
GeneralRe: Accessing the parent's data members Pin
Christian Graus10-Jun-07 18:16
protectorChristian Graus10-Jun-07 18:16 
GeneralRe: Accessing the parent's data members Pin
Vancouver10-Jun-07 18:25
Vancouver10-Jun-07 18:25 
GeneralRe: Accessing the parent's data members Pin
Christian Graus10-Jun-07 18:46
protectorChristian Graus10-Jun-07 18:46 
GeneralRe: Accessing the parent's data members Pin
Vancouver10-Jun-07 19:01
Vancouver10-Jun-07 19:01 
AnswerRe: Accessing the parent's data members Pin
Rajkumar R10-Jun-07 19:16
Rajkumar R10-Jun-07 19:16 
When you use forward declaration. The forward declared variable cannot be accessed in the declaration file, since compiler only knows the pointer and allocates the size of pointer when you access it, compiler won't have enough information to do this.


ctl_MyControl.Parent = this;
Is this statement is in declaration file, if so, use this in a function definition is cpp file.

Since the dialog is immediate parent, you know the level of the parent class, you can use john's method (dynamic cast the parent window).

Best Regards
Raj
AnswerRe: Accessing the parent's data members Pin
John M. Drescher10-Jun-07 17:42
John M. Drescher10-Jun-07 17:42 
GeneralRe: Accessing the parent's data members Pin
Vancouver10-Jun-07 19:07
Vancouver10-Jun-07 19:07 
GeneralRe: Accessing the parent's data members Pin
John M. Drescher11-Jun-07 21:23
John M. Drescher11-Jun-07 21:23 
QuestionConstructors Pin
tom groezer10-Jun-07 11:57
tom groezer10-Jun-07 11:57 
AnswerRe: Constructors Pin
toxcct10-Jun-07 12:04
toxcct10-Jun-07 12:04 
GeneralRe: Constructors Pin
Stephen Hewitt11-Jun-07 18:40
Stephen Hewitt11-Jun-07 18:40 
AnswerRe: Constructors Pin
Rajkumar R10-Jun-07 19:34
Rajkumar R10-Jun-07 19:34 
AnswerRe: Constructors Pin
Stephen Hewitt11-Jun-07 18:41
Stephen Hewitt11-Jun-07 18:41 
QuestionWhat is in-class constant? Pin
tom groezer10-Jun-07 11:30
tom groezer10-Jun-07 11:30 
AnswerRe: What is in-class constant? Pin
Mark Salsbery10-Jun-07 11:50
Mark Salsbery10-Jun-07 11:50 
QuestionC++ gotchas Pin
tom groezer10-Jun-07 11:12
tom groezer10-Jun-07 11:12 
AnswerRe: C++ gotchas Pin
CPallini10-Jun-07 11:19
mveCPallini10-Jun-07 11:19 
GeneralRe: C++ gotchas Pin
tom groezer10-Jun-07 11:22
tom groezer10-Jun-07 11:22 
GeneralRe: C++ gotchas Pin
Christian Graus10-Jun-07 11:59
protectorChristian Graus10-Jun-07 11:59 
GeneralRe: C++ gotchas Pin
CPallini10-Jun-07 20:57
mveCPallini10-Jun-07 20:57 
GeneralRe: C++ gotchas Pin
Roger Stoltz10-Jun-07 21:57
Roger Stoltz10-Jun-07 21:57 
GeneralRe: C++ gotchas Pin
CPallini10-Jun-07 22:11
mveCPallini10-Jun-07 22:11 

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.