directInput in MFC.

Started by
0 comments, last by Evil Steve 16 years, 4 months ago
hi there, is there anybody know where to put Key pressed detection in the MFC project(DIALOG based) ? In the MFC dialog based project, I initialized the directinput in the InitDialog(): DirectInput8Create CreateDevice SetDataFormat SetCooperativeLevel pIDirectInputDevice->Acquire every one return just ok.. now i need to check if there is a key pressed, pIDirectInputDevice->GetDeviceState the problem is : where should i put this in the MFC project? the project is MFC dialog, which i can not change, i just need to add the directinput in to to replace the MFC key press response... i am not very familiar with MFC, which virtual function, or which message handler should i add the Directinput checking into? thank you very much! winston
Advertisement
Just poll in your main loop (Wherever that is). Also, I really hope you're not using DirectInput for keyboard input...

This topic is closed to new replies.

Advertisement