🔒 Locked
D3DAPP.cpp problems
Advertisement
Original Post
I was trying to compile some examples from the CD that came with Beginning Direct 3D Game Programming, but I keep getting a conversion error in D3DAPP.cpp in the SelectDevice function.
I didn''t alter any files (especially the common files), and they use to compile, but somehow either the function declaration got changed or the parameter being passed was changed, but I don''t know how it could have happened.
The error is
It compiled fine when I first installed it, and the files have always maintained read only status, meaning I couldn''t have changed it. I can''t figure out how else it would bave been changed.
The DMBoids example compiles, and I think it uses D3DAPP, so I don''t know what the problem is.
A bit off topic, due to circumstances beyond my control the debate in the lounge passed its statute of limitations, so if anyone is interested in continueing a new thread will have to be started.
quote:
d3dapp.cpp
C:\mssdk\samples\Multimedia\Common\src\d3dapp.cpp(1225) : 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
Error executing cl.exe.
BASIC.exe - 1 error(s), 0 warning(s)
It compiled fine when I first installed it, and the files have always maintained read only status, meaning I couldn''t have changed it. I can''t figure out how else it would bave been changed.
The DMBoids example compiles, and I think it uses D3DAPP, so I don''t know what the problem is.
A bit off topic, due to circumstances beyond my control the debate in the lounge passed its statute of limitations, so if anyone is interested in continueing a new thread will have to be started.
I got to thinking. Since it''s a problem compiling would it be better off in the programming board, or is it in the right place since it deals with DX common files?
If it would be better served in the programming forum could an administrator please move it there (if there are rules against double posting, which would prevent me from posting this there)?
If it would be better served in the programming forum could an administrator please move it there (if there are rules against double posting, which would prevent me from posting this there)?
quote:
Original post by dwmitch
If it would be better served in the programming forum could an administrator please move it there (if there are rules against double posting, which would prevent me from posting this there)?
Don''t worry about that for the time being. If it needs moving, I''ll move it.
Could you paste the line of code that it''s having problems with (line 1225 of d3dapp.cpp)?
// Prompt the user to change the mode
if( IDOK != DialogBoxParam( (HINSTANCE)GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_SELECTDEVICE), m_hWnd,
SelectDeviceProc, (LPARAM)this ) )
return S_OK;
Like I said, it has always been read only, so I don''t know how it could have been changed.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement