VC++ 6.0 and DX8.0 application compilation problem.
I need to re-compile an old DX8 application. Temp I don't want to recode it.
So I compile it in my XP VM with VC++ 6.0.
I got this
Code:
C:\DXSDK\samples\Multimedia\common\src\d3dapp.cpp(1308) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Re: VC++ 6.0 and DX8.0 application compilation problem.
Originally Posted by lucky6969b
Code:
static INT_PTR CALLBACK SelectDeviceProc( HWND hDlg, UINT msg,
WPARAM wParam, LPARAM lParam );
typedef long INT_PTR, *PINT_PTR;
// Prompt the user to change the mode
if( IDOK != DialogBoxParam( (HINSTANCE)GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_SELECTDEVICE), m_hWnd,
SelectDeviceProc, (LPARAM)this ) )
Why do you redefine INT_PTR?
By design of Microsoft it is mapped to int on 32-bit platforms, not to long!
You have to remove your typedef (or, at least correct it)
Bookmarks