Non-static members not accessible in static function
问题 I have defined a function HRESULT AMEPreviewHandler:: CreateHtmlPreview() { ULONG CbRead; const int Size= 115000; char Buffer[Size+1]; HRESULT hr = m_pStream->Read(Buffer, Size, &CbRead ); //this m_pStream is not accessible here even it is declared globally. the program is asking me to // declare it static because this CreateHtmlPreview() function called //inside the Static function (i mean here :-static CreateDialog\WM_Command\CreateHtmlPreview();) //but if i declare it static the two