-
November 3rd, 2012, 10:49 PM
#1
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
How can it be fixed?
Thank you very much
Jack
-
November 4th, 2012, 03:06 AM
#2
Re: VC++ 6.0 and DX8.0 application compilation problem.
Could you show how you call this function and what parameters pass in it?
Victor Nijegorodov
-
November 4th, 2012, 03:44 AM
#3
Re: VC++ 6.0 and DX8.0 application compilation problem.
Originally Posted by VictorN
Could you show how you call this function and what parameters pass in it?
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 ) )
Last edited by lucky6969b; November 4th, 2012 at 03:47 AM.
-
November 4th, 2012, 05:19 AM
#4
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)
Victor Nijegorodov
-
November 5th, 2012, 03:15 AM
#5
Re: VC++ 6.0 and DX8.0 application compilation problem.
Hi Victor,
I did not redefine it. It was contained inside the application framework of DirectX 8.1 SDK.
Thanks
Jack
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|