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. HELP WANTED!

HELP WANTED!

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
4 Posts 2 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.
  • M Offline
    M Offline
    MFC is the Best
    wrote on last edited by
    #1

    hello @all, i have a mdi program. in the mainframe you have for example: File -> Close i would like to hide 'Close' to the users until the correct password entered. enter password: View -> Password the 'Close' should not be gray or something like that. the user should not see that there is something like the 'Close', until he enter the right password. i hope you can help me. (please, give me an example or explain it in detail) thank you very much MFC

    M 1 Reply Last reply
    0
    • M MFC is the Best

      hello @all, i have a mdi program. in the mainframe you have for example: File -> Close i would like to hide 'Close' to the users until the correct password entered. enter password: View -> Password the 'Close' should not be gray or something like that. the user should not see that there is something like the 'Close', until he enter the right password. i hope you can help me. (please, give me an example or explain it in detail) thank you very much MFC

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      What you want to do is BAD UI! If the user start your application and cannot close it until he enters a password, it's offensive ! user still can kill the application ... But I will give you a hint: Check for CMenu::DeleteMenu ... Anyway, I suggest you review your application workflow. Max.

      M 1 Reply Last reply
      0
      • M Maximilien

        What you want to do is BAD UI! If the user start your application and cannot close it until he enters a password, it's offensive ! user still can kill the application ... But I will give you a hint: Check for CMenu::DeleteMenu ... Anyway, I suggest you review your application workflow. Max.

        M Offline
        M Offline
        MFC is the Best
        wrote on last edited by
        #3

        thanks for reply. the 'Close' is only an example.....sorry.....you are right. can you help me more? mfc

        M 1 Reply Last reply
        0
        • M MFC is the Best

          thanks for reply. the 'Close' is only an example.....sorry.....you are right. can you help me more? mfc

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          MFC is the Best wrote: the 'Close' is only an example.....sorry.....you are right. can you help me more? In what way ? Design ? Code ? I don't know exactly what you intend to do ? so this is highly speculative : If your application needs a password, it should be asked at the beginning, in a modal dialog, upon return of that dialog, if the password is wrong, you have the choice to either continue ( and you need to be able to check whether the password is valid or exists to block most operations with the ON_UPDATE_COMMAND_UI messages for menus and other type of check ) or quit. If you continue running the application, you need a menu item to allow the user to enter the password. Max.

          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