PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Richard Kelly on November 27, 2011, 07:15:34 AM

Title: Menu Bar Alignment
Post by: Richard Kelly on November 27, 2011, 07:15:34 AM
If you want to right align in a menu bar as I've seen "Help" right aligned many times, the following will do the trick.


Function MAIN_WM_CREATE ( _
                        hWndForm As Dword, _      ' handle of Form
                        ByVal UserData As Long _  ' optional user defined Long value
                        ) As Long

Local udtMenuItemInfo   As MENUITEMINFO

' Right align the menu Help item

    udtMenuItemInfo.cbsize = SizeOf(udtMenuItemInfo)
    udtMenuItemInfo.fmask = %MIIM_FTYPE
    GetMenuItemInfo (HWND_MAIN_TOPMENU, IDC_MAIN_MNUHELP, %FALSE, udtMenuItemInfo)
    udtMenuItemInfo.ftype = udtMenuItemInfo.ftype Or %MFT_RIGHTJUSTIFY
    SetMenuItemInfo (HWND_MAIN_TOPMENU, IDC_MAIN_MNUHELP, %FALSE, udtMenuItemInfo)


***Note posted to wrong forum :-[

Rick Kelly
Title: Re: Menu Bar Alignment
Post by: Rolf Brandt on November 27, 2011, 07:47:44 AM
Thanks for that one, Rick. I remember spending quite some time on that years ago until I got it achieved in VB6.
Title: Re: Menu Bar Alignment
Post by: José Roca on November 27, 2011, 01:02:04 PM
Or you can call the AfxRightJustifyMenuItem wrapper function.
Title: Re: Menu Bar Alignment
Post by: Richard Kelly on November 27, 2011, 05:02:24 PM
Quote from: Jose Roca on November 27, 2011, 01:02:04 PM
Or you can call the AfxRightJustifyMenuItem wrapper function.

I have to find or start a list of your functions. I've already spent several hours just opening up your *.inc files and browsing through them. I must have missed that one or, at my somewhat advanced age, the memory bank is just overloaded.....

Rick Kelly :o
Title: Re: Menu Bar Alignment
Post by: José Roca on November 27, 2011, 05:24:41 PM
There is a huge help file available:
http://www.jose.it-berater.org/smfforum/index.php?topic=4425.msg15815#msg15815
Title: Re: Menu Bar Alignment
Post by: David Kenny on November 27, 2011, 05:45:34 PM
Jose,

Both the 2.05 API headers and the help file downloaded as .PHP files.  I simply changed the extension to .RAR and was able to open and extract both.
Title: Re: Menu Bar Alignment
Post by: Richard Kelly on November 27, 2011, 05:48:43 PM
Quote from: Jose Roca on November 27, 2011, 05:24:41 PM
There is a huge help file available:
http://www.jose.it-berater.org/smfforum/index.php?topic=4425.msg15815#msg15815

Wow! That baby gets a shortcut on my desktop.... 8)
Title: Re: Menu Bar Alignment
Post by: José Roca on November 27, 2011, 06:07:12 PM
Quote
Both the 2.05 API headers and the help file downloaded as .PHP files.  I simply changed the extension to .RAR and was able to open and extract both.

It's a problem of FireFly 8. Try right clicking the link and using Save link as, or use another browser.
Title: Re: Menu Bar Alignment
Post by: Haakon Birkeland on November 27, 2011, 06:16:31 PM
QuoteFireFly 8
I want that update too! 8oÞ
Title: Re: Menu Bar Alignment
Post by: José Roca on November 27, 2011, 07:04:08 PM
I mean FireFox 8. Sorry.
Title: Re: Menu Bar Alignment
Post by: David Kenny on November 27, 2011, 10:49:35 PM
Well,  that's what I get for blindly clicking OK on an "update ready" message.  Sorry to bother you with a problem I caused myself.  :)