DirectInput or WM_KEYDOWN question

This is a discussion on DirectInput or WM_KEYDOWN question within the Game Programming forums, part of the General Programming Boards category; Suppose you created a DirectInput object and connected it with the keyboard to process inputs in a game loop (and ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    60

    DirectInput or WM_KEYDOWN question

    Suppose you created a DirectInput object and connected it with the keyboard to process inputs in a game loop (and the cooperative level is DISCL_NONEXCLUSIVE):
    If the game runs in a clipped window with a menu bar, and the user presses the Alt-key:
    Will this activate the Menu Bar or has Windows stopped sending messages concerning keyboard inputs like WM_KEYDOWN (because of DirectInput)-allowing DirectInput to handle the Alt-key in its own way?

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I think it would be handled by DirectInput, but i'm not entirely sure.

  3. #3
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    System keys like ALT aren't affected by DirectInput. Even with exclusive mode a user can ALT-Tab out of a DirectX app.

  4. #4
    Registered User
    Join Date
    Dec 2001
    Posts
    60

    Thanks jdinger

    Thanks you helped me out again jdinger. (I'm an absolute beginner but I think my 2d Simcity-like game needs menus too look more professional I think)

  5. #5
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    If you're using DirectDraw I can send you the code for the GUI/menu section of my Dx7 engine. Email or PM me if you're interested.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21