Hi;
I have made a MCQ based game in Visual C++ using MFC. It runs fine but it shuts down when some key is pressed unintentionally. Like, if you click the options with mouse click, it works fine but even if you press ENTER key during the game, it quits immediately. What could be the reason? Does it have anything to do with Keyboardstate declaration? If anybody had such experience, kindly share your solution.
Learning78 0
Light Poster
Recommended Answers
Jump to PostThat's a famous behavior of MFCs Close button -- the Close button is activated when the Enter key is pressed. One way to fix that is to catch the WM_CLOSE event and ignore it, but then you might not be able to close the program at all.
Another way …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.