Announcement

Collapse
No announcement yet.

Creating an Internet Explorer-style Toolbar

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

  • Creating an Internet Explorer-style Toolbar

    In Microsoft's Developers Network I found this interesting article: http://msdn2.microsoft.com/en-us/lib...52(VS.85).aspx. Did anybody ever try to create this in Power Basic? The necessary bitmaps can be found in ieframe.dll (system32 directory). Is a programmer free to extract and redistribute those bitmaps?

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

  • #2
    Yes, it is possible and is quite easy to do with a product like Phoenix.
    It is just a rebar control with toolbars and comboboxex controls embedded in it. If you are using DDT you will have to hand code it.

    You will need to understand how to use the
    Rebar
    Toolbar
    ComboBoxEx
    ImageList

    The Menu Bar is a toolbar. It requires a bit of coding if you really want to mimic the behaviour of the normal menu bar.
    Last edited by Dominic Mitchell; 14 Feb 2008, 08:43 AM.
    Dominic Mitchell
    Phoenix Visual Designer
    http://www.phnxthunder.com

    Comment


    • #3
      Yes, the key is using Rebars.

      Rebars are very powerful controls.

      Now to make things easier, I find it better to use a Dialog (or with SDK a generic window parent class) as Bands (a band is a section in the Rebar), rather than controls directly. Then add your controls to the Dialog (band).

      I haven't tried it with DDT Dialogs yet, but it works well with the custom dialog class I use.

      The menus are simply toolbars which only display text for each button and no images (and the toolbar is the flat type so you don't see an actual button around the text). They emulate a menu.
      Chris Boss
      Computer Workshop
      Developer of "EZGUI"
      http://cwsof.com
      http://twitter.com/EZGUIProGuy

      Comment


      • #4
        Yes, DDT

        Yes, I want to accomplish it using DDT. Why else did I buy PBWin and its more than excellent dialog tool?

        But as far as I understand these messages, no one has really tried it so far, let alone got it working? To be honest, I do not understand the above mentioned MSDN article very well, most likely because it deals with SDK-development. What I need is a piece of (pseudo) code or, at least, a few good tips that are understandable for a simple-minded DDT-coder.

        And what about my second question? Are those bitmaps in ieframe.dll freely redistributable or does MS forbid it?

        Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
        http://zijlema.basicguru.eu
        *** Opinions expressed here are not necessarily untrue ***

        Comment


        • #5
          Egbert,

          I would suspect using a rebar with DDT should work fine and likely a DDT dialog could be used as a band (put your controls on the dialog).

          While I can't verify that, since I don't work primarily with DTT, I do know that dialogs do work as bands.

          In my GUI engine I use a custom dialog class (a sort of superclass of dialogs) for dialogs and they work fine as bands for rebars.

          In my latest DDT Designer (pro version) I will be supporting using dialogs as bands for Rebars and as children of the pager control. I have the Pager code working fine with DDT dialogs, but haven't finished the Rebar code yet. I am confident the DDT dialogs should work fine as bands for rebar.

          - Create the rebar control using the CONTROL ADD command.

          - Create a Dialog as a child of the rebar (use rebar handle as a parent handle). The Dialog should have the %WS_CHILD window style as well as use the WS_EX_CONTROLPARENT extended window style.

          - add the controls you want for the rebar band onto the Dialog you created.

          - use the %RB_INSERTBAND message to add a band to a rebar control. The REBARBANDINFO structure is passed via this message. This structure has a member which is: .hwndChild
          Set this member to the handle of the child dialog you created.

          Now you can simply process the child dialogs messages like any other dialog, including the WM_COMMAND and WM_NOTIFY messages. The controls can have callback functions too, since their parent will be a dialog and not the rebar.
          Chris Boss
          Computer Workshop
          Developer of "EZGUI"
          http://cwsof.com
          http://twitter.com/EZGUIProGuy

          Comment


          • #6
            That artilcle looks cool. I don't see any C/C++ code to translate?

            This is about as close as I can get you, ...
            '
            http://msdn2.microsoft.com/en-us/library/ms997549.aspx
            '
            The ported example is in the source code forum. Search for topic "Rebar Demo"
            posted February 01, 2000

            Regards,
            Jules
            Best regards
            Jules
            www.rpmarchildon.com

            Comment

            Working...
            X