My code is causing assertion errors on several functions that I've used successfully before without problems, such as here I'm using GetWindowRect on a CStatiic variable within a CRecordView class.

_AFXWIN_INLINE void CWnd::GetWindowRect(LPRECT lpRect) const
	{ ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
I've used this before in the same place in my code without any problems.

I'm following a tutorial on CodeGuru for creating a property sheet inside a property page, and Sheet.ModifyStyleEx within OnInitDialog on my property page also fails at
I dont know why this is happenning and any suggestions would be appreciated, thanks.