Alt-Enter?
How do I have it so if the user is pressing Alt - Enter then it triggers the event?
I know I need to use these commands put how do I get them to work together so they trigger fulscreen and window mod like Doom3?
VK_RETURN = Enter Key
VK_MENU = Alt Key. I does not work for some reason....
Can you handle the enter key being pressed? If so, think about how you could combine that with GetAsyncKeyState to your advantage. (It tells you if any one of a certain set of system keys is currently pressed or not.)
If, though, you're confused about handling key presses in general, some background information about your application would help in suggesting an answer. Since you're posting in the NeHe forum, though, I'll assume you already have the framework of key handling set up.
Best of luck!
-jouley
If, though, you're confused about handling key presses in general, some background information about your application would help in suggesting an answer. Since you're posting in the NeHe forum, though, I'll assume you already have the framework of key handling set up.
Best of luck!
-jouley
Well I am using the first lession on creating the window and I have this code:
if (keys[VK_RETURN]) // Is F8 Being Pressed?
{
keys[VK_RETURN]=FALSE; // If So Make Key FALSE
KillGLWindow(); // Kill Our Current Window
fullscreen=!fullscreen; // Toggle Fullscreen / Windowed Mode
// Recreate Our OpenGL Window
if (!CreateGLWindow("My First Render! - sort of",640,480,16,fullscreen))
{
return 0; // Quit If Window Was Not Created
}
I tried the VK_RETURN | VK_MENU but that does not work. I want it to trigger the fulscreen event on the code. I hope this helps.
if (keys[VK_RETURN]) // Is F8 Being Pressed?
{
keys[VK_RETURN]=FALSE; // If So Make Key FALSE
KillGLWindow(); // Kill Our Current Window
fullscreen=!fullscreen; // Toggle Fullscreen / Windowed Mode
// Recreate Our OpenGL Window
if (!CreateGLWindow("My First Render! - sort of",640,480,16,fullscreen))
{
return 0; // Quit If Window Was Not Created
}
I tried the VK_RETURN | VK_MENU but that does not work. I want it to trigger the fulscreen event on the code. I hope this helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement