Announcement

Collapse
No announcement yet.

Owner Drawn Menu problem in Source Code forum...

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

  • Owner Drawn Menu problem in Source Code forum...

    Regarding posting about old Owner Drawn Menu in Source Code Forum, since we should not clutter that forum with discussions. Original code was written for 20 year older systems, so there should be issues, but simple to fix. Here, simple fix is to skip (rem out) a call to FUNCTION DrawMenuBorder in CALLBACK FUNCTION ShowDIALOG1Proc. It's actually all you need to do to get border on menu activation, Steven.

  • #2
    Hello Borje,

    Thank you for commenting. I think there must be a bit of a misunderstanding. I added the code DrawMenuBorder to have a custom border overlapping the original menu border. That all works fine however for some reason, when you click on the menu bar item, the original border is shown. I tried the FindWindow("#32768", "") call as well to actually find the system class of the menu but for dialogs that doesn't seem to work at all. Removing the forementioned DrawMenuBorder will just draw the original menu border which is not what I intended.
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

    Comment


    • #3
      What would be the conclusions for this source code? shall we rem it off or not to rem it off ? The code is cool and thanks for your submission

      Comment


      • #4
        Originally posted by Steven Pringels 3 View Post
        Hello Borje,

        Thank you for commenting. I think there must be a bit of a misunderstanding. I added the code DrawMenuBorder to have a custom border overlapping the original menu border. That all works fine however for some reason, when you click on the menu bar item, the original border is shown. I tried the FindWindow("#32768", "") call as well to actually find the system class of the menu but for dialogs that doesn't seem to work at all. Removing the forementioned DrawMenuBorder will just draw the original menu border which is not what I intended.
        A reminder - it clearly states at the top of the Source Code Forum:

        Click image for larger version

Name:	working.jpg
Views:	169
Size:	15.1 KB
ID:	819389

        Comment


        • #5
          Stuart,

          The code works, doesn't it?
          So here we are, this is the end.
          But all that dies, is born again.
          - From The Ashes (In This Moment)

          Comment


          • #6
            Originally posted by Steven Pringels 3 View Post
            Stuart,

            The code works, doesn't it?
            It may work, but it is clearly not "finished code" that "is working properly"

            "when you click on the menu bar item, the original border is shown. I tried the FindWindow("#32768", "") call as well to actually find the system class of the menu but for dialogs that doesn't seem to work at all. Removing the forementioned DrawMenuBorder will just draw the original menu border which is not what I intended."
            Last edited by Stuart McLachlan; 11 Oct 2022, 09:07 PM.

            Comment


            • #7
              I am gonna give up on this stupid debate. The fact of the matter is that it can't be finished because FindWindow("#32768", "") doesn't work for dialogs as the menu class is not detected in dialogs, only in Windows. Hence there is no solution.
              So here we are, this is the end.
              But all that dies, is born again.
              - From The Ashes (In This Moment)

              Comment


              • #8
                I learned a lot while developing the code for my post in the source code forum, but I was never satisfied with the way it behaved when a user resizes a window, so I never actually used it in a production application. It's good code for kicking tires and learning a bit about menus, but it's not "finished" as far as I'm concerned because of the undesirable behavior during a window resize event.
                Bernard Ertl
                InterPlan Systems

                Comment

                Working...
                X