Sign in to follow this  

DirectInput Compiling Problem

This topic is 4335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this