Announcement

Collapse
No announcement yet.

ReDisplaying a Menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ReDisplaying a Menu

    When clicking on an item on the Menu Bar at the top of a Dialog, the Menu drops down. One selects an option from the Menu and clicks on it, the Menu disappears and the program executes whatever the programmer has told it to do. All well and good up to this point.

    What I would like to do is (re/or continue to) display the menu after the action is taken. I have tried
    Code:
      Control Set Focus hDlg, hPopup2
    but no action there.

    Is there any way to redisplay (or keep Displayed) the Menu?

    ============================================================
    Ever consider what dogs must think of us?
    I mean, here we come back from a grocery store
    with the most amazing haul -
    chicken, pork, half a cow.
    They must think we're
    the greatest hunters on earth!"
    Anne Tyler
    ============================================================
    It's a pretty day. I hope you enjoy it.

    Gösta

    JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
    LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

  • #2
    To RE-display the menu you can
    1. Fake the necessary keystrokes (Key_event)
    2. Fake the necessary Mouse action (mouse_event)
    3. Use TrackPopupMenu.

    I'd lean toward Door #3
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Hey Gösta,

      Thank for the Anne Tyler's dog point of view,
      that was a good laugh.

      For menu, you may have a look at provoke menu

      Comment


      • #4
        Originally posted by Michael Mattias View Post
        To RE-display the menu you can
        1. Fake the necessary keystrokes (Key_event)
        I have never done that before and wouldn't know where to start. Actually I found a 2003 msg in Poffs where I used Key_Event, but I must have known a lot more about PBWin then. Have no idea how to implement it in this case.

        2. Fake the necessary Mouse action (mouse_event)
        Never have been very good at faking it (got caught very time). Another thing I don't know how to do, nor even begin how to apply it here.

        3. Use TrackPopupMenu.

        I'd lean toward Door #3
        I opened Door #3 in WinApi32 and that appears to be way above my pay grade as well.

        I must wither in disappoinment to you, M, but I do try nonetheless.

        =====================================
        "I choose a block of marble
        and chop off whatever I don't need."
        Francois-Auguste Rodin (1840-1917),
        when asked how he managed
        to make his remarkable statues
        =====================================
        It's a pretty day. I hope you enjoy it.

        Gösta

        JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
        LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

        Comment


        • #5
          Originally posted by Pierre Bellisle View Post
          Hey Gösta,

          Thank for the Anne Tyler's dog point of view,
          that was a good laugh.
          Glad you enjoyed it Pierre. [ offtopic ]Speaking of dogs, take a look at our new baby. (http://www.the-lovgrens.com/Videos/) [ /offtopic]


          For menu, you may have a look at provoke menu
          I just read it amd it looks very promising. I'll let you know how I make out (probably tomorrow).

          Thanks you & M. It's a Wonderful Life (with this forum in it).

          =====================================
          "He who hesitates is a damned fool."
          Mae West (1892-1980)
          =====================================
          Last edited by Gösta H. Lovgren-2; 29 Mar 2008, 10:12 PM. Reason: Going to the dogs.
          It's a pretty day. I hope you enjoy it.

          Gösta

          JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
          LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

          Comment


          • #6
            Edwin K's solution in Pierre's link above (provoke menu ) was EXACTLY what I was looking for.

            Thanks all. (Sofie thanks you too.)

            ==================================================
            "It is unbecoming for young men to utter maxims."
            Aristotle (384-322 B.C.)
            ==================================================
            It's a pretty day. I hope you enjoy it.

            Gösta

            JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
            LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

            Comment


            • #7
              Talk about a black beauty!
              You are a lucky man Gösta...
              Last edited by Pierre Bellisle; 30 Mar 2008, 01:42 PM.

              Comment


              • #8
                Originally posted by Pierre Bellisle View Post
                Talk about a black beauty!
                You are a lucky man Gösta...
                Yes we are. Actually, she's not black but a very deep chocolate brown. Had her about a month. A "rescue" dog (our 4th one over nearly 40 years, 2 mixed shepards and a mixed lab before), she's 3.5 yro. When the animal center got her, she wasn't "human socialized". It seems she was just used for breeding (we think she may be a purebred, she certainly looks it.).

                Turning out to be a perfect dog for Grandma and me. Well behaved, quiet. Gentle mouth (as duck hunters call it).Likes to fetch. Only one drawback. She's a wafter. We'll all be laying around the fire of an evening after dinner when this miasmic enveloping choking invisible "fog" of an organic gastro-intestinal variety will waft in from nowhere. The old lady swears it's the dog but I ain't always so sure.

                =====================================================
                "Every day I get up and look through the Forbes list
                of the richest people in America.
                If I'm not there, I go to work."
                Robert Orben
                =====================================================
                It's a pretty day. I hope you enjoy it.

                Gösta

                JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                Comment


                • #9
                  [off subject]
                  Trust me....If it were the Dog, She would PROUDLY!!! admit to it with that grin of "Beat THAT ONE!!!)

                  One of my best dogs was one from my DJ days, where I got a call from the dog-catcher near the end of my shift, and I convinced the dog-catcher I would stay on a bit longer and announce a couple of times that this poor dog was to be put down first thing in the morning on the 5th. (This being July 3rd, and them obviously being closed on the 4th, would be his last chance)

                  Having recently lost my "Best Bud", I had no use or want for another dog, but about the time I was ready to head home, decided to call the dog-catcher and convinced her that if she could stay a bit late (seeing how I did her a favor), then I would swing by on my way home.

                  Long story short, wouldn't you know it when I showed up and she opened the cage so I could check the dog out, he ran right past me, out the door and jumped into my truck with that look on his face of "Get me outtaaaaa here!!!!")

                  Of course after that I could not say no

                  "Rescue" dogs are almost ALWAYS the best dogs
                  [/off subject]
                  Engineer's Motto: If it aint broke take it apart and fix it

                  "If at 1st you don't succeed... call it version 1.0"

                  "Half of Programming is coding"....."The other 90% is DEBUGGING"

                  "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                  Comment


                  • #10
                    Originally posted by Cliff Nichols View Post
                    [off subject]
                    Trust me....If it were the Dog, She would PROUDLY!!! admit to it with that grin of "Beat THAT ONE!!!) [/off subject]
                    Gee, and here I always thought no females of any species would admit to ever even having passed wind. (Though I have heard that airline stewardesses, when among themselves, call it "crop dusting" when they walk down the aisles.)

                    ==================================================
                    The critic is a man who prefers
                    the indolence of opinion to the trials of action.
                    John Mason Brown
                    ==================================================
                    It's a pretty day. I hope you enjoy it.

                    Gösta

                    JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                    LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                    Comment


                    • #11
                      I got so stoked on Word Connections, I wrote a Word Search program after my daughter told me she couldn't find a decent one on the net to use. (That purpose was actually the reason for this thread origin.)

                      http://www.swedesdock.com/Children/

                      I would like to have taken screenshots of the Menu Popups but they disappear when clicking on CaptureWiz (screenshot capture prog). Anyone know of a way to make them persistent (stay up after a mouse click) enough to get a screen capture?

                      ============================================================
                      And if there be no meeting past the grave,
                      If all is darkness, silence, yet 'tis rest.
                      Be not afraid, ye waiting hearts that weep,
                      For still He giveth His beloved sleep,
                      And if an endless sleep He wills, so best.
                      Henrietta Anne Huxley,
                      written on her husband
                      Thomas Henry Huxley's tombstone.
                      ============================================================
                      It's a pretty day. I hope you enjoy it.

                      Gösta

                      JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                      LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                      Comment


                      • #12
                        Hey Gösta,

                        One way is to type ALT and the appropriate letter
                        to trigger the desired popup menu and then
                        whitout releasing the ALT key, press the Print-Scr key.
                        Then you should be able to paste in program like paint...
                        This info will cost you a thighbone.
                        Of course it must be paid to the dark chocolate brown beast

                        Comment


                        • #13
                          Originally posted by Pierre Bellisle View Post
                          Hey Gösta,

                          One way is to type ALT and the appropriate letter
                          to trigger the desired popup menu and then
                          whitout releasing the ALT key, press the Print-Scr key.
                          Then you should be able to paste in program like paint...
                          This info will cost you a thighbone.
                          Of course it must be paid to the dark chocolate brown beast
                          Ahhh. the wee dog'll get a bone off this tip. Worked a charm Pierre. Thanks.

                          ========================
                          There are three truths:
                          my truth,
                          your truth,
                          and the truth.
                          ~ Chinese proverb
                          ========================
                          It's a pretty day. I hope you enjoy it.

                          Gösta

                          JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                          LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                          Comment

                          Working...
                          X