Ok, I will try to explain things as best as I can. I have a 'base' class called CRTBase. This class is pretty simple, it contains just a member function Update which takes as parameter a pointer to the CWindowFrame class.
There is a protected member called win, type of wnWindowStruct.Code:void Update (CWindowFrame *window);
My code here is simple. the CWindowFrame class has an instance to a struct called wnWindowStruct.
so, here is my code for the Update method:
Now, Lets say i have another class, which inherits from the CRTBase:Code:void Update(CWindowFrame *window) { ZeroMemory(&win,sizeof(wnWindowStruct)); win = window->GetWindowStruct(); //GetWindowStruct() returns the instance of the struct used //in the CWindowFrame, which's contents will change on the fly. //So this struct needs to be updated in every frame. }
What I need to do is have access to the protected member 'win' of the base class. Which I do have. The problem is that the contents of the wnWindowStruct win, are empty! I use the Update(&window) after creating and registrating the main window. For example, the width member of the 'win' variable must be 640. but it is 0.Code:class CRTCamera : protected CRTBase { ...functions here };
Any ideas?
Thanks a lot



LinkBack URL
About LinkBacks


