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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Dialog window help

Dialog window help

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionhelp
4 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.
  • K Offline
    K Offline
    Kwanalouie
    wrote on last edited by
    #1

    Using Visual C++ 6.0 MFC in SDI application I have a view that includes a dialog window from which the user can select different options. I do not want the user to be able to close that window. When the view changes, that dialog window will close automatically. However, I noticed that when the window is displayed, if the user hits the "escape key" esc, the window disappears. How do I prevent that from happening? Thanks

    S M 2 Replies Last reply
    0
    • K Kwanalouie

      Using Visual C++ 6.0 MFC in SDI application I have a view that includes a dialog window from which the user can select different options. I do not want the user to be able to close that window. When the view changes, that dialog window will close automatically. However, I noticed that when the window is displayed, if the user hits the "escape key" esc, the window disappears. How do I prevent that from happening? Thanks

      S Offline
      S Offline
      SandipG
      wrote on last edited by
      #2

      Handle OnCancel() (IDCANCEL) in the dialog box. comment the base class call CDialog::OnCancel().

      Regards, Sandip.

      1 Reply Last reply
      0
      • K Kwanalouie

        Using Visual C++ 6.0 MFC in SDI application I have a view that includes a dialog window from which the user can select different options. I do not want the user to be able to close that window. When the view changes, that dialog window will close automatically. However, I noticed that when the window is displayed, if the user hits the "escape key" esc, the window disappears. How do I prevent that from happening? Thanks

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        See the FAQ: 7.4 How do I prevent a dialog from closing when the user presses Enter or Esc?[^]

        --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

        K 1 Reply Last reply
        0
        • M Michael Dunn

          See the FAQ: 7.4 How do I prevent a dialog from closing when the user presses Enter or Esc?[^]

          --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

          K Offline
          K Offline
          Kwanalouie
          wrote on last edited by
          #4

          That's a great link!

          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