I have a static member variable ,I want to initialize it by passing it to a function which modifies its own parameter ,like:
Class MyClass
{
static RECT rcRect;//The RECT structure defines the coordinates of the upper-left and lower-right corners of a rectangle.
}
GetClientRect(GetDesktopWindow(),&rcRect);
//Windows API,
//GetDesktopWindow retrieves a handle to the desktop window ,
//GetClientRect gets the coordinates of the desktop's client area ,
//and passes it to rcRECT
The only way I can think of is to initialize it in the main function . My question is :Is this the only way to do it? How Can I initialize it in the .h file ?