Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem using DirectInput in C gauge

Featured Replies

  • Commercial Member

Hi,I'm creating this gauge for my freeware panel which needs to read keyboard input directly into the gauge. In the great Dragonflight manual I found the cpp and h files and some instructions on how to set up the gauge, but when I compile in VC++6 I get compiler errors about LDIRECTINPUT not being properly declared or something.This question has been asked before in 2003 I think but I couldn't find the answer only that the user was able to fix the problem...Anybody here able to help me out ? Thx,Bj

simcheck_sig_banner_devteam.jpg

 

Bj

You need some header files form the directx sdk, at least the "dinput.h". If you have the files already you'll probably need to add or shift the include/library directories under "extras->Directories" so the DirectX includes/libraries are higher then the default include paths.Arne Bartels

  • Author
  • Commercial Member

Hi Arne,I'm not really sure what you mean with your answer. I shifted around the position of the header files in the c-codes and the errors during the compilation have gone but ow I get errors during the linking:"Linking... Creating library Release/BC_A300_FDATA.lib and object Release/BC_A300_FDATA.expBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _FreeDirectInputBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _CreatDirectInputDeviceBC_A300_FDATA.obj : error LNK2001: unresolved external symbol _GetFSWindowHandleRelease/BC_A300_FDATA.gau : fatal error LNK1120: 3 unresolved externalsError executing link.exe."I have included the necesarry lib files and dinput.h file etc... so everything should be in place. Does this ring any bells, can I maybe send you my source files so can have a look ?Thx for the help,Bj

simcheck_sig_banner_devteam.jpg

 

Bj

Did you add the "DInputKeyboard.cpp" to the project? It has to be compiled as a seperate module and then linked to the project. The simplest way is: open the gauge project, then open DInputKeyboard.cpp, then right click and chose "Add to project...".Arne Bartels

  • Author
  • Commercial Member

Arne,The module is included in the project. I removed and put it back again the way you said but that gives the same result. Edit: 09:05 same day...Found it ! The DKeyboardInput.cpp file had the DKeyboardInput.h commented out... hadn't really noticed that. Now it works perfectly ! Thx again Arne for the support.Bj

simcheck_sig_banner_devteam.jpg

 

Bj

  • 9 months later...

Hi,Where can I download "DInputKeyboard.cpp" and related files?Gabor

sd2gau17.zip on flightsim.com is Dai Griffiths tutorial. "DInputKeyboard.*" are part of this as sample code.Arne Bartels

Bj

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.