WM_CHAR problems

This is a discussion on WM_CHAR problems within the C++ Programming forums, part of the General Programming Boards category; I am trying to see what key the user pressed by checking WM_CHAR method. This works, but I cant check ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    132

    WM_CHAR problems

    I am trying to see what key the user pressed by checking WM_CHAR method. This works, but I cant check for VK_UP,LEFT,RIGHT,DOWN, HOME, etc. I can get the return key and the backspace key, but not some keys. What is going on?

    PHP Code:
            switch (TCHAR(wParam))
            {
            case 
    VK_BACK:
                if (
    CEnv.strinp.length()>0)
                    
    CEnv.strinp.erase(CEnv.strinp.end()-1);
                break;
            case 
    VK_TAB:
                break;

            case 
    VK_UP:
                
    //move the current cmd up one history item.
                
    CEnv.strinp "hiuahsda";//CEnv.cmdHistory.front().strCmd ;
                
    break;

            case 
    VK_DOWN:
                
    CEnv.strinp "hiuahsda";//CEnv.cmdHistory.front().strCmd ;
                
    break;
    default:
        
    CEnv.strinp+=(TCHAR)wParam;
        break;

    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

  2. #2
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    Noone knows?
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Bumping your threads, (posting to move your own threads up the list), is against the rules, and may result in your thread being deleted.

    Doing so after just 90 minutes is impatience bordering on rudeness.

    Rules.

    Is this code in a dialog? For an edit box?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    Sorry for bumping.

    It is not for an edit box, I am making a console for my engine. I just don't get the VK_UP and VK_DOWN vkeys. While I get all other keys, it is weird not to get those.
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 03:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 09:19 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 04:35 PM

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