Sign in to follow this  
Digiflo

DirectInput Compiling Problem

Recommended Posts

Hi, I'm trying to compile the example code that came with the dx sdk (august 2005), but i keep getting this error: error C2664: 'CreateDialogParamA' : 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 The line that it refers to is: HWND hDlg = CreateDialog( hInst, MAKEINTRESOURCE(IDD_KEYBOARD), NULL, MainDlgProc ); I am using VS6 and xp sp1. The code is from the keyboard directinput part. Searched google but could not find any fixes that work, hope you can help.

Share this post


Link to post
Share on other sites
Try typecasting the MainDlgProc to be a DLGPROC, like this:

HWND hDlg = CreateDialog( hInst, MAKEINTRESOURCE(IDD_KEYBOARD), NULL, (DLGPROC)MainDlgProc );

Share this post


Link to post
Share on other sites
Your error appears to be PlatformSDK related. Either way...

Quote:
Original post by Digiflo
I am using VS6
Visual C++ 6 hasn't been a supported platform for over a year now. Given you're using Aug'05 there have been FOUR versions of the SDK that don't support your compiler.

Do yourself a favour and upgrade [wink]

Cheers,
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this