Newbie Ques: Why press "Enter" on combo box caused my application to exit?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Newbie Ques: Why press "Enter" on combo box caused my application to exit?

  1. #1
    Join Date
    Jun 2005
    Posts
    2

    Newbie Ques: Why press "Enter" on combo box caused my application to exit?

    Hi,

    I'm still new to VC++6.0.

    I have a combobox which is of the dropdown list type.
    My problem is whenever you have selected an item and I press "enter" key, this causes my whole application to exit and this is not acceptable as user is still filling the form.

    Would appreciate your help on how to stop this?

    Urgent need of help.
    Thanks.

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    What do you mean by "exit"? Does the app crash or does it exit normally? If it crashes then there's probably a serious memory-related bug lurking somewhere. If it exits normally then you have to disable this behavior by trapping the appropriate event.
    Danny Kalev

  3. #3
    Join Date
    Jun 2005
    Posts
    2
    I solved it already, by handling the OnOK().

  4. #4
    Join Date
    Dec 2003
    Posts
    3,366
    By default the ok button of a dialog based app exits, and by default, its the active control.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center