Announcement

Collapse
No announcement yet.

How can I use/get/draw this Office Style menu?

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

  • How can I use/get/draw this Office Style menu?

    I would like to use this menu style (see attachement). Until I saw it being used by a non-Office program I thought it was some kind of Microsoft-only type of menu.

    I haven´t a clue as how to get it done.

    The Window has its own style also. Very neat.

    Any Ideas?
    Attached Files
    Last edited by Francisco Castanedo; 1 May 2009, 06:46 PM.
    Francisco J Castanedo
    Software Developer
    Distribuidora 3HP, C.A.
    [URL]http://www.distribuidora3hp.com[/URL]

  • #2
    For sure it's not a menu you build with any of the convetional DDT or SDK menu commands.

    Looks like a window with a tab control, and each tab's contents have a bunch of controls on them.

    To get it done?

    Start with RegisterClass + CreateWindowEx. Then do lots more of same.

    It is very nice-looking.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      You might try using winspy to see if it can determine the controls.
      Client Writeup for the CPA

      buffs.proboards2.com

      Links Page

      Comment


      • #4
        It is called the Ribbon interface

        I Just learned that this style is an interface created by microsoft. It is called the Ribbon Interface:

        http://en.wikipedia.org/wiki/Ribbon_(computing)
        Francisco J Castanedo
        Software Developer
        Distribuidora 3HP, C.A.
        [URL]http://www.distribuidora3hp.com[/URL]

        Comment


        • #5
          If anyone can make a working template of Ribbon to be used in my .exe apps made with PB9, I´ll be glad to pay for it. No kidding.

          If interested send email to programacion at distribuidora3hp.com
          Francisco J Castanedo
          Software Developer
          Distribuidora 3HP, C.A.
          [URL]http://www.distribuidora3hp.com[/URL]

          Comment


          • #6
            There was an example how to reuse the mso dll which exposes this ribbon control (which requires office to be present).
            There are also 3th party vendors selling a similar control.

            It's an annoying control anyway
            hellobasic

            Comment


            • #7
              Originally posted by edwin knoppert View Post
              it's an annoying control anyway
              amen!
              https://www.BcxBasicCoders.com

              Comment


              • #8
                I loathe that control and would wish no other vendors to go down that path!

                I'm not the only person who thinks this is a GUI faux pas, new is not always better.

                http://www.dexodesign.com/2007/08/24...-ribbon-sucks/
                Last edited by George Bleck; 2 May 2009, 09:40 PM.
                <b>George W. Bleck</b>
                <img src='http://www.blecktech.com/myemail.gif'>

                Comment


                • #9
                  Hi Francisco;

                  Is this any help?

                  Code:
                  '====================================================================
                  '
                  '  Ribbon Control.bas for PowerBASIC Compiler for Windows
                  '
                  '  Display controls on a ribbon.
                  '
                  '====================================================================
                  #COMPILER PBWIN 9
                  #COMPILE EXE
                  '--------------------------------------------------------------------
                  %Button0        = 2000
                  %Button1        = 2001
                  %Button2        = 2002
                  %Button3        = 2003
                  %Button4        = 2004
                  %Button5        = 2005
                  %Button6        = 2006
                  %Button7        = 2007
                  %Button8        = 2008
                  %Button9        = 2009
                  %ButtonA        = 2010
                  %ButtonB        = 2011
                  %ButtonC        = 2012
                  %ButtonD        = 2013
                  %ButtonE        = 2014
                  %ButtonF        = 2015
                  '--------------------------------------------------------------------
                  
                  
                  '********************************************************************
                  FUNCTION PBMAIN () AS LONG
                  '--------------------------------------------------------------------
                  ' Program entrance
                  '--------------------------------------------------------------------
                    LOCAL hDlg    AS DWORD
                    LOCAL File    AS DWORD
                    LOCAL Font1   AS DWORD
                    LOCAL DX      AS DWORD
                    LOCAL DY      AS DWORD
                    LOCAL GX      AS DWORD
                    LOCAL GY      AS DWORD
                    LOCAL hBmp1   AS DWORD
                    LOCAL ImgX    AS DWORD
                    LOCAL Imgy    AS DWORD
                    LOCAL i       AS DWORD
                    LOCAL j       AS DWORD
                    LOCAL k       AS DWORD
                  
                    FONT NEW "Wingdings", 12, 0, 0 TO Font1
                    '?"X: " + format$(ImgX) + $cr + "Y: " + format$(ImgY)
                  
                    DIALOG NEW PIXELS, 0, "Ribbon Control Demo",,, 800, 600, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDlg
                    DIALOG GET SIZE hDlg TO DX, DY
                  
                    GX = INT(DX / 16)
                    GY = INT(DX / 32)
                    j = 0
                    k =&h35
                    FOR i = %Button0 TO %ButtonF
                      CONTROL ADD LABEL, hDlg, i,CHR$(k), j, 50, GX, GY, %SS_NOTIFY OR %SS_CENTER OR %SS_CENTERIMAGE
                      CONTROL SET COLOR  hDlg, i, %BLUE, %CYAN
                      CONTROL SET FONT   hDlg, i, Font1
                      INCR k
                      j = j + GX
                    NEXT i
                  
                    DIALOG SHOW MODAL hDlg CALL DlgProc
                  
                  END FUNCTION
                  
                  
                  '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
                  CALLBACK FUNCTION DlgProc() AS LONG
                  '--------------------------------------------------------------------
                  ' Main dialog callback procedure
                  '--------------------------------------------------------------------
                  
                    SELECT CASE CB.MSG
                    CASE %WM_COMMAND
                        SELECT CASE CB.CTL
                        CASE %IDCANCEL
                            IF CB.CTLMSG = %BN_CLICKED THEN
                                DIALOG END CB.HNDL
                            END IF
                            EXIT SELECT
                            
                        CASE %Button0 TO %ButtonF
                            IF CB.CTLMSG = %BN_CLICKED THEN
                                ?"Buton: " + FORMAT$(CB.CTL) + " clicked!"
                            END IF
                        END SELECT
                  
                    END SELECT
                  
                  END FUNCTION

                  Comment


                  • #10
                    See the article: A Professional Ribbon You Will Use (Now with orb!) in
                    http://www.codeproject.com/KB/toolba...rmsRibbon.aspx

                    Jordi

                    Comment


                    • #11
                      Hi Walter. It looks like a Primitive Ribbon. An idea that can be developed a little further but it is certainly not the Microsoft Scenic Ribbon control.

                      However, the link provided by Jordi is great. I do not program in C but it now seems closer to get there. Thanks Jordi.

                      If this can be put to work using PB, all that is left is to ask for a license to use it from Microsoft (http://msdn.microsoft.com/en-us/office/aa973809.aspx) and we are done!.
                      Francisco J Castanedo
                      Software Developer
                      Distribuidora 3HP, C.A.
                      [URL]http://www.distribuidora3hp.com[/URL]

                      Comment


                      • #12
                        I'm sure you can do that very easily w/ Elias' eGrid: http://www.egrid32.com/

                        or maybe ask him in the 3rd party forum or the Cafe'

                        Comment

                        Working...
                        X