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.
Code:
void Update (CWindowFrame *window);
There is a protected member called win, type of wnWindowStruct.
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:
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.
}
Now, Lets say i have another class, which inherits from the CRTBase:
Code:
class CRTCamera : protected CRTBase
{
...functions here
};
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.
Any ideas?
Thanks a lot