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. Small question about MFC\DIALOG

Small question about MFC\DIALOG

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionlearning
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.
  • A Offline
    A Offline
    Ahmad
    wrote on last edited by
    #1

    -Enter and ESC keys close the dialog how i can stop it . -How i can load accelerator from resource to MFC\DIALOG i use loadaccelerator function but it didn't work. thank you ...

    L C 2 Replies Last reply
    0
    • A Ahmad

      -Enter and ESC keys close the dialog how i can stop it . -How i can load accelerator from resource to MFC\DIALOG i use loadaccelerator function but it didn't work. thank you ...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The best way is to try a keyboard Hook. That we you are totally in control of what's hapenning.

      1 Reply Last reply
      0
      • A Ahmad

        -Enter and ESC keys close the dialog how i can stop it . -How i can load accelerator from resource to MFC\DIALOG i use loadaccelerator function but it didn't work. thank you ...

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        You stop it by overriding OnOK and OnCancel. You can make the buttons still work by checking the keystate with GetKeyState(VK_RETURN) (or VK_ESCAPE) and returning if they are down. Then your button works, but the key does not. Christian The content of this post is not necessarily the opinion of my yadda yadda yadda. To understand recursion, we must first understand recursion.

        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