{
case WM_INITDIALOG:
return OnInitDialog( hwnd );
}
return FALSE;
}*,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
3. 멤버함수는 클래스의 인스턴스가 존재 해야지만 호출할수 있지만 인스턴스가 존재 하지 않아도
쓸수 있는 방법이 바로 static 맴버함수이다.
{
case WM_INITDIALOG:
return OnInitDialog( hwnd ); // ->error (non-static fuction)
}
return FALSE;
}
<2> static 함수내에서 객체의 인스턴스를 통한 멤버함수 호출은 적법하다.
PCMyClass g_pMyClass; // 1)
int WINAPI CMyClass::DlgMain(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PCMyClass myClass = new CMyClass; // 2)
g_pMyClass = myClass;
...
// 콜백함수 호출.
...
return 0;
}
{
case WM_INITDIALOG:
return pMyClass->OnInitDialog( hwnd ); // 4)
}
return FALSE;
}