Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. tab control question

tab control question

Scheduled Pinned Locked Moved C / C++ / MFC
databasequestioncomhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blurblur
    wrote on last edited by
    #1

    my application looks like http://www.treetops.com.sg/before.jpg when I fill an IC in patient IC textbox and click search button, it's supposed to query database and show what found in the right hand side listview. Everything seems ok by using mouse click, however if I want to use keyboard 'Enter' instead of mouse click what happen is all controls in this 'Patient Infomation' tab dispear: http://www.treetops.com.sg/after.jpg I have to manually switch to other tab then switch back, controls in Patient Infomation will appear. Anybody encountered this kind of problem before?

    D E 2 Replies Last reply
    0
    • B blurblur

      my application looks like http://www.treetops.com.sg/before.jpg when I fill an IC in patient IC textbox and click search button, it's supposed to query database and show what found in the right hand side listview. Everything seems ok by using mouse click, however if I want to use keyboard 'Enter' instead of mouse click what happen is all controls in this 'Patient Infomation' tab dispear: http://www.treetops.com.sg/after.jpg I have to manually switch to other tab then switch back, controls in Patient Infomation will appear. Anybody encountered this kind of problem before?

      E Offline
      E Offline
      Edwin Brunner
      wrote on last edited by
      #2

      Well, I think you have for each tab a dialog and only one of them at a time is visible. Normally, dialogs have an "OK" and a "Cancel" button. If you only delete them, the functionality still is in the dialog and "Enter" or "Esc" will close your dialog. To avoid this, you should override (implement) the "OnOK" and "OnCancel" functions, but without calling its parent functions. void CMySubDialog1::OnOK() { //CDialog::OnOK(); } void CMySubDialog1::OnCancel() { //CDialog::OnCancel(); } This should solve your problem.

      1 Reply Last reply
      0
      • B blurblur

        my application looks like http://www.treetops.com.sg/before.jpg when I fill an IC in patient IC textbox and click search button, it's supposed to query database and show what found in the right hand side listview. Everything seems ok by using mouse click, however if I want to use keyboard 'Enter' instead of mouse click what happen is all controls in this 'Patient Infomation' tab dispear: http://www.treetops.com.sg/after.jpg I have to manually switch to other tab then switch back, controls in Patient Infomation will appear. Anybody encountered this kind of problem before?

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Its sounds as though the Search button is not the default button. Does the property sheet have an OK button?


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups