Please help me run this code

https://cs.senecac.on.ca/~gam670/pages/content/force.html

This website provides sample code for forced feedback joystick. I wanted to try it with my Logitech Force 3D pro joystick. I used MS Visual studio professional 2013 to run the code, but I am getting errors. Looks like I am missing somethings. I ran the first code and getting error.

IDD_DLG DIALOG DISCARDABLE 5, 5, 200, 250
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select a Device, a Resolution, and a Joystick"
FONT 8, "MS Sans Serif"

BEGIN
LTEXT "Display Device", IDC_STATIC, 10, 5, 50, 10
COMBOBOX IDC_DISPLAY, 10, 20, 180, 50, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Resolution", IDC_STATIC, 10, 45, 50, 10
COMBOBOX IDC_RESOLUTION, 10, 60, 180, 50, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Joystick", -1, 10, 85, 50, 10
COMBOBOX IDC_INPUT, 10, 100, 180, 50, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Activation button", -1, 10, 125, 100, 10
COMBOBOX IDC_BUTT, 10, 140, 180, 50, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Force Feedback Effect", -1, 10, 165, 80, 10
AUTOCHECKBOX "Disable Feedback", IDC_NOFF, 100, 165, 80, 10, WS_DISABLED
COMBOBOX IDC_FF, 10, 180, 180, 50, CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Reverse Y Axis", IDC_Y, 10, 205, 65, 10
AUTOCHECKBOX "Use Z Axis (if available)", IDC_Z, 85, 205, 100, 10
DEFPUSHBUTTON "Go", IDC_GO, 30, 225, 50, 15, WS_DISABLED
PUSHBUTTON "Cancel", IDCANCEL, 100, 225, 50, 15
END

I ran this code and got errors

Can someone please help me in running these codes?

error C2146 syntax error: missing ';' before identifier 'DIALOG' line 1

error C4430 missing type specifier - int assumed. Note: C++ does not support default-int line 1

error C2146 syntax error: missing ';' before identifier 'DISCARDABLE' line 1

error C2143 syntax error: missing ';' before 'constant' line 1

error C2146 syntax error: missing ';' before identifier 'DS_MODALFRAME' line 2

error C4430 missing type specifier - int assumed. Note: C++ does not support default-int line 2

error C2143 syntax error: missing ';' before '|' line 2

IntelliSense: identifier "IDD_DLG" is undefined line 1

IntelliSense: identifier expected a ';' line 1

IntelliSense: identifier "STYLE" is undefined line 2

IntelliSense: identifier expected a ';' line 2
Last edited on
Topic archived. No new replies allowed.