how can i access my programs main hWnd in my class without making it global and externing it? Im currently trying to access it by passing it's memory address to my class using functions but all it seems to pass is garbage.
Code:
void Paddle::SethWnd(HWND *hWnd)
{
hWindow = hWnd;
}
HWND* Paddle::GethWnd()
{
return hWindow;
}
these are currently the functions i am using to pass it, and access it.
hWindow is a private member variable of the class and is a HWND*.
Ive tryed calling the SethWnd function in InitInstance and in WndProc either way i seem to get garbage, thanks in advance for any help.