Thread: V C++; dialog box; tab order; advancing thru

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    5

    V C++; dialog box; tab order; advancing thru

    Greetings and such,
    I finally got my first sale of custom coding. Unfortunately, the client wants a "minor" change...

    In the standard dialog boxes the tab order can be readily set. The tab key walks through the edit boxes and to the buttons as desired. Shift+tab backs up through the reverse path.
    My client wants the up and down arrows to do the same thing.

    Also the enter key causes the program to terminate if focus is on an input field, but works fine if a button is highlighted.

    thanks for the help,
    Lyle "Alzado" Miller

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    194
    Im still new at windows programming but here are a few ideas.
    Moniter for the up or down key presses, and simulate the tab key by sending your window a message that the tab (or shift+tab) key was pressed

    You may want to post this on the windows programming board if you haven't already done so

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    5
    Thanks for the support.

    I'm not sure what MFC class / function can be used to monitor keystrokes without interferring with the data input.

    Also now to simulate the tab key.

    I'm now looking at 1) creating a pointer to CEdit box; 2) use GetFocus() to get the focus box; 3) use SetFocus() on the incremented value at the address...

    Lyle

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making dialog box the only window
    By PJYelton in forum Windows Programming
    Replies: 2
    Last Post: 09-06-2005, 12:02 PM
  2. Getting data from Dialog Box Controls
    By jmd15 in forum Windows Programming
    Replies: 2
    Last Post: 08-05-2005, 04:56 PM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  4. problem with the open dialog box
    By stallion in forum Windows Programming
    Replies: 13
    Last Post: 02-19-2003, 08:28 AM
  5. Resize Dialog Box via Code :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 10-27-2002, 11:00 PM