No announcement yet.

Add a button to the title bar

  • Filter
  • Time
  • Show
Clear All
new posts

  • Add a button to the title bar

    I put new code to this old thread in the source code forum two days ago. I just changed the code. The change takes care of the problem of disappearing buttons when the application is loosing focus. (Go to the end of the thread for the new code.)

    Peter Redei

  • #2

    I found some strange behavior, I run WinXP Pro themed. First I added the necessary ByVal
    to make it compile under PBWIN804, compliles ok, but the caption starts off themed with no
    custom buttons, then once activated by a mouse click, the theme reverts to classic and shows
    the added buttons. Next, I decided to add Byval to all your function/sub paramters, same thing
    themed first with no custom buttons, then click, reverts to classic, but this time no buttons.
    Also, when I minimize, it immediately restores.

    I have to split to work now, but later if I get time, I will review. It just seems like a lot of
    code to do this task compared to a full custom caption bar.



    • #3
      Yes, Jules I noticed the same. On my machine the themed buttons appear, but when I click on any of the custom buttons the theme look disappears. This also happens in the C++ version that I translated. I have no idea why dis happens. I also cannot explain the differences between the C++ and the PB versions. The code is identical as far as I am concerned, yet the PB version losses the button while the application looses focus.

      Peter Redei