Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8199761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:14:16+00:00 2026-06-07T06:14:16+00:00

So to make things clear, I’ll just state that there are three different ways

  • 0

So to make things clear, I’ll just state that there are three different ways to develop windows app through c++.

  1. Windows API. This is the fundamental interface and most laborious.
  2. MFC
  3. Windows Form with CLR

So yes, I want to do this the hard way, the windows API way. I already understand the basics and have a working program.

My problem is this:

case WM_KEYDOWN:
   rect2.top += 10;
   rect2.bottom += 10;
   InvalidateRect(hWnd, NULL, TRUE);
   return 0;

I only know that a key is down and have no idea how to be a little specific, perhaps the down key. Also how do you manually establish an event which only takes a double click in MFC or CLR. I hope you guys will answer and thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:14:17+00:00Added an answer on June 7, 2026 at 6:14 am

    You have an overview and some examples in “Using Keyboard Input“. As stated in a comment, processing keyboard events might not be obvious, depending on what you want exactly. A list of virtual key code is available here.

    case WM_KEYDOWN: 
        switch (wParam) 
        { 
            case VK_LEFT: 
    
                // Process the LEFT ARROW key. 
    
                break; 
    
            case VK_RIGHT: 
    
                // Process the RIGHT ARROW key. 
    
                break; 
    
            case VK_UP: 
    
                // Process the UP ARROW key. 
    
                break; 
    
            case VK_DOWN: 
    
                // Process the DOWN ARROW key. 
    
                break; 
    
            // Process other non-character keystrokes. 
    
            default: 
                break; 
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Just to make things clear, this problem was caused by a typo in
I'm trying to make a function that does different things when called on different
Just to make things clear. I'm trying to figure out how to build a
I basically want to make things easier by just looping LinkButtons instead of making
My boss believes that wizards make things simple for the user. I think they
I have a wordpress theme that I like to duplicate. To make things easier
I'd like to make things more clear to me about using instances of a
I have a question. To make things more clear, I will give an example:
To make things simple, my Delphi XE application contains objects in charge of generating
in order to make things easier for users i want to add multiple keyword

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.