Archived

This topic is now archived and is closed to further replies.

sherman

DirectInput8 and Virtual Keys in Windows ME

Recommended Posts

sherman    151
Dear friends, This is my first time using DirectX8 so please be gentle ^_^;. I am trying to code my own game using the Donuts3D sample as my point of reference. However, I am using the D3DApp and also adding more OO code to it. Everything works fine in Windows2000 but I am having trouble calling up the Quit menu with the "escape" key or the Game menu with the "F1" key in WindowsME. The DirectInput8 action mapping for both the keys is as follows: { INPUT_DISPLAYGAMEMENU, DIKEYBOARD_F1, DIA_APPFIXED, TEXT("Display game menu"), }, { INPUT_QUITGAME, DIKEYBOARD_ESCAPE, DIA_APPFIXED, TEXT("Quit game"), } It is exactly the same as the Donuts3D code and Donuts3D works fine on WindowsME. So, I suspect it is something to do with WindowsME and my OO code. Previously, all the DirectInput key mappings did not work in WindowsME and "Escape" and "F1" did not work in Windows2000 because I coded the DIACTION structure as a class variable. I solved that by moving the DIACTION structure out of the class and initializing it as a global variable. Although it miraculously solved all my problems in Windows2000, both the "Escape" and "F1" keys are still not working in WindowsME. o_0; Could someone please explain to me why I can''t have the DIACTION structure as a class variable and how I can solve the problem with WindowsME? Thank you. ^_^ Best regards, Sherman

Share this post


Link to post
Share on other sites