Original Post
Everything wos goin along fine with MFC''s object oriented programming until now when i''m getting
this real annoying error message everytime i''m compiling the following source code:
the error message is:
ERROR: cannot convert long(struct _DDSURFACEDESC * ,void *) to long (__stdcall*) (struct _DDSURFACEDESC *,void *)
the source code is:
// callback function
HRESULT WINAPI CSettingDlg::DisplayModes(LPDDSURFACEDESC pddsd,LPVOID lpContext)
{
//blah blah
}
HRESULT CSettingDlg::LoadDisplayModes(LPDIRECTDRAW lpDD)
{
// this is where the error message is poping up
HRESULT hr = lpDD->EnumDisplayModes(DDEDM_STANDARDVGAMODES,NULL,NULL,DisplayModes);
}
Interestingly when i write the same codes in procedural method ( normal C-style procedural function)
it WORKS !!!!!!!!!!!!!!!!!!
Now, what''s goin on ???????
Please help